* [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs
@ 2022-03-22 12:32 Andreas Rheinhardt
2022-03-22 12:34 ` [FFmpeg-devel] [PATCH 2/6] avfilter/qp_table: Stop using FF_QSCALE_TYPE_* Andreas Rheinhardt
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:32 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/internal.h | 2 --
libavfilter/qp_table.h | 4 ----
2 files changed, 6 deletions(-)
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index badca4c9dd..f9809926b8 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -37,8 +37,6 @@
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
-#define FF_QSCALE_TYPE_H264 2
-#define FF_QSCALE_TYPE_VP56 3
#define FF_SANE_NB_CHANNELS 512U
diff --git a/libavfilter/qp_table.h b/libavfilter/qp_table.h
index 4758ee8538..169a7a7fea 100644
--- a/libavfilter/qp_table.h
+++ b/libavfilter/qp_table.h
@@ -33,16 +33,12 @@ int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table
/**
* Normalize the qscale factor
- * FIXME the H264 qscale is a log based scale, mpeg1/2 is not, the code below
- * cannot be optimal
*/
static inline int ff_norm_qscale(int qscale, int type)
{
switch (type) {
case FF_QSCALE_TYPE_MPEG1: return qscale;
case FF_QSCALE_TYPE_MPEG2: return qscale >> 1;
- case FF_QSCALE_TYPE_H264: return qscale >> 2;
- case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2;
}
return qscale;
}
--
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 2/6] avfilter/qp_table: Stop using FF_QSCALE_TYPE_*
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 ` Andreas Rheinhardt
[not found] ` <20220322123433.368717-1-andreas.rheinhardt@outlook.com>
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:34 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
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>
---
libavfilter/qp_table.c | 7 ++-----
libavfilter/qp_table.h | 11 ++++++-----
libavfilter/vf_codecview.c | 3 ++-
libavfilter/vf_fspp.h | 3 ++-
libavfilter/vf_pp7.h | 3 ++-
libavfilter/vf_spp.h | 3 ++-
libavfilter/vf_uspp.c | 3 ++-
7 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/libavfilter/qp_table.c b/libavfilter/qp_table.c
index 33812b708d..8137dc019f 100644
--- a/libavfilter/qp_table.c
+++ b/libavfilter/qp_table.c
@@ -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);
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;
}
diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
index aac038edef..cddb3e5368 100644
--- a/libavfilter/vf_codecview.c
+++ b/libavfilter/vf_codecview.c
@@ -227,7 +227,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVFilterLink *outlink = ctx->outputs[0];
if (s->qp) {
- int qstride, qp_type, ret;
+ enum AVVideoEncParamsType qp_type;
+ int qstride, ret;
int8_t *qp_table;
ret = ff_qp_table_extract(frame, &qp_table, &qstride, NULL, &qp_type);
diff --git a/libavfilter/vf_fspp.h b/libavfilter/vf_fspp.h
index 6623af450c..ee7de3ffef 100644
--- a/libavfilter/vf_fspp.h
+++ b/libavfilter/vf_fspp.h
@@ -23,6 +23,7 @@
#ifndef AVFILTER_FSPP_H
#define AVFILTER_FSPP_H
+#include "libavutil/video_enc_params.h"
#include "avfilter.h"
#define BLOCKSZ 12
@@ -61,7 +62,7 @@ typedef struct FSPPContext {
int vsub;
int temp_stride;
int qp;
- int qscale_type;
+ enum AVVideoEncParamsType qscale_type;
int prev_q;
uint8_t *src;
int16_t *temp;
diff --git a/libavfilter/vf_pp7.h b/libavfilter/vf_pp7.h
index 9aa8d732c1..b7cbb020bb 100644
--- a/libavfilter/vf_pp7.h
+++ b/libavfilter/vf_pp7.h
@@ -22,6 +22,7 @@
#ifndef AVFILTER_PP7_H
#define AVFILTER_PP7_H
+#include "libavutil/video_enc_params.h"
#include "avfilter.h"
typedef struct PP7Context {
@@ -30,7 +31,7 @@ typedef struct PP7Context {
int qp;
int mode;
- int qscale_type;
+ enum AVVideoEncParamsType qscale_type;
int hsub;
int vsub;
int temp_stride;
diff --git a/libavfilter/vf_spp.h b/libavfilter/vf_spp.h
index 76c0c34ab2..0a8b2b512e 100644
--- a/libavfilter/vf_spp.h
+++ b/libavfilter/vf_spp.h
@@ -22,6 +22,7 @@
#ifndef AVFILTER_SPP_H
#define AVFILTER_SPP_H
+#include "libavutil/video_enc_params.h"
#include "libavcodec/avdct.h"
#include "avfilter.h"
@@ -33,7 +34,7 @@ typedef struct SPPContext {
int log2_count;
int qp;
int mode;
- int qscale_type;
+ enum AVVideoEncParamsType qscale_type;
int temp_linesize;
uint8_t *src;
uint16_t *temp;
diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index c61a2a0705..051de00771 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -32,6 +32,7 @@
#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/video_enc_params.h"
#include "libavcodec/avcodec.h"
#include "internal.h"
#include "qp_table.h"
@@ -45,7 +46,7 @@ typedef struct USPPContext {
int log2_count;
int hsub, vsub;
int qp;
- int qscale_type;
+ enum AVVideoEncParamsType qscale_type;
int temp_stride[3];
uint8_t *src[3];
uint16_t *temp[3];
--
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 3/6] avcodec/internal: Move FF_QSCALE_TYPE_* to mpegvideodec.h
[not found] ` <20220322123433.368717-1-andreas.rheinhardt@outlook.com>
@ 2022-03-22 12:34 ` Andreas Rheinhardt
0 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:34 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 4/6] avfilter/vf_vpp_qsv: Remove unnecessary lavc and lavf headers
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:35 ` Andreas Rheinhardt
2022-03-22 12:35 ` [FFmpeg-devel] [PATCH 5/6] avcodec, avformat: Remove unnecessary inclusions of lavc/internal.h Andreas Rheinhardt
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:35 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavfilter/vf_vpp_qsv.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index 5c96703fd3..cfe343822b 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -34,8 +34,6 @@
#include "internal.h"
#include "avfilter.h"
#include "filters.h"
-#include "libavcodec/avcodec.h"
-#include "libavformat/avformat.h"
#include "qsvvpp.h"
#include "transpose.h"
--
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 5/6] avcodec, avformat: Remove unnecessary inclusions of lavc/internal.h
2022-03-22 12:32 [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
` (2 preceding siblings ...)
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 ` 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
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:35 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/parser.c | 1 -
libavcodec/v4l2_buffers.c | 1 -
libavcodec/v4l2_m2m.c | 1 -
libavformat/chromaprint.c | 1 -
libavformat/genh.c | 1 -
libavformat/tls_openssl.c | 1 -
6 files changed, 6 deletions(-)
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 24fe44eb30..49de7e6a57 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -27,7 +27,6 @@
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
-#include "internal.h"
#include "parser.h"
AVCodecParserContext *av_parser_init(int codec_id)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 4b2679eb38..3f5471067a 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -28,7 +28,6 @@
#include <fcntl.h>
#include <poll.h>
#include "libavcodec/avcodec.h"
-#include "libavcodec/internal.h"
#include "libavutil/pixdesc.h"
#include "v4l2_context.h"
#include "v4l2_buffers.h"
diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index cdfd579810..3178ef06b8 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -28,7 +28,6 @@
#include <dirent.h>
#include <fcntl.h>
#include "libavcodec/avcodec.h"
-#include "libavcodec/internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index bcb8315159..3953a5ced3 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -22,7 +22,6 @@
#include "avformat.h"
#include "internal.h"
#include "libavutil/opt.h"
-#include "libavcodec/internal.h"
#include <chromaprint.h>
#define CPR_VERSION_INT AV_VERSION_INT(CHROMAPRINT_VERSION_MAJOR, \
diff --git a/libavformat/genh.c b/libavformat/genh.c
index a85d38dd31..b1c20718f6 100644
--- a/libavformat/genh.c
+++ b/libavformat/genh.c
@@ -21,7 +21,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
-#include "libavcodec/internal.h"
#include "avformat.h"
#include "internal.h"
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
index 1d813cbbb5..8bf766c01f 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -25,7 +25,6 @@
#include "os_support.h"
#include "url.h"
#include "tls.h"
-#include "libavcodec/internal.h"
#include "libavutil/avstring.h"
#include "libavutil/avutil.h"
#include "libavutil/opt.h"
--
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* [FFmpeg-devel] [PATCH 6/6] avformat: Remove unnecessary inclusions from libavcodec
2022-03-22 12:32 [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
` (3 preceding siblings ...)
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 ` Andreas Rheinhardt
2022-03-23 12:04 ` [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-22 12:35 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Also improve the other headers a bit while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/a64.c | 2 +-
libavformat/act.c | 3 ++-
libavformat/apngenc.c | 2 --
libavformat/av1.c | 2 +-
libavformat/flacenc.h | 5 ++---
libavformat/flvdec.c | 5 ++---
libavformat/frmdec.c | 1 -
libavformat/gxf.c | 1 -
libavformat/h261dec.c | 2 +-
libavformat/hls.c | 1 +
libavformat/hls_sample_encryption.c | 1 +
libavformat/hls_sample_encryption.h | 5 +++--
libavformat/icodec.c | 1 -
libavformat/oggparseskeleton.c | 2 +-
libavformat/oggparsespeex.c | 7 +------
libavformat/rsd.c | 1 -
libavformat/rtpdec_dv.c | 4 +---
libavformat/rtpdec_hevc.c | 2 --
libavformat/rtpdec_vp8.c | 4 ++--
19 files changed, 19 insertions(+), 32 deletions(-)
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 6e19162fe2..a66f2542b7 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intreadwrite.h"
#include "libavcodec/codec_id.h"
#include "libavcodec/codec_par.h"
-#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "rawenc.h"
diff --git a/libavformat/act.c b/libavformat/act.c
index fba106c520..6dd9f62a87 100644
--- a/libavformat/act.c
+++ b/libavformat/act.c
@@ -18,11 +18,12 @@
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "avio_internal.h"
#include "riff.h"
#include "internal.h"
-#include "libavcodec/get_bits.h"
#define CHUNK_SIZE 512
#define RIFF_TAG MKTAG('R','I','F','F')
diff --git a/libavformat/apngenc.c b/libavformat/apngenc.c
index 767074ecf3..88d4a41462 100644
--- a/libavformat/apngenc.c
+++ b/libavformat/apngenc.c
@@ -22,14 +22,12 @@
*/
#include "avformat.h"
-#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavcodec/png.h"
-#include "libavcodec/apng.h"
typedef struct APNGMuxContext {
AVClass *class;
diff --git a/libavformat/av1.c b/libavformat/av1.c
index 7caea0c377..79065d0c9f 100644
--- a/libavformat/av1.c
+++ b/libavformat/av1.c
@@ -23,7 +23,7 @@
#include "libavutil/mem.h"
#include "libavcodec/av1.h"
#include "libavcodec/av1_parse.h"
-#include "libavcodec/profiles.h"
+#include "libavcodec/avcodec.h"
#include "libavcodec/put_bits.h"
#include "av1.h"
#include "avio.h"
diff --git a/libavformat/flacenc.h b/libavformat/flacenc.h
index b308d0d021..02937b240d 100644
--- a/libavformat/flacenc.h
+++ b/libavformat/flacenc.h
@@ -22,9 +22,8 @@
#ifndef AVFORMAT_FLACENC_H
#define AVFORMAT_FLACENC_H
-#include "libavcodec/flac.h"
-#include "libavcodec/bytestream.h"
-#include "avformat.h"
+#include <stdint.h>
+#include "avio.h"
int ff_flac_write_header(AVIOContext *pb, const uint8_t *extradata,
int extradata_size, int last_block);
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index cb24b1cc26..0c90748422 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -24,18 +24,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/internal.h"
#include "libavutil/intfloat.h"
+#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
-#include "libavutil/time_internal.h"
-#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "internal.h"
-#include "avio_internal.h"
#include "flv.h"
#define VALIDATE_INDEX_TS_THRESH 2500
diff --git a/libavformat/frmdec.c b/libavformat/frmdec.c
index 478656b037..e6c1179dcd 100644
--- a/libavformat/frmdec.c
+++ b/libavformat/frmdec.c
@@ -24,7 +24,6 @@
* Megalux Frame demuxer
*/
-#include "libavcodec/raw.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index d96e0796f4..e61291382a 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -26,7 +26,6 @@
#include "avformat.h"
#include "internal.h"
#include "gxf.h"
-#include "libavcodec/mpeg12data.h"
struct gxf_stream_info {
int64_t first_field;
diff --git a/libavformat/h261dec.c b/libavformat/h261dec.c
index b5161ff57d..0fca1a340a 100644
--- a/libavformat/h261dec.c
+++ b/libavformat/h261dec.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavcodec/get_bits.h"
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "rawdec.h"
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 0541d3c610..83ff4cc607 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -30,6 +30,7 @@
#include "config_components.h"
#include "libavformat/http.h"
+#include "libavutil/aes.h"
#include "libavutil/avstring.h"
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
diff --git a/libavformat/hls_sample_encryption.c b/libavformat/hls_sample_encryption.c
index 159a6edc6e..08cdf964b6 100644
--- a/libavformat/hls_sample_encryption.c
+++ b/libavformat/hls_sample_encryption.c
@@ -26,6 +26,7 @@
* https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption
*/
+#include "libavutil/aes.h"
#include "libavutil/channel_layout.h"
#include "hls_sample_encryption.h"
diff --git a/libavformat/hls_sample_encryption.h b/libavformat/hls_sample_encryption.h
index ff3f9c22f7..d86eccb74c 100644
--- a/libavformat/hls_sample_encryption.h
+++ b/libavformat/hls_sample_encryption.h
@@ -29,12 +29,13 @@
#ifndef AVFORMAT_HLS_SAMPLE_ENCRYPTION_H
#define AVFORMAT_HLS_SAMPLE_ENCRYPTION_H
+#include <stddef.h>
#include <stdint.h>
+#include "libavcodec/codec_id.h"
+#include "libavcodec/packet.h"
#include "avformat.h"
-#include "libavcodec/avcodec.h"
-#include "libavutil/aes.h"
#define HLS_MAX_ID3_TAGS_DATA_LEN 138
#define HLS_MAX_AUDIO_SETUP_DATA_LEN 10
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 2e677c78f1..290f658d0c 100644
--- a/libavformat/icodec.c
+++ b/libavformat/icodec.c
@@ -26,7 +26,6 @@
#include "libavutil/intreadwrite.h"
#include "libavcodec/bytestream.h"
-#include "libavcodec/bmp.h"
#include "libavcodec/png.h"
#include "avformat.h"
#include "internal.h"
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index 532fa6aefa..2016b16c95 100644
--- a/libavformat/oggparseskeleton.c
+++ b/libavformat/oggparseskeleton.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavcodec/bytestream.h"
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
#include "oggdec.h"
diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index 7d3d653384..d20d14fa41 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -22,13 +22,8 @@
DEALINGS IN THE SOFTWARE.
**/
-#include <stdlib.h>
-
-#include "libavutil/bswap.h"
-#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
-
-#include "libavcodec/bytestream.h"
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 65316f0219..c3b570da22 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavcodec/bytestream.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "avio.h"
diff --git a/libavformat/rtpdec_dv.c b/libavformat/rtpdec_dv.c
index 53a5855ad3..fa75a77a84 100644
--- a/libavformat/rtpdec_dv.c
+++ b/libavformat/rtpdec_dv.c
@@ -21,10 +21,8 @@
#include "libavutil/avstring.h"
-#include "libavcodec/bytestream.h"
-
#include "avio_internal.h"
-#include "rtpdec_formats.h"
+#include "rtpdec.h"
struct PayloadContext {
AVIOContext *buf;
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c
index f467104ca5..a739ed5bd2 100644
--- a/libavformat/rtpdec_hevc.c
+++ b/libavformat/rtpdec_hevc.c
@@ -21,8 +21,6 @@
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
-#include "libavutil/base64.h"
-#include "libavcodec/get_bits.h"
#include "avformat.h"
#include "internal.h"
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index 360dd5c782..6701ad59f9 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -27,10 +27,10 @@
* @see http://tools.ietf.org/html/draft-ietf-payload-vp8-05
*/
-#include "libavcodec/bytestream.h"
+#include "libavutil/intreadwrite.h"
#include "avio_internal.h"
-#include "rtpdec_formats.h"
+#include "rtpdec.h"
struct PayloadContext {
AVIOContext *data;
--
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs
2022-03-22 12:32 [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs Andreas Rheinhardt
` (4 preceding siblings ...)
2022-03-22 12:35 ` [FFmpeg-devel] [PATCH 6/6] avformat: Remove unnecessary inclusions from libavcodec Andreas Rheinhardt
@ 2022-03-23 12:04 ` Andreas Rheinhardt
5 siblings, 0 replies; 7+ messages in thread
From: Andreas Rheinhardt @ 2022-03-23 12:04 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/internal.h | 2 --
> libavfilter/qp_table.h | 4 ----
> 2 files changed, 6 deletions(-)
>
> diff --git a/libavcodec/internal.h b/libavcodec/internal.h
> index badca4c9dd..f9809926b8 100644
> --- a/libavcodec/internal.h
> +++ b/libavcodec/internal.h
> @@ -37,8 +37,6 @@
>
> #define FF_QSCALE_TYPE_MPEG1 0
> #define FF_QSCALE_TYPE_MPEG2 1
> -#define FF_QSCALE_TYPE_H264 2
> -#define FF_QSCALE_TYPE_VP56 3
>
> #define FF_SANE_NB_CHANNELS 512U
>
> diff --git a/libavfilter/qp_table.h b/libavfilter/qp_table.h
> index 4758ee8538..169a7a7fea 100644
> --- a/libavfilter/qp_table.h
> +++ b/libavfilter/qp_table.h
> @@ -33,16 +33,12 @@ int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table
>
> /**
> * Normalize the qscale factor
> - * FIXME the H264 qscale is a log based scale, mpeg1/2 is not, the code below
> - * cannot be optimal
> */
> static inline int ff_norm_qscale(int qscale, int type)
> {
> switch (type) {
> case FF_QSCALE_TYPE_MPEG1: return qscale;
> case FF_QSCALE_TYPE_MPEG2: return qscale >> 1;
> - case FF_QSCALE_TYPE_H264: return qscale >> 2;
> - case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2;
> }
> return qscale;
> }
Will apply this patchset tomorrow unless there are objections.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-23 12:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [FFmpeg-devel] [PATCH 3/6] avcodec/internal: Move FF_QSCALE_TYPE_* to mpegvideodec.h Andreas Rheinhardt
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
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