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>
This commit is contained in:
Andreas Rheinhardt
2022-03-22 11:11:14 +01:00
parent e142153bd7
commit 8abfc327bd
7 changed files with 18 additions and 15 deletions

View File

@@ -18,9 +18,6 @@
#include <stdint.h>
// for FF_QSCALE_TYPE_*
#include "libavcodec/internal.h"
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "libavutil/video_enc_params.h"
@@ -28,7 +25,7 @@
#include "qp_table.h"
int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table_h,
int *qscale_type)
enum AVVideoEncParamsType *qscale_type)
{
AVFrameSideData *sd;
AVVideoEncParams *par;
@@ -55,7 +52,7 @@ int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table
if (table_h)
*table_h = mb_h;
if (qscale_type)
*qscale_type = FF_QSCALE_TYPE_MPEG2;
*qscale_type = par->type;
if (par->nb_blocks == 0) {
memset(*table, par->qp, nb_mb);