[FFmpeg-devel] [PATCH 14/42] avcodec/hevcdec: Use RefStruct API for RefPicListTap buffer

Anton Khirnov anton at khirnov.net
Mon Oct 2 13:47:46 EEST 2023


Quoting Andreas Rheinhardt (2023-09-19 21:57:06)
>avcodec/hevcdec: Use RefStruct API for RefPicListTap buffer
                                                    ^
                                                    b

> Given that the RefStruct API relies on the user to know
> the size of the objects and does not provide a way to get it,

Is there a reason you decided not to provide it, or there just wasn't
any code that would be improved by it?

> we need to store the number of elements allocated ourselves;
> but this is actually better than deriving it from the size
> in bytes.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/hevc_refs.c | 14 ++++++++------
>  libavcodec/hevcdec.c   |  5 ++---
>  libavcodec/hevcdec.h   |  3 ++-
>  3 files changed, 12 insertions(+), 10 deletions(-)

The actual code looks good.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list