avcodec/internal: Move FF_QSCALE_TYPE_* to mpegvideodec.h

These values are only used by mpegvideo-based decoders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/5.1
Andreas Rheinhardt 3 years ago
parent 8abfc327bd
commit a9cc413496
  1. 4
      libavcodec/h263dec.c
  2. 3
      libavcodec/internal.h
  3. 4
      libavcodec/mpeg12dec.c
  4. 2
      libavcodec/mpegvideo_dec.c
  5. 3
      libavcodec/mpegvideodec.h
  6. 4
      libavcodec/rv10.c
  7. 4
      libavcodec/rv34.c

@ -695,12 +695,12 @@ frame_end:
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
}
if (s->last_picture_ptr || s->low_delay) {

@ -35,9 +35,6 @@
#include "bsf.h"
#include "config.h"
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
#define FF_SANE_NB_CHANNELS 512U
#if HAVE_SIMD_ALIGN_64

@ -2040,7 +2040,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
if (ret < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG2);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
} else {
/* latency of 1 frame for I- and P-frames */
if (s->last_picture_ptr) {
@ -2048,7 +2048,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
if (ret < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG2);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG2);
}
}

@ -513,7 +513,7 @@ void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict)
int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
{
AVVideoEncParams *par;
int mult = (qp_type == FF_QSCALE_TYPE_MPEG1) ? 2 : 1;
int mult = (qp_type == FF_MPV_QSCALE_TYPE_MPEG1) ? 2 : 1;
unsigned int nb_mb = p->alloc_mb_height * p->alloc_mb_width;
if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS))

@ -35,6 +35,9 @@
#include "mpegvideo.h"
#include "mpegvideodata.h"
#define FF_MPV_QSCALE_TYPE_MPEG1 0
#define FF_MPV_QSCALE_TYPE_MPEG2 1
/**
* Initialize the given MpegEncContext for decoding.
* the changed fields will not depend upon

@ -663,12 +663,12 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict,s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict,s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
}
if (s->last_picture_ptr || s->low_delay) {

@ -1573,13 +1573,13 @@ static int finish_frame(AVCodecContext *avctx, AVFrame *pict)
if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->current_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict, s->current_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
got_picture = 1;
} else if (s->last_picture_ptr) {
if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
return ret;
ff_print_debug_info(s, s->last_picture_ptr, pict);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_QSCALE_TYPE_MPEG1);
ff_mpv_export_qp_table(s, pict, s->last_picture_ptr, FF_MPV_QSCALE_TYPE_MPEG1);
got_picture = 1;
}

Loading…
Cancel
Save