[FFmpeg-cvslog] avcodec/ffv1enc: support forcing experimental 1.4 version
Michael Niedermayer
git at videolan.org
Mon Dec 9 00:52:16 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 9 00:39:02 2013 +0100| [b07da13ac0f04b9c77efc0b9840e23cc4cd9aa33] | committer: Michael Niedermayer
avcodec/ffv1enc: support forcing experimental 1.4 version
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b07da13ac0f04b9c77efc0b9840e23cc4cd9aa33
---
libavcodec/ffv1enc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 4e2e0b3..25a69bf 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -674,9 +674,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
if ((avctx->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) || avctx->slices>1)
s->version = FFMAX(s->version, 2);
- if (avctx->level == 3 || (avctx->level <= 0 && s->version == 2)) {
+ if (avctx->level <= 0 && s->version == 2) {
s->version = 3;
}
+ if (avctx->level >= 0 && avctx->level <= 4)
+ s->version = FFMAX(s->version, avctx->level);
if (s->ec < 0) {
s->ec = (s->version >= 3);
More information about the ffmpeg-cvslog
mailing list