summaryrefslogtreecommitdiff
path: root/vp10/encoder/bitstream.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-15 21:56:51 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-16 06:41:46 -0400
commiteeb5ef0a240cb7c69d5e92cdd9879032fb4bc5a7 (patch)
treed5c3713996f6630ffe9cfd0bf3c69ecb636d6a59 /vp10/encoder/bitstream.c
parente562c71783d303bab7f9d6a9852db3debec3f865 (diff)
downloadlibvpx-eeb5ef0a240cb7c69d5e92cdd9879032fb4bc5a7.tar
libvpx-eeb5ef0a240cb7c69d5e92cdd9879032fb4bc5a7.tar.gz
libvpx-eeb5ef0a240cb7c69d5e92cdd9879032fb4bc5a7.tar.bz2
libvpx-eeb5ef0a240cb7c69d5e92cdd9879032fb4bc5a7.zip
Add support for color-range.
In decoder, export (eventually) into vpx_image_t.range field. In encoder, use oxcf->color_range to set it (same way as for color_space). See issue 1059. Change-Id: Ieabbb2a785fa58cc4044bd54eee66f328f3906ce
Diffstat (limited to 'vp10/encoder/bitstream.c')
-rw-r--r--vp10/encoder/bitstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c
index eb5a86714..8d84a8590 100644
--- a/vp10/encoder/bitstream.c
+++ b/vp10/encoder/bitstream.c
@@ -1055,7 +1055,8 @@ static void write_bitdepth_colorspace_sampling(
}
vpx_wb_write_literal(wb, cm->color_space, 3);
if (cm->color_space != VPX_CS_SRGB) {
- vpx_wb_write_bit(wb, 0); // 0: [16, 235] (i.e. xvYCC), 1: [0, 255]
+ // 0: [16, 235] (i.e. xvYCC), 1: [0, 255]
+ vpx_wb_write_bit(wb, cm->color_range);
if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) {
assert(cm->subsampling_x != 1 || cm->subsampling_y != 1);
vpx_wb_write_bit(wb, cm->subsampling_x);