On Mon, Nov 11, 2024 at 04:40:15AM +0100, Lynne via ffmpeg-devel wrote:
> ---
>  libavcodec/ffv1enc.c | 354 +++++++++++++++++++++++--------------------
>  libavcodec/ffv1enc.h |  30 ++++
>  2 files changed, 217 insertions(+), 167 deletions(-)
>  create mode 100644 libavcodec/ffv1enc.h
> 
> diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
> index 7a6c718b41..ca2c9f32e2 100644
> --- a/libavcodec/ffv1enc.c
> +++ b/libavcodec/ffv1enc.c
[...]

> @@ -873,7 +907,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
>                      continue;
>                  if (maxw * maxh * (int64_t)(s->bits_per_raw_sample+1) * 
> plane_count > 8<<24)
>                      continue;
> -                if (s->version < 4)
> +                if (avctx->level < 4)
>                      if (  ff_need_new_slices(avctx->width , s->num_h_slices, 
> s->chroma_h_shift)
>                          ||ff_need_new_slices(avctx->height, s->num_v_slices, 
> s->chroma_v_shift))
>                          continue;

avctx->level is read only from the point of view of the encoder
while s->level can (and is sometimes) changed by the encoder
So in cases where version is adjusted across 4, level would be wrong,
it may be that this doesnt occur ATM but its still not correct


thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to