[FFmpeg-devel] [PATCH] Optimization: support for libx264's mb_info

Stefano Sabatini stefasab at gmail.com
Sun Jun 18 13:18:19 EEST 2023


On date Monday 2023-06-12 17:28:10 +0000, Carotti, Elias wrote:
> Hi Stefano,
> Here is the revised patch according to your suggestions. This should
> allow for efficient inlining of the methods computing the map of
> skipped macrobloks.
> Best, 
> Elias
[...] 
> 
> From 0e7979250231edbe0b845cee96c473bc6e07d46b Mon Sep 17 00:00:00 2001
> From: Elias Carotti <eliascrt _at_ amazon _dot_ it>
> Date: Wed, 19 Apr 2023 11:49:39 +0200
> Subject: [PATCH] Add support for libx264's MB_INFO
> 
> libx264's x264_image_properties_t, which is passed to the encoding function,
> contains a field to pass down information on the portions of the frame which
> changed with respect to the previous one (used for prediction) to mark
> unchanged macroblocks P_SKIP.
> ---
>  libavcodec/libx264.c   | 91 ++++++++++++++++++++++++++++++++++++++++++
>  libavutil/Makefile     |  4 ++
>  libavutil/frame.h      | 10 +++++
>  libavutil/video_hint.c | 89 +++++++++++++++++++++++++++++++++++++++++
>  libavutil/video_hint.h | 87 ++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 281 insertions(+)
>  create mode 100644 libavutil/video_hint.c
>  create mode 100644 libavutil/video_hint.h

Note: maybe this should be split in two parts, one about libavutil and
one about libx264. The libavutil part should also contain a minor bump
for the new feature, same for libavcodec (with corresponding changes
in doc/APIchanges).

I don't know if we track internal dependencies (to define the minor
libavutil version needed for the new libx264 feature in
libavcodec). What's the current practice here?

Looks good to me otherwise (still it would be good if someone else can
have a look at it).


More information about the ffmpeg-devel mailing list