* [FFmpeg-devel] [PATCH v2 01/18] avcodec/h264dec: Move find_start_code() to its only user
@ 2022-01-24 20:00 Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 02/18] avcodec/h264dec: Move pack8to16 " Andreas Rheinhardt
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
0 siblings, 2 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:00 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_parser.c | 9 +++++++++
libavcodec/h264dec.h | 11 -----------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index cfbf6f4486..881cab7536 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -64,6 +64,15 @@ typedef struct H264ParseContext {
int last_frame_num, last_picture_structure;
} H264ParseContext;
+static int find_start_code(const uint8_t *buf, int buf_size,
+ int buf_index, int next_avc)
+{
+ uint32_t state = -1;
+
+ buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1;
+
+ return FFMIN(buf_index, buf_size);
+}
static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
int buf_size, void *logctx)
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 87c4e4e539..1128dddfd1 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -44,7 +44,6 @@
#include "h264pred.h"
#include "h264qpel.h"
#include "h274.h"
-#include "internal.h"
#include "mpegutils.h"
#include "parser.h"
#include "qpeldsp.h"
@@ -833,16 +832,6 @@ static av_always_inline int get_dct8x8_allowed(const H264Context *h, H264SliceCo
0x0001000100010001ULL));
}
-static inline int find_start_code(const uint8_t *buf, int buf_size,
- int buf_index, int next_avc)
-{
- uint32_t state = -1;
-
- buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1;
-
- return FFMIN(buf_index, buf_size);
-}
-
int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup);
int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src);
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 02/18] avcodec/h264dec: Move pack8to16 to its only user
2022-01-24 20:00 [FFmpeg-devel] [PATCH v2 01/18] avcodec/h264dec: Move find_start_code() to its only user Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
1 sibling, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Namely to h264_cabac.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_cabac.c | 9 +++++++++
libavcodec/h264dec.h | 9 ---------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 040fa0a257..884d392022 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1281,6 +1281,15 @@ void ff_h264_init_cabac_states(const H264Context *h, H264SliceContext *sl)
}
}
+static av_always_inline uint16_t pack8to16(unsigned a, unsigned b)
+{
+#if HAVE_BIGENDIAN
+ return (b & 0xFF) + (a << 8);
+#else
+ return (a & 0xFF) + (b << 8);
+#endif
+}
+
static int decode_cabac_field_decoding_flag(const H264Context *h, H264SliceContext *sl)
{
const int mbb_xy = sl->mb_xy - 2*h->mb_stride;
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 1128dddfd1..dffd723ba6 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -685,15 +685,6 @@ static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
#endif
}
-static av_always_inline uint16_t pack8to16(unsigned a, unsigned b)
-{
-#if HAVE_BIGENDIAN
- return (b & 0xFF) + (a << 8);
-#else
- return (a & 0xFF) + (b << 8);
-#endif
-}
-
/**
* Get the chroma qp.
*/
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 03/18] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Andreas Rheinhardt
` (16 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
They apparently serve the same purpose; the latter is one larger and has
a comment explaining how the value is derived, so seems more
trustworthy.
---
libavcodec/h264_parser.c | 2 +-
libavcodec/h264_refs.c | 2 +-
libavcodec/h264dec.h | 6 ++----
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 881cab7536..aee7cdb934 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -219,7 +219,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag
int i;
- for (i = 0; i < MAX_MMCO_COUNT; i++) {
+ for (i = 0; i < H264_MAX_MMCO_COUNT; i++) {
MMCOOpcode opcode = get_ue_golomb_31(gb);
if (opcode > (unsigned) MMCO_LONG) {
av_log(logctx, AV_LOG_ERROR,
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index dae8bd278a..93526b11e2 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -849,7 +849,7 @@ int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
} else {
sl->explicit_ref_marking = get_bits1(gb);
if (sl->explicit_ref_marking) {
- for (i = 0; i < MAX_MMCO_COUNT; i++) {
+ for (i = 0; i < FF_ARRAY_ELEMS(sl->mmco); i++) {
MMCOOpcode opcode = get_ue_golomb_31(gb);
mmco[i].opcode = opcode;
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index dffd723ba6..38a4e96e26 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -52,8 +52,6 @@
#define H264_MAX_PICTURE_COUNT 36
-#define MAX_MMCO_COUNT 66
-
#define MAX_DELAYED_PIC_COUNT 16
/* Compiling in interlaced support reduces the speed
@@ -330,7 +328,7 @@ typedef struct H264SliceContext {
uint8_t cabac_state[1024];
int cabac_init_idc;
- MMCO mmco[MAX_MMCO_COUNT];
+ MMCO mmco[H264_MAX_MMCO_COUNT];
int nb_mmco;
int explicit_ref_marking;
@@ -489,7 +487,7 @@ typedef struct H264Context {
/**
* memory management control operations buffer.
*/
- MMCO mmco[MAX_MMCO_COUNT];
+ MMCO mmco[H264_MAX_MMCO_COUNT];
int nb_mmco;
int mmco_reset;
int explicit_ref_marking;
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 03/18] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 05/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriate Andreas Rheinhardt
` (15 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
Both parser and decoder use these, so h264_parse is the proper place for
them.
---
libavcodec/h264_parse.h | 13 +++++++++++++
libavcodec/h264dec.h | 13 -------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h
index 4d01620125..05732326d3 100644
--- a/libavcodec/h264_parse.h
+++ b/libavcodec/h264_parse.h
@@ -27,6 +27,19 @@
#include "get_bits.h"
#include "h264_ps.h"
+/**
+ * Memory management control operation opcode.
+ */
+typedef enum MMCOOpcode {
+ MMCO_END = 0,
+ MMCO_SHORT2UNUSED,
+ MMCO_LONG2UNUSED,
+ MMCO_SHORT2LONG,
+ MMCO_SET_MAX_LONG,
+ MMCO_RESET,
+ MMCO_LONG,
+} MMCOOpcode;
+
typedef struct H264PredWeightTable {
int use_weight;
int use_weight_chroma;
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 38a4e96e26..c7662f930e 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -102,19 +102,6 @@
#define IS_REF0(a) ((a) & MB_TYPE_REF0)
#define IS_8x8DCT(a) ((a) & MB_TYPE_8x8DCT)
-/**
- * Memory management control operation opcode.
- */
-typedef enum MMCOOpcode {
- MMCO_END = 0,
- MMCO_SHORT2UNUSED,
- MMCO_LONG2UNUSED,
- MMCO_SHORT2LONG,
- MMCO_SET_MAX_LONG,
- MMCO_RESET,
- MMCO_LONG,
-} MMCOOpcode;
-
/**
* Memory management control operation.
*/
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 05/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriate
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 03/18] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 06/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMES Andreas Rheinhardt
` (14 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/h264_refs.c | 2 +-
libavcodec/h264_slice.c | 2 +-
libavcodec/h264dec.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 93526b11e2..94b473257f 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -729,7 +729,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
h->poc.frame_num = h->cur_pic_ptr->frame_num = 0;
h->mmco_reset = 1;
h->cur_pic_ptr->mmco_reset = 1;
- for (j = 0; j < MAX_DELAYED_PIC_COUNT; j++)
+ for (j = 0; j < FF_ARRAY_ELEMS(h->last_pocs); j++)
h->last_pocs[j] = INT_MIN;
break;
default: av_assert0(0);
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 4833282191..d6d4497fc9 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -428,7 +428,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
copy_picture_range(h->short_ref, h1->short_ref, 32, h, h1);
copy_picture_range(h->long_ref, h1->long_ref, 32, h, h1);
copy_picture_range(h->delayed_pic, h1->delayed_pic,
- MAX_DELAYED_PIC_COUNT + 2, h, h1);
+ FF_ARRAY_ELEMS(h->delayed_pic), h, h1);
h->frame_recovered = h1->frame_recovered;
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 7f10026340..3706ae0e31 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -308,7 +308,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->sei.unregistered.x264_build = -1;
h->next_outputed_poc = INT_MIN;
- for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
+ for (i = 0; i < FF_ARRAY_ELEMS(h->last_pocs); i++)
h->last_pocs[i] = INT_MIN;
ff_h264_sei_uninit(&h->sei);
@@ -445,7 +445,7 @@ static void idr(H264Context *h)
h->poc.prev_frame_num_offset = 0;
h->poc.prev_poc_msb = 1<<16;
h->poc.prev_poc_lsb = -1;
- for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++)
+ for (i = 0; i < FF_ARRAY_ELEMS(h->last_pocs); i++)
h->last_pocs[i] = INT_MIN;
}
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 06/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMES
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (2 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 05/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriate Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 07/18] lavc/h264_parser: add missing headers Andreas Rheinhardt
` (13 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/h264_ps.c | 4 ++--
libavcodec/h264_slice.c | 12 ++++++------
libavcodec/h264dec.h | 6 ++----
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index e21c2b56ac..f68d5bf81c 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -485,7 +485,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
sps->ref_frame_count = get_ue_golomb_31(gb);
if (avctx->codec_tag == MKTAG('S', 'M', 'V', '2'))
sps->ref_frame_count = FFMAX(2, sps->ref_frame_count);
- if (sps->ref_frame_count > MAX_DELAYED_PIC_COUNT) {
+ if (sps->ref_frame_count > H264_MAX_DPB_FRAMES) {
av_log(avctx, AV_LOG_ERROR,
"too many reference frames %d\n", sps->ref_frame_count);
goto fail;
@@ -590,7 +590,7 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
* level */
if (!sps->bitstream_restriction_flag &&
(sps->ref_frame_count || avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)) {
- sps->num_reorder_frames = MAX_DELAYED_PIC_COUNT - 1;
+ sps->num_reorder_frames = H264_MAX_DPB_FRAMES - 1;
for (i = 0; i < FF_ARRAY_ELEMS(level_max_dpb_mbs); i++) {
if (level_max_dpb_mbs[i][0] == sps->level_idc) {
sps->num_reorder_frames = FFMIN(level_max_dpb_mbs[i][1] / (sps->mb_width * sps->mb_height),
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index d6d4497fc9..32df9fd3ae 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1456,7 +1456,7 @@ static int h264_select_output_frame(H264Context *h)
}
for (i = 0; 1; i++) {
- if(i == MAX_DELAYED_PIC_COUNT || cur->poc < h->last_pocs[i]){
+ if(i == H264_MAX_DPB_FRAMES || cur->poc < h->last_pocs[i]){
if(i)
h->last_pocs[i-1] = cur->poc;
break;
@@ -1464,13 +1464,13 @@ static int h264_select_output_frame(H264Context *h)
h->last_pocs[i-1]= h->last_pocs[i];
}
}
- out_of_order = MAX_DELAYED_PIC_COUNT - i;
+ out_of_order = H264_MAX_DPB_FRAMES - i;
if( cur->f->pict_type == AV_PICTURE_TYPE_B
- || (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - (int64_t)h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 2))
+ || (h->last_pocs[H264_MAX_DPB_FRAMES-2] > INT_MIN && h->last_pocs[H264_MAX_DPB_FRAMES-1] - (int64_t)h->last_pocs[H264_MAX_DPB_FRAMES-2] > 2))
out_of_order = FFMAX(out_of_order, 1);
- if (out_of_order == MAX_DELAYED_PIC_COUNT) {
+ if (out_of_order == H264_MAX_DPB_FRAMES) {
av_log(h->avctx, AV_LOG_VERBOSE, "Invalid POC %d<%d\n", cur->poc, h->last_pocs[0]);
- for (i = 1; i < MAX_DELAYED_PIC_COUNT; i++)
+ for (i = 1; i < H264_MAX_DPB_FRAMES; i++)
h->last_pocs[i] = INT_MIN;
h->last_pocs[0] = cur->poc;
cur->mmco_reset = 1;
@@ -1484,7 +1484,7 @@ static int h264_select_output_frame(H264Context *h)
while (h->delayed_pic[pics])
pics++;
- av_assert0(pics <= MAX_DELAYED_PIC_COUNT);
+ av_assert0(pics <= H264_MAX_DPB_FRAMES);
h->delayed_pic[pics++] = cur;
if (cur->reference == 0)
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index c7662f930e..7553dd808c 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -52,8 +52,6 @@
#define H264_MAX_PICTURE_COUNT 36
-#define MAX_DELAYED_PIC_COUNT 16
-
/* Compiling in interlaced support reduces the speed
* of progressive decoding by about 2%. */
#define ALLOW_INTERLACE
@@ -465,8 +463,8 @@ typedef struct H264Context {
H264Ref default_ref[2];
H264Picture *short_ref[32];
H264Picture *long_ref[32];
- H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size?
- int last_pocs[MAX_DELAYED_PIC_COUNT];
+ H264Picture *delayed_pic[H264_MAX_DPB_FRAMES + 2]; // FIXME size?
+ int last_pocs[H264_MAX_DPB_FRAMES];
H264Picture *next_output_pic;
int next_outputed_poc;
int poc_offset; ///< PicOrderCnt_offset from SMPTE RDD-2006
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 07/18] lavc/h264_parser: add missing headers
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (3 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 06/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMES Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 08/18] lavc/h264: move some shared code from h264dec to h264_parse Andreas Rheinhardt
` (12 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/h264_parser.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index aee7cdb934..4002bcad77 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -40,8 +40,11 @@
#include "get_bits.h"
#include "golomb.h"
#include "h264.h"
+#include "h264dsp.h"
+#include "h264_parse.h"
#include "h264_sei.h"
#include "h264_ps.h"
+#include "h2645_parse.h"
#include "h264data.h"
#include "internal.h"
#include "mpegutils.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 08/18] lavc/h264: move some shared code from h264dec to h264_parse
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (4 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 07/18] lavc/h264_parser: add missing headers Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 09/18] lavc/h264data.h: stop including h264dec.h Andreas Rheinhardt
` (11 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/h264_parse.h | 32 ++++++++++++++++++++++++++++++++
libavcodec/h264dec.h | 26 --------------------------
tests/checkasm/h264dsp.c | 1 +
3 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h
index 05732326d3..52b224f4c5 100644
--- a/libavcodec/h264_parse.h
+++ b/libavcodec/h264_parse.h
@@ -24,9 +24,32 @@
#ifndef AVCODEC_H264_PARSE_H
#define AVCODEC_H264_PARSE_H
+#include "config.h"
+
+#include <stdint.h>
+
+#include "libavutil/attributes.h"
+
#include "get_bits.h"
#include "h264_ps.h"
+// This table must be here because scan8[constant] must be known at compiletime
+static const uint8_t scan8[16 * 3 + 3] = {
+ 4 + 1 * 8, 5 + 1 * 8, 4 + 2 * 8, 5 + 2 * 8,
+ 6 + 1 * 8, 7 + 1 * 8, 6 + 2 * 8, 7 + 2 * 8,
+ 4 + 3 * 8, 5 + 3 * 8, 4 + 4 * 8, 5 + 4 * 8,
+ 6 + 3 * 8, 7 + 3 * 8, 6 + 4 * 8, 7 + 4 * 8,
+ 4 + 6 * 8, 5 + 6 * 8, 4 + 7 * 8, 5 + 7 * 8,
+ 6 + 6 * 8, 7 + 6 * 8, 6 + 7 * 8, 7 + 7 * 8,
+ 4 + 8 * 8, 5 + 8 * 8, 4 + 9 * 8, 5 + 9 * 8,
+ 6 + 8 * 8, 7 + 8 * 8, 6 + 9 * 8, 7 + 9 * 8,
+ 4 + 11 * 8, 5 + 11 * 8, 4 + 12 * 8, 5 + 12 * 8,
+ 6 + 11 * 8, 7 + 11 * 8, 6 + 12 * 8, 7 + 12 * 8,
+ 4 + 13 * 8, 5 + 13 * 8, 4 + 14 * 8, 5 + 14 * 8,
+ 6 + 13 * 8, 7 + 13 * 8, 6 + 14 * 8, 7 + 14 * 8,
+ 0 + 0 * 8, 0 + 5 * 8, 0 + 10 * 8
+};
+
/**
* Memory management control operation opcode.
*/
@@ -103,4 +126,13 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps,
*/
int ff_h264_get_profile(const SPS *sps);
+static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
+{
+#if HAVE_BIGENDIAN
+ return (b & 0xFFFF) + (a << 16);
+#else
+ return (a & 0xFFFF) + (b << 16);
+#endif
+}
+
#endif /* AVCODEC_H264_PARSE_H */
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 7553dd808c..5266420fa1 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -642,32 +642,6 @@ void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl, int mb_x, int
#define LUMA_DC_BLOCK_INDEX 48
#define CHROMA_DC_BLOCK_INDEX 49
-// This table must be here because scan8[constant] must be known at compiletime
-static const uint8_t scan8[16 * 3 + 3] = {
- 4 + 1 * 8, 5 + 1 * 8, 4 + 2 * 8, 5 + 2 * 8,
- 6 + 1 * 8, 7 + 1 * 8, 6 + 2 * 8, 7 + 2 * 8,
- 4 + 3 * 8, 5 + 3 * 8, 4 + 4 * 8, 5 + 4 * 8,
- 6 + 3 * 8, 7 + 3 * 8, 6 + 4 * 8, 7 + 4 * 8,
- 4 + 6 * 8, 5 + 6 * 8, 4 + 7 * 8, 5 + 7 * 8,
- 6 + 6 * 8, 7 + 6 * 8, 6 + 7 * 8, 7 + 7 * 8,
- 4 + 8 * 8, 5 + 8 * 8, 4 + 9 * 8, 5 + 9 * 8,
- 6 + 8 * 8, 7 + 8 * 8, 6 + 9 * 8, 7 + 9 * 8,
- 4 + 11 * 8, 5 + 11 * 8, 4 + 12 * 8, 5 + 12 * 8,
- 6 + 11 * 8, 7 + 11 * 8, 6 + 12 * 8, 7 + 12 * 8,
- 4 + 13 * 8, 5 + 13 * 8, 4 + 14 * 8, 5 + 14 * 8,
- 6 + 13 * 8, 7 + 13 * 8, 6 + 14 * 8, 7 + 14 * 8,
- 0 + 0 * 8, 0 + 5 * 8, 0 + 10 * 8
-};
-
-static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
-{
-#if HAVE_BIGENDIAN
- return (b & 0xFFFF) + (a << 16);
-#else
- return (a & 0xFFFF) + (b << 16);
-#endif
-}
-
/**
* Get the chroma qp.
*/
diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c
index 7392452957..3c95f9d74d 100644
--- a/tests/checkasm/h264dsp.c
+++ b/tests/checkasm/h264dsp.c
@@ -23,6 +23,7 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/h264dsp.h"
#include "libavcodec/h264data.h"
+#include "libavcodec/h264_parse.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 09/18] lavc/h264data.h: stop including h264dec.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (5 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 08/18] lavc/h264: move some shared code from h264dec to h264_parse Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 10/18] lavc/h264_parse: " Andreas Rheinhardt
` (10 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
This header does not need anything from there.
---
libavcodec/h264data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264data.h b/libavcodec/h264data.h
index 2968b08b7e..988352aa9a 100644
--- a/libavcodec/h264data.h
+++ b/libavcodec/h264data.h
@@ -21,7 +21,7 @@
#include <stdint.h>
-#include "h264dec.h"
+#include "h264.h"
extern const uint8_t ff_h264_golomb_to_pict_type[5];
extern const uint8_t ff_h264_golomb_to_intra4x4_cbp[48];
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 10/18] lavc/h264_parse: stop including h264dec.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (6 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 09/18] lavc/h264data.h: stop including h264dec.h Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 11/18] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse Andreas Rheinhardt
` (9 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
It is unnecessary and only files that are parts of the decoder (as
opposed to standalone code called by the decoder) are allowed to include
h264dec.h
---
libavcodec/h264_parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index 1c1d1c04b0..97ddf0e437 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -20,9 +20,11 @@
#include "get_bits.h"
#include "golomb.h"
#include "h264.h"
-#include "h264dec.h"
+#include "h264pred.h"
#include "h264_parse.h"
#include "h264_ps.h"
+#include "h2645_parse.h"
+#include "mpegutils.h"
int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
const int *ref_count, int slice_type_nos,
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 11/18] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (7 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 10/18] lavc/h264_parse: " Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 12/18] lavc/vdpau: stop unnecessarily including h264dec Andreas Rheinhardt
` (8 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
Allows to stop including h264dec.h in h264data.c.
---
libavcodec/h264_parse.h | 3 +++
libavcodec/h264data.c | 2 +-
libavcodec/h264dec.h | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h
index 52b224f4c5..201d983952 100644
--- a/libavcodec/h264_parse.h
+++ b/libavcodec/h264_parse.h
@@ -33,6 +33,9 @@
#include "get_bits.h"
#include "h264_ps.h"
+#define MB_TYPE_REF0 MB_TYPE_ACPRED // dirty but it fits in 16 bit
+#define MB_TYPE_8x8DCT 0x01000000
+
// This table must be here because scan8[constant] must be known at compiletime
static const uint8_t scan8[16 * 3 + 3] = {
4 + 1 * 8, 5 + 1 * 8, 4 + 2 * 8, 5 + 2 * 8,
diff --git a/libavcodec/h264data.c b/libavcodec/h264data.c
index eb8728a9db..3e9e68cb04 100644
--- a/libavcodec/h264data.c
+++ b/libavcodec/h264data.c
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
-#include "h264dec.h"
+#include "h264_parse.h"
#include "h264data.h"
#include "mpegutils.h"
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 5266420fa1..f623d60893 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -95,8 +95,6 @@
#define CHROMA422(h) ((h)->ps.sps->chroma_format_idc == 2)
#define CHROMA444(h) ((h)->ps.sps->chroma_format_idc == 3)
-#define MB_TYPE_REF0 MB_TYPE_ACPRED // dirty but it fits in 16 bit
-#define MB_TYPE_8x8DCT 0x01000000
#define IS_REF0(a) ((a) & MB_TYPE_REF0)
#define IS_8x8DCT(a) ((a) & MB_TYPE_8x8DCT)
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 12/18] lavc/vdpau: stop unnecessarily including h264dec
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (8 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 11/18] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 13/18] lavc/x86/h264_qpel: " Andreas Rheinhardt
` (7 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/vdpau.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 7c29746adb..f96ac15e2a 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -26,7 +26,6 @@
#include "avcodec.h"
#include "decode.h"
#include "internal.h"
-#include "h264dec.h"
#include "vc1.h"
#include "vdpau.h"
#include "vdpau_internal.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 13/18] lavc/x86/h264_qpel: stop unnecessarily including h264dec
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (9 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 12/18] lavc/vdpau: stop unnecessarily including h264dec Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Andreas Rheinhardt
` (6 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
---
libavcodec/x86/h264_qpel.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index 320d98933a..dda50ded89 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -24,7 +24,6 @@
#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
-#include "libavcodec/h264dec.h"
#include "libavcodec/h264qpel.h"
#include "libavcodec/pixels.h"
#include "fpel.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (10 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 13/18] lavc/x86/h264_qpel: " Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 15/18] avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions Andreas Rheinhardt
` (5 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Anton Khirnov
From: Anton Khirnov <anton@khirnov.net>
The only thing that is actually used directly from there is the
PART_NOT_AVAILABLE constant, which can be trivially copied to svq3
decoder itself.
Otherwise it only depends on other indirectly included headers.
---
libavcodec/svq3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index a3f434ff8d..f06404da9d 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -49,13 +49,16 @@
#include "internal.h"
#include "avcodec.h"
#include "mpegutils.h"
-#include "h264dec.h"
#include "h264data.h"
+#include "h264dsp.h"
+#include "h264pred.h"
+#include "h264_parse.h"
#include "golomb.h"
#include "hpeldsp.h"
#include "mathops.h"
#include "rectangle.h"
#include "tpeldsp.h"
+#include "videodsp.h"
#if CONFIG_ZLIB
#include <zlib.h>
@@ -63,6 +66,8 @@
#include "svq1.h"
+#define PART_NOT_AVAILABLE -2
+
/**
* @file
* svq3 decoder.
--
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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 15/18] avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (11 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 16/18] avcodec/h264dec: Remove unnecessary headers Andreas Rheinhardt
` (4 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
This is only needed by h264_cabac.c and h264_cavlc.c.
Also fix up the other headers while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_picture.c | 9 ---------
libavcodec/h264_slice.c | 3 +--
libavcodec/h264dec.c | 9 ---------
3 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index adf8a32378..dcd5874c2e 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -26,19 +26,10 @@
*/
#include "libavutil/avassert.h"
-#include "libavutil/imgutils.h"
-#include "internal.h"
-#include "cabac.h"
-#include "cabac_functions.h"
#include "error_resilience.h"
#include "avcodec.h"
#include "h264dec.h"
-#include "h264data.h"
-#include "h264chroma.h"
-#include "h264_mvpred.h"
-#include "mathops.h"
#include "mpegutils.h"
-#include "rectangle.h"
#include "thread.h"
void ff_h264_unref_picture(H264Context *h, H264Picture *pic)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 32df9fd3ae..dc636c5e78 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -27,8 +27,8 @@
#include "libavutil/avassert.h"
#include "libavutil/display.h"
-#include "libavutil/imgutils.h"
#include "libavutil/film_grain_params.h"
+#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
#include "libavutil/timecode.h"
#include "internal.h"
@@ -40,7 +40,6 @@
#include "h264dec.h"
#include "h264data.h"
#include "h264chroma.h"
-#include "h264_mvpred.h"
#include "h264_ps.h"
#include "golomb.h"
#include "mathops.h"
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 3706ae0e31..ed9a74b0c6 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -28,29 +28,20 @@
#define UNCHECKED_BITSTREAM_READER 1
#include "libavutil/avassert.h"
-#include "libavutil/display.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
-#include "libavutil/stereo3d.h"
#include "libavutil/video_enc_params.h"
#include "internal.h"
-#include "bytestream.h"
-#include "cabac.h"
-#include "cabac_functions.h"
#include "error_resilience.h"
#include "avcodec.h"
#include "h264.h"
#include "h264dec.h"
#include "h2645_parse.h"
#include "h264data.h"
-#include "h264chroma.h"
-#include "h264_mvpred.h"
#include "h264_ps.h"
#include "golomb.h"
#include "hwconfig.h"
-#include "mathops.h"
-#include "me_cmp.h"
#include "mpegutils.h"
#include "profiles.h"
#include "rectangle.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 16/18] avcodec/h264dec: Remove unnecessary headers
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (12 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 15/18] avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 17/18] avcodec/h264_*: Remove unnecessary internal.h inclusions Andreas Rheinhardt
` (3 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
E.g. the inclusion of parser.h comes from a time when
the parser used a H264Context.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264dec.c | 1 +
libavcodec/h264dec.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index ed9a74b0c6..a47caa95e8 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -30,6 +30,7 @@
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
+#include "libavutil/thread.h"
#include "libavutil/video_enc_params.h"
#include "internal.h"
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index f623d60893..79835e2d09 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -31,7 +31,6 @@
#include "libavutil/buffer.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"
-#include "libavutil/thread.h"
#include "cabac.h"
#include "error_resilience.h"
@@ -45,8 +44,6 @@
#include "h264qpel.h"
#include "h274.h"
#include "mpegutils.h"
-#include "parser.h"
-#include "qpeldsp.h"
#include "rectangle.h"
#include "videodsp.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 17/18] avcodec/h264_*: Remove unnecessary internal.h inclusions
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (13 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 16/18] avcodec/h264dec: Remove unnecessary headers Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 18/18] avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h Andreas Rheinhardt
` (2 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Also remove some other unnecessary headers while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_cabac.c | 1 -
libavcodec/h264_cavlc.c | 1 -
libavcodec/h264_direct.c | 1 -
libavcodec/h264_loopfilter.c | 3 ---
libavcodec/h264_mvpred.h | 2 --
5 files changed, 8 deletions(-)
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 884d392022..703b27aa96 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -34,7 +34,6 @@
#include "config.h"
#include "cabac.h"
#include "cabac_functions.h"
-#include "internal.h"
#include "h264dec.h"
#include "h264data.h"
#include "h264_mvpred.h"
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
index fa8ba5dac7..9191df0303 100644
--- a/libavcodec/h264_cavlc.c
+++ b/libavcodec/h264_cavlc.c
@@ -28,7 +28,6 @@
#define CABAC(h) 0
#define UNCHECKED_BITSTREAM_READER 1
-#include "internal.h"
#include "h264dec.h"
#include "h264_mvpred.h"
#include "h264data.h"
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 8f07981130..93c2e1e438 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -25,7 +25,6 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
-#include "internal.h"
#include "avcodec.h"
#include "h264dec.h"
#include "h264_ps.h"
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 558ec6c02d..2440cfa831 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -28,13 +28,10 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"
-#include "internal.h"
#include "avcodec.h"
#include "h264dec.h"
#include "h264_ps.h"
-#include "mathops.h"
#include "mpegutils.h"
-#include "rectangle.h"
/* Deblocking filter (p153) */
static const uint8_t alpha_table[52*3] = {
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 19d9ee462d..46ae2738f9 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -28,8 +28,6 @@
#ifndef AVCODEC_H264_MVPRED_H
#define AVCODEC_H264_MVPRED_H
-#include "internal.h"
-#include "avcodec.h"
#include "h264dec.h"
#include "mpegutils.h"
#include "libavutil/avassert.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] 21+ messages in thread
* [FFmpeg-devel] [PATCH v2 18/18] avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (14 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 17/18] avcodec/h264_*: Remove unnecessary internal.h inclusions Andreas Rheinhardt
@ 2022-01-24 20:09 ` Andreas Rheinhardt
2022-01-26 11:02 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Anton Khirnov
2022-01-26 11:05 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Anton Khirnov
17 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-24 20:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
It is a more fitting place for it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/h264_parse.h | 5 -----
libavcodec/h264_ps.h | 5 +++++
libavcodec/mediacodecdec.c | 1 +
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/h264_parse.h b/libavcodec/h264_parse.h
index 201d983952..4ee863df66 100644
--- a/libavcodec/h264_parse.h
+++ b/libavcodec/h264_parse.h
@@ -124,11 +124,6 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps,
int *is_avc, int *nal_length_size,
int err_recognition, void *logctx);
-/**
- * compute profile from sps
- */
-int ff_h264_get_profile(const SPS *sps);
-
static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
{
#if HAVE_BIGENDIAN
diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h
index 3f1ab72e38..dc52835ed4 100644
--- a/libavcodec/h264_ps.h
+++ b/libavcodec/h264_ps.h
@@ -152,6 +152,11 @@ typedef struct H264ParamSets {
int overread_warning_printed[2];
} H264ParamSets;
+/**
+ * compute profile from sps
+ */
+int ff_h264_get_profile(const SPS *sps);
+
/**
* Decode SPS
*/
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index 04d5026e68..e8af00ec00 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -33,6 +33,7 @@
#include "avcodec.h"
#include "decode.h"
#include "h264_parse.h"
+#include "h264_ps.h"
#include "hevc_parse.h"
#include "hwconfig.h"
#include "internal.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] 21+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (15 preceding siblings ...)
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 18/18] avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h Andreas Rheinhardt
@ 2022-01-26 11:02 ` Anton Khirnov
2022-01-26 11:05 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Anton Khirnov
17 siblings, 0 replies; 21+ messages in thread
From: Anton Khirnov @ 2022-01-26 11:02 UTC (permalink / raw)
To: ffmpeg-devel
Quoting Andreas Rheinhardt (2022-01-24 21:09:17)
> From: Anton Khirnov <anton@khirnov.net>
>
> Both parser and decoder use these, so h264_parse is the proper place for
^^^^^
it
--
Anton Khirnov
_______________________________________________
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] 21+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
` (16 preceding siblings ...)
2022-01-26 11:02 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Anton Khirnov
@ 2022-01-26 11:05 ` Anton Khirnov
2022-01-26 14:04 ` Andreas Rheinhardt
17 siblings, 1 reply; 21+ messages in thread
From: Anton Khirnov @ 2022-01-26 11:05 UTC (permalink / raw)
To: ffmpeg-devel
Quoting Andreas Rheinhardt (2022-01-24 21:09:27)
> From: Anton Khirnov <anton@khirnov.net>
>
> The only thing that is actually used directly from there is the
> PART_NOT_AVAILABLE constant, which can be trivially copied to svq3
> decoder itself.
>
> Otherwise it only depends on other indirectly included headers.
> ---
> libavcodec/svq3.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
> index a3f434ff8d..f06404da9d 100644
> --- a/libavcodec/svq3.c
> +++ b/libavcodec/svq3.c
> @@ -49,13 +49,16 @@
> #include "internal.h"
> #include "avcodec.h"
> #include "mpegutils.h"
> -#include "h264dec.h"
> #include "h264data.h"
> +#include "h264dsp.h"
> +#include "h264pred.h"
> +#include "h264_parse.h"
> #include "golomb.h"
> #include "hpeldsp.h"
> #include "mathops.h"
> #include "rectangle.h"
> #include "tpeldsp.h"
> +#include "videodsp.h"
>
> #if CONFIG_ZLIB
> #include <zlib.h>
> @@ -63,6 +66,8 @@
>
> #include "svq1.h"
>
> +#define PART_NOT_AVAILABLE -2
Didn't you want to move it to h264pred? I'm fine with that.
--
Anton Khirnov
_______________________________________________
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] 21+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h
2022-01-26 11:05 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Anton Khirnov
@ 2022-01-26 14:04 ` Andreas Rheinhardt
0 siblings, 0 replies; 21+ messages in thread
From: Andreas Rheinhardt @ 2022-01-26 14:04 UTC (permalink / raw)
To: ffmpeg-devel
Anton Khirnov:
> Quoting Andreas Rheinhardt (2022-01-24 21:09:27)
>> From: Anton Khirnov <anton@khirnov.net>
>>
>> The only thing that is actually used directly from there is the
>> PART_NOT_AVAILABLE constant, which can be trivially copied to svq3
>> decoder itself.
>>
>> Otherwise it only depends on other indirectly included headers.
>> ---
>> libavcodec/svq3.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
>> index a3f434ff8d..f06404da9d 100644
>> --- a/libavcodec/svq3.c
>> +++ b/libavcodec/svq3.c
>> @@ -49,13 +49,16 @@
>> #include "internal.h"
>> #include "avcodec.h"
>> #include "mpegutils.h"
>> -#include "h264dec.h"
>> #include "h264data.h"
>> +#include "h264dsp.h"
>> +#include "h264pred.h"
>> +#include "h264_parse.h"
>> #include "golomb.h"
>> #include "hpeldsp.h"
>> #include "mathops.h"
>> #include "rectangle.h"
>> #include "tpeldsp.h"
>> +#include "videodsp.h"
>>
>> #if CONFIG_ZLIB
>> #include <zlib.h>
>> @@ -63,6 +66,8 @@
>>
>> #include "svq1.h"
>>
>> +#define PART_NOT_AVAILABLE -2
>
> Didn't you want to move it to h264pred? I'm fine with that.
>
Yes, I wanted to so, but I didn't want to do it behind your back. Will
do now.
- 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] 21+ messages in thread
end of thread, other threads:[~2022-01-26 14:04 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 20:00 [FFmpeg-devel] [PATCH v2 01/18] avcodec/h264dec: Move find_start_code() to its only user Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 02/18] avcodec/h264dec: Move pack8to16 " Andreas Rheinhardt
[not found] ` <20220124200931.593079-1-andreas.rheinhardt@outlook.com>
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 03/18] lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 05/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriate Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 06/18] lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMES Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 07/18] lavc/h264_parser: add missing headers Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 08/18] lavc/h264: move some shared code from h264dec to h264_parse Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 09/18] lavc/h264data.h: stop including h264dec.h Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 10/18] lavc/h264_parse: " Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 11/18] lavc/h264: move MB_TYPE defs from h264dec.h to h264_parse Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 12/18] lavc/vdpau: stop unnecessarily including h264dec Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 13/18] lavc/x86/h264_qpel: " Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 15/18] avcodec/h264*: Remove unnecessary h264_mvpred.h inclusions Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 16/18] avcodec/h264dec: Remove unnecessary headers Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 17/18] avcodec/h264_*: Remove unnecessary internal.h inclusions Andreas Rheinhardt
2022-01-24 20:09 ` [FFmpeg-devel] [PATCH v2 18/18] avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.h Andreas Rheinhardt
2022-01-26 11:02 ` [FFmpeg-devel] [PATCH v2 04/18] lavc/h264dec.h: Move MMCOOpcode to h264_parse.h Anton Khirnov
2022-01-26 11:05 ` [FFmpeg-devel] [PATCH v2 14/18] lavc/svq3: stop including h264dec.h Anton Khirnov
2022-01-26 14:04 ` 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