[FFmpeg-cvslog] avcodec/dnxhddec: Disable 12bit by default
Michael Niedermayer
git at videolan.org
Sun Nov 29 21:32:50 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Nov 28 12:41:19 2015 +0100| [55711e6fd0528f2cb17f1ce64c8da3f92bba14a4] | committer: Michael Niedermayer
avcodec/dnxhddec: Disable 12bit by default
The DC VLC table used is too small, fixing this requires a sample,
thus request a sample.
Some samples are said to work even though the table has the wrong size, thus
this is left enabled if the user enables experimental features.
Fixes: 2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Approved-by: kurosu
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55711e6fd0528f2cb17f1ce64c8da3f92bba14a4
---
libavcodec/dnxhddec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index f0fdbb9..20ca262 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -118,6 +118,11 @@ static int dnxhd_init_vlc(DNXHDContext *ctx, uint32_t cid, int bitdepth)
av_log(ctx->avctx, AV_LOG_ERROR, "bit depth mismatches %d %d\n", ff_dnxhd_cid_table[index].bit_depth, bitdepth);
return AVERROR_INVALIDDATA;
}
+ if (bitdepth > 10) {
+ avpriv_request_sample(ctx->avctx, "DNXHR 12-bit");
+ if (ctx->avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
+ return AVERROR_PATCHWELCOME;
+ }
ctx->cid_table = &ff_dnxhd_cid_table[index];
av_log(ctx->avctx, AV_LOG_VERBOSE, "Profile cid %d.\n", cid);
More information about the ffmpeg-cvslog
mailing list