[FFmpeg-devel] [PATCH] Extract QP from h264 encoded videos

Michael Niedermayer michael at niedermayer.cc
Sat Aug 3 22:45:16 EEST 2019


On Thu, Aug 01, 2019 at 04:48:32PM -0700, Juan De León wrote:
> Fixed
> 
> design doc: https://docs.google.com/document/d/1WClt3EqhjwdGXhEw386O0wfn3IBQ1Ib-_5emVM1gbnA/edit?usp=sharing
> 
> Signed-off-by: Juan De León <juandl at google.com>
> ---
>  libavutil/Makefile              |   2 +
>  libavutil/frame.h               |   6 ++
>  libavutil/quantization_params.c |  42 +++++++++++++
>  libavutil/quantization_params.h | 101 ++++++++++++++++++++++++++++++++
>  4 files changed, 151 insertions(+)
>  create mode 100644 libavutil/quantization_params.c
>  create mode 100644 libavutil/quantization_params.h
[...]

> +/**
> + * Data structure for extracting Quantization Parameters, codec independent
> + */
> +typedef struct AVQuantizationParams {
> +    /**
> +     * x and y coordinates of the block in pixels
> +     */
> +    int x, y;
> +    /**
> +     * width and height of the block in pixels
> +     * set to 0 for the last block in the array
> +     */
> +    int w, h;

> +    /**
> +     * qp array, indexed by type according to
> +     * the enum corresponding to the codec
> +     */
> +    int qp_type[AV_QP_ARR_SIZE_AV1];

What happens if a future codec needs more than AV1 ?
i think this would not be extendible without breaking ABI

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190803/8347f370/attachment.sig>


More information about the ffmpeg-devel mailing list