AVBufferRef *sps_ref;
/* currently active parameters sets */
const PPS *pps;
- // FIXME this should properly be const
- SPS *sps;
+ const SPS *sps;
} H264ParamSets;
/**
int mb_xy;
int resync_mb_x;
int resync_mb_y;
+ unsigned int first_mb_addr;
// index of the first MB of the next slice
int next_slice_idx;
int mb_skip_run;
int is_complex;
+ int picture_structure;
int mb_field_decoding_flag;
int mb_mbaff; ///< mb_aff_frame && mb_field_decoding_flag
} ref_modifications[2][32];
int nb_ref_modifications[2];
+ unsigned int pps_id;
+
const uint8_t *intra_pcm_ptr;
int16_t *dc_val_base;
CABACContext cabac;
uint8_t cabac_state[1024];
int cabac_init_idc;
+
+ MMCO mmco[MAX_MMCO_COUNT];
+ int nb_mmco;
+ int explicit_ref_marking;
+
+ int frame_num;
+ int poc_lsb;
+ int delta_poc_bottom;
+ int delta_poc[2];
+ int curr_pic_num;
+ int max_pic_num;
} H264SliceContext;
/**
H264POCContext poc;
- /**
- * frame_num for frames or 2 * frame_num + 1 for field pics.
- */
- int curr_pic_num;
-
- /**
- * max_frame_num or 2 * max_frame_num for field pics.
- */
- int max_pic_num;
-
H264Ref default_ref[2];
H264Picture *short_ref[32];
H264Picture *long_ref[32];
* memory management control operations buffer.
*/
MMCO mmco[MAX_MMCO_COUNT];
- int mmco_index;
+ int nb_mmco;
int mmco_reset;
+ int explicit_ref_marking;
int long_ref_count; ///< number of actual long term references
int short_ref_count; ///< number of actual short term references
int missing_fields;
-/* for frame threading, this is set to 1
+ /* for frame threading, this is set to 1
* after finish_setup() has been called, so we cannot modify
* some context properties (which are supposed to stay constant between
* slices) anymore */
/**
* Execute the reference picture marking (memory management control operations).
*/
-int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count);
-
-int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb,
- int first_slice);
+int ff_h264_execute_ref_pic_marking(H264Context *h);
-int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice);
+int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
+ GetBitContext *gb);
void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl);
int ff_h264_decode_init(AVCodecContext *avctx);
/**
* Get the chroma qp.
*/
-static av_always_inline int get_chroma_qp(const H264Context *h, int t, int qscale)
+static av_always_inline int get_chroma_qp(const PPS *pps, int t, int qscale)
{
- return h->ps.pps->chroma_qp_table[t][qscale];
+ return pps->chroma_qp_table[t][qscale];
}
/**
void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl, int y, int height);
-int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl);
+int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
+ const H2645NAL *nal);
#define SLICE_SINGLETHREAD 1
#define SLICE_SKIPED 2