ref: eba342af878240a47b4d5e97657724d47f303e5b
parent: 812fbc5ecb014b8f3f4b95a23144821edc2a2eab
author: Ronald S. Bultje <[email protected]>
date: Fri Sep 11 12:55:19 EDT 2015
Don't convert bitdepth for !single-file or MD5. ... unless --output-bit-depth was set. Change-Id: I3482eaf12e245eec24427518fccdd173f890f4b4
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -990,11 +990,11 @@
}
#if CONFIG_VP9_HIGHBITDEPTH
// Default to codec bit depth if output bit depth not set
- if (!output_bit_depth) {
+ if (!output_bit_depth && single_file && !do_md5) {
output_bit_depth = img->bit_depth;
}
// Shift up or down if necessary
- if (output_bit_depth != img->bit_depth) {
+ if (output_bit_depth != 0 && output_bit_depth != img->bit_depth) {
const vpx_img_fmt_t shifted_fmt = output_bit_depth == 8 ?
img->fmt ^ (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) :
img->fmt | VPX_IMG_FMT_HIGHBITDEPTH;