[FFmpeg-cvslog] avcodec/ffv1enc: Factor rice high depth check out
Michael Niedermayer
git at videolan.org
Wed Aug 17 00:56:29 EEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Aug 16 23:03:10 2016 +0200| [87da1188981fbfa802d1ccfe22bf32cc76f52ada] | committer: Michael Niedermayer
avcodec/ffv1enc: Factor rice high depth check out
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87da1188981fbfa802d1ccfe22bf32cc76f52ada
---
libavcodec/ffv1enc.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index d4f0577..0a72591 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -598,11 +598,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n");
return AVERROR_INVALIDDATA;
}
- if (s->ac == AC_GOLOMB_RICE) {
- av_log(avctx, AV_LOG_INFO,
- "bits_per_raw_sample > 8, forcing range coder\n");
- s->ac = AC_RANGE_CUSTOM_TAB;
- }
s->version = FFMAX(s->version, 1);
case AV_PIX_FMT_GRAY8:
case AV_PIX_FMT_YA8:
@@ -661,11 +656,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
}
s->version = FFMAX(s->version, 1);
- if (s->ac == AC_GOLOMB_RICE) {
- av_log(avctx, AV_LOG_INFO,
- "bits_per_raw_sample > 8, forcing coder 1\n");
- s->ac = AC_RANGE_CUSTOM_TAB;
- }
break;
default:
av_log(avctx, AV_LOG_ERROR, "format not supported\n");
@@ -673,6 +663,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
av_assert0(s->bits_per_raw_sample >= 8);
+ if (s->bits_per_raw_sample > 8) {
+ if (s->ac == AC_GOLOMB_RICE) {
+ av_log(avctx, AV_LOG_INFO,
+ "bits_per_raw_sample > 8, forcing range coder\n");
+ s->ac = AC_RANGE_CUSTOM_TAB;
+ }
+ }
if (s->transparency) {
av_log(avctx, AV_LOG_WARNING, "Storing alpha plane, this will require a recent FFV1 decoder to playback!\n");
}
More information about the ffmpeg-cvslog
mailing list