[FFmpeg-cvslog] avcodec/ffv1enc: remap mode 2 is for floats only
Michael Niedermayer
git at videolan.org
Tue Mar 25 12:50:35 EET 2025
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Mar 24 15:54:00 2025 +0100| [e619b0d81751840c0aa5feb3e46342b9abb5ea42] | committer: Michael Niedermayer
avcodec/ffv1enc: remap mode 2 is for floats only
(you could use it for others but it makes no sense)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e619b0d81751840c0aa5feb3e46342b9abb5ea42
---
libavcodec/ffv1enc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 4340a301e1..7e1dfd4b6f 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -951,6 +951,11 @@ av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "32bit requires remap\n");
return AVERROR(EINVAL);
}
+ if (s->remap_mode == 2 &&
+ !((s->bits_per_raw_sample == 16 || s->bits_per_raw_sample == 32 || s->bits_per_raw_sample == 64) && s->flt)) {
+ av_log(avctx, AV_LOG_ERROR, "remap 2 is for float16/32/64 only\n");
+ return AVERROR(EINVAL);
+ }
return av_pix_fmt_get_chroma_sub_sample(pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
}
More information about the ffmpeg-cvslog
mailing list