diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-15 17:05:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-15 17:05:58 +0100 |
| commit | a183c1776cfd020a37d028ebb0f641352f49697b (patch) | |
| tree | db2fdafe7fe071f2e50264317e2c4de6b6806f29 /src/lib/image.cc | |
| parent | 11d0d8d07917543d6c40a6bb1fe5581ae216f5aa (diff) | |
| parent | 4fe7c89e54205c56f0fba2da24db66734ce23674 (diff) | |
Merge master.
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index bba7d6be5..17c969cf2 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -248,11 +248,11 @@ void Image::make_black () { /* U/V black value for 8-bit colour */ - static uint8_t const eight_bit_uv = (1 << 7) - 1; + static uint8_t const eight_bit_uv = (1 << 7) - 1; /* U/V black value for 9-bit colour */ - static uint16_t const nine_bit_uv = (1 << 8) - 1; + static uint16_t const nine_bit_uv = (1 << 8) - 1; /* U/V black value for 10-bit colour */ - static uint16_t const ten_bit_uv = (1 << 9) - 1; + static uint16_t const ten_bit_uv = (1 << 9) - 1; /* U/V black value for 16-bit colour */ static uint16_t const sixteen_bit_uv = (1 << 15) - 1; @@ -265,6 +265,14 @@ Image::make_black () memset (data()[2], eight_bit_uv, lines(2) * stride()[2]); break; + case PIX_FMT_YUVJ420P: + case PIX_FMT_YUVJ422P: + case PIX_FMT_YUVJ444P: + memset (data()[0], 0, lines(0) * stride()[0]); + memset (data()[1], eight_bit_uv + 1, lines(1) * stride()[1]); + memset (data()[2], eight_bit_uv + 1, lines(2) * stride()[2]); + break; + case PIX_FMT_YUV422P9LE: case PIX_FMT_YUV444P9LE: yuv_16_black (nine_bit_uv); |
