[FFmpeg-cvslog] avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
Michael Niedermayer
git at videolan.org
Thu Feb 27 19:07:38 EET 2025
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Mon Sep 30 23:42:50 2024 +0200| [50a5c2f75d948faeaeb601bc25d86cb21bd2cd5d] | committer: Michael Niedermayer
avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
"Fixes" Ticket7063
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 417b163c00555ccda201a963e797bfa663a26ff5)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=50a5c2f75d948faeaeb601bc25d86cb21bd2cd5d
---
libavcodec/ffv1enc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 7c91be057a..82f21de8b3 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -526,6 +526,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->slices > 1)
s->version = FFMAX(s->version, 2);
+ if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) && s->ac == AC_GOLOMB_RICE) {
+ av_log(avctx, AV_LOG_ERROR, "2 Pass mode is not possible with golomb coding\n");
+ return AVERROR(EINVAL);
+ }
+
// 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);
More information about the ffmpeg-cvslog
mailing list