[FFmpeg-devel] [PATCH] avcodec/ffv1enc: Use version 3 by default (CRCs by default)

Michael Niedermayer michael at niedermayer.cc
Mon Dec 9 00:47:16 EET 2019


Version 3 is since 2013 (FFmpeg 2.1) non experimental so should be widely supported

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/ffv1enc.c  | 3 ++-
 tests/fate/vcodec.mak | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index c521b7d445..ce66d0e4d6 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -542,7 +542,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
             return AVERROR(EINVAL);
         }
         s->version = avctx->level;
-    }
+    } else if (s->version < 3)
+        s->version = 3;
 
     if (s->ec < 0) {
         s->ec = (s->version >= 3);
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index 452246689e..91b46034c8 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -168,7 +168,7 @@ FATE_VCODEC-$(call ENCDEC, FFV1, AVI)   += ffv1 ffv1-v0 \
                                            ffv1-v3-yuv420p ffv1-v3-yuv422p10 ffv1-v3-yuv444p16 \
                                            ffv1-v3-bgr0 ffv1-v3-rgb48
 fate-vsynth%-ffv1:               ENCOPTS = -slices 4
-fate-vsynth%-ffv1-v0:            CODEC   = ffv1
+fate-vsynth%-ffv1-v0:            ENCOPTS = -level 0
 fate-vsynth%-ffv1-v3-yuv420p:    ENCOPTS = -level 3 -pix_fmt yuv420p
 fate-vsynth%-ffv1-v3-yuv422p10:  ENCOPTS = -level 3 -pix_fmt yuv422p10 \
                                            -sws_flags neighbor+bitexact
-- 
2.23.0



More information about the ffmpeg-devel mailing list