You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNT
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.
This commit is contained in:
committed by
Andreas Rheinhardt
parent
0ebfd64858
commit
b05cebe602
@@ -219,7 +219,7 @@ static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
|
|||||||
|
|
||||||
if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag
|
if (get_bits1(gb)) { // adaptive_ref_pic_marking_mode_flag
|
||||||
int i;
|
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);
|
MMCOOpcode opcode = get_ue_golomb_31(gb);
|
||||||
if (opcode > (unsigned) MMCO_LONG) {
|
if (opcode > (unsigned) MMCO_LONG) {
|
||||||
av_log(logctx, AV_LOG_ERROR,
|
av_log(logctx, AV_LOG_ERROR,
|
||||||
|
@@ -849,7 +849,7 @@ int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
|
|||||||
} else {
|
} else {
|
||||||
sl->explicit_ref_marking = get_bits1(gb);
|
sl->explicit_ref_marking = get_bits1(gb);
|
||||||
if (sl->explicit_ref_marking) {
|
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);
|
MMCOOpcode opcode = get_ue_golomb_31(gb);
|
||||||
|
|
||||||
mmco[i].opcode = opcode;
|
mmco[i].opcode = opcode;
|
||||||
|
@@ -52,8 +52,6 @@
|
|||||||
|
|
||||||
#define H264_MAX_PICTURE_COUNT 36
|
#define H264_MAX_PICTURE_COUNT 36
|
||||||
|
|
||||||
#define MAX_MMCO_COUNT 66
|
|
||||||
|
|
||||||
#define MAX_DELAYED_PIC_COUNT 16
|
#define MAX_DELAYED_PIC_COUNT 16
|
||||||
|
|
||||||
/* Compiling in interlaced support reduces the speed
|
/* Compiling in interlaced support reduces the speed
|
||||||
@@ -330,7 +328,7 @@ typedef struct H264SliceContext {
|
|||||||
uint8_t cabac_state[1024];
|
uint8_t cabac_state[1024];
|
||||||
int cabac_init_idc;
|
int cabac_init_idc;
|
||||||
|
|
||||||
MMCO mmco[MAX_MMCO_COUNT];
|
MMCO mmco[H264_MAX_MMCO_COUNT];
|
||||||
int nb_mmco;
|
int nb_mmco;
|
||||||
int explicit_ref_marking;
|
int explicit_ref_marking;
|
||||||
|
|
||||||
@@ -489,7 +487,7 @@ typedef struct H264Context {
|
|||||||
/**
|
/**
|
||||||
* memory management control operations buffer.
|
* memory management control operations buffer.
|
||||||
*/
|
*/
|
||||||
MMCO mmco[MAX_MMCO_COUNT];
|
MMCO mmco[H264_MAX_MMCO_COUNT];
|
||||||
int nb_mmco;
|
int nb_mmco;
|
||||||
int mmco_reset;
|
int mmco_reset;
|
||||||
int explicit_ref_marking;
|
int explicit_ref_marking;
|
||||||
|
Reference in New Issue
Block a user