diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-22 13:11:14 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-24 01:45:38 +0300 |
commit | 8abfc327bd22f2da43aac0c125432ce37e71e6a6 (patch) | |
tree | 8456f4e950a070d08222d922113d75bd98bcb0bd /libavfilter/qp_table.h | |
parent | e142153bd721947c186bc9fe74664d1117265960 (diff) |
avfilter/qp_table: Stop using FF_QSCALE_TYPE_*
All FF_QSCALE_TYPE values used by libavfilter originate
from libavfilter (namely from ff_qp_table_extract());
no value is exchanged between libavcodec and libavutil.
The values that are exchanged (and used in libavfilter)
are of type enum AVVideoEncParamsType.
Therefore this patch stops using said FF_QSCALE_TYPE_*
in libavfilter and uses enum AVVideoEncParamsType
directly.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/qp_table.h')
-rw-r--r-- | libavfilter/qp_table.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavfilter/qp_table.h b/libavfilter/qp_table.h index 169a7a7fea..4407bacb0e 100644 --- a/libavfilter/qp_table.h +++ b/libavfilter/qp_table.h @@ -22,23 +22,24 @@ #include <stdint.h> #include "libavutil/frame.h" -#include "libavcodec/internal.h" +#include "libavutil/video_enc_params.h" /** * Extract a libpostproc-compatible QP table - an 8-bit QP value per 16x16 * macroblock, stored in raster order - from AVVideoEncParams side data. */ int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table_h, - int *qscale_type); + enum AVVideoEncParamsType *qscale_type); /** * Normalize the qscale factor + * FIXME Add support for other values of enum AVVideoEncParamsType + * besides AV_VIDEO_ENC_PARAMS_MPEG2. */ -static inline int ff_norm_qscale(int qscale, int type) +static inline int ff_norm_qscale(int qscale, enum AVVideoEncParamsType type) { switch (type) { - case FF_QSCALE_TYPE_MPEG1: return qscale; - case FF_QSCALE_TYPE_MPEG2: return qscale >> 1; + case AV_VIDEO_ENC_PARAMS_MPEG2: return qscale >> 1; } return qscale; } |