[FFmpeg-cvslog] avcodec/ffv1enc: choose 1.2 by default for higher resolutions to ensure multi-threaded decodability
Michael Niedermayer
git at videolan.org
Wed Jan 8 13:29:43 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 8 16:39:35 2013 +0100| [9e7b477c8c751380e7f5d766f27db7d78be917ef] | committer: Michael Niedermayer
avcodec/ffv1enc: choose 1.2 by default for higher resolutions to ensure multi-threaded decodability
Reviewed-by: "Peter B." <pb at das-werkstatt.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e7b477c8c751380e7f5d766f27db7d78be917ef
---
libavcodec/ffv1enc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 7f9f203..ef07eb9 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -674,6 +674,10 @@ 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);
+ // Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability
+ if (avctx->slices == 0 && avctx->level < 0 && avctx->width * avctx->height > 720*576)
+ s->version = FFMAX(s->version, 2);
+
if (avctx->level <= 0 && s->version == 2) {
s->version = 3;
}
More information about the ffmpeg-cvslog
mailing list