[FFmpeg-devel] [PATCH] [v4] avcodec/vaapi_encode: add customized surface alignment

Anton Khirnov anton at khirnov.net
Fri Mar 22 12:35:11 EET 2024


Quoting Araz Iusubov (2024-03-21 18:02:19)
> diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h
> index bac30debae..1eb56aff78 100644
> --- a/libavutil/hwcontext.h
> +++ b/libavutil/hwcontext.h
> @@ -465,6 +465,13 @@ typedef struct AVHWFramesConstraints {
>       */
>      int max_width;
>      int max_height;
> +
> +    /**
> +     * The frame width/height log2 alignment when available
> +     * the lower 4 bits, width; another 4 bits, height
> +     * (Zero is not applied, use the default value)

Why this unnecessary complication? Just use two ints, or two uint8_t's
if you really need to save space, though that also seems unncessary as
this struct is allocated rarely and usually does not live long.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list