From patchwork Sun Dec 8 22:47:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 16679 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C703A449FF8 for ; Mon, 9 Dec 2019 00:50:23 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9997B68B1E1; Mon, 9 Dec 2019 00:50:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-3.mx.upcmail.net (vie01a-dmta-pe02-3.mx.upcmail.net [62.179.121.159]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A269D68B0D7 for ; Mon, 9 Dec 2019 00:50:16 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1ie5NX-00087z-0B for ffmpeg-devel@ffmpeg.org; Sun, 08 Dec 2019 23:50:15 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id e5MYi8Ztawlyse5MYi2U1P; Sun, 08 Dec 2019 23:49:15 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=E5OzWpVl c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=zj9AsvYP7J15jt9GjA0A:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 8 Dec 2019 23:47:16 +0100 Message-Id: <20191208224716.21557-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfPNv+XqoYyTnF5YLqxe9Bd2MM8OeQsOezGCfer2lNNt8E+xrPJlUd4ePy8AprcnQakL+BnNcVU5GXoHPsI5xUmAtMwq/hDypOUWUX53TnLHe2d086yuN xI57UR1VwsEgMyoKpgJcm5tIqqTpKNhQjV7AawpzIqjebrSNc4cZjQ/A Subject: [FFmpeg-devel] [PATCH] avcodec/ffv1enc: Use version 3 by default (CRCs by default) X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Version 3 is since 2013 (FFmpeg 2.1) non experimental so should be widely supported Signed-off-by: Michael Niedermayer --- 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