From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 3/6] avcodec/internal: Move FF_QSCALE_TYPE_* to mpegvideodec.h
Date: Tue, 22 Mar 2022 13:34:30 +0100
Message-ID: <AS1PR01MB9564E27F1D378441EC208C098F179@AS1PR01MB9564.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <20220322123433.368717-1-andreas.rheinhardt@outlook.com>
These values are only used by mpegvideo-based decoders.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h263dec.c | 4 ++--
libavcodec/internal.h | 3 ---
libavcodec/mpeg12dec.c | 4 ++--
libavcodec/mpegvideo_dec.c | 2 +-
libavcodec/mpegvideodec.h | 3 +++
libavcodec/rv10.c | 4 ++--
libavcodec/rv34.c | 4 ++--
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 886fbee8c8..965a7d30c4 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.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) {
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index f9809926b8..f9d08fcb60 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -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
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 6b6cadeb05..887b8036f8 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -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);
}
}
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 28e4e5b781..7caaf0596d 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -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))
diff --git a/libavcodec/mpegvideodec.h b/libavcodec/mpegvideodec.h
index 0cda0af733..1af8ebac36 100644
--- a/libavcodec/mpegvideodec.h
+++ b/libavcodec/mpegvideodec.h
@@ -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
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index bd707a391b..23d0ea8516 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -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) {
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 1fb17ddb90..fb5b19c913 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -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;
}
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-03-22 12:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 12:32 [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
2022-03-22 12:34 ` [FFmpeg-devel] [PATCH 2/6] avfilter/qp_table: Stop using FF_QSCALE_TYPE_* Andreas Rheinhardt
[not found] ` <20220322123433.368717-1-andreas.rheinhardt@outlook.com>
2022-03-22 12:34 ` Andreas Rheinhardt [this message]
2022-03-22 12:35 ` [FFmpeg-devel] [PATCH 4/6] avfilter/vf_vpp_qsv: Remove unnecessary lavc and lavf headers Andreas Rheinhardt
2022-03-22 12:35 ` [FFmpeg-devel] [PATCH 5/6] avcodec, avformat: Remove unnecessary inclusions of lavc/internal.h Andreas Rheinhardt
2022-03-22 12:35 ` [FFmpeg-devel] [PATCH 6/6] avformat: Remove unnecessary inclusions from libavcodec Andreas Rheinhardt
2022-03-23 12:04 ` [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS1PR01MB9564E27F1D378441EC208C098F179@AS1PR01MB9564.eurprd01.prod.exchangelabs.com \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git