FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
h264_parse.h File Reference
#include "config.h"
#include <stdint.h>
#include "libavutil/attributes.h"
#include "get_bits.h"
#include "h264_ps.h"

Go to the source code of this file.

Data Structures

struct  H264PredWeightTable
 
struct  H264POCContext
 

Macros

#define MB_TYPE_REF0   MB_TYPE_CODEC_SPECIFIC
 
#define MB_TYPE_8x8DCT   0x01000000
 

Enumerations

enum  MMCOOpcode {
  MMCO_END = 0, MMCO_SHORT2UNUSED, MMCO_LONG2UNUSED, MMCO_SHORT2LONG,
  MMCO_SET_MAX_LONG, MMCO_RESET, MMCO_LONG
}
 Memory management control operation opcode. More...
 

Functions

int ff_h264_pred_weight_table (GetBitContext *gb, const SPS *sps, const int *ref_count, int slice_type_nos, H264PredWeightTable *pwt, int picture_structure, void *logctx)
 
int ff_h264_check_intra4x4_pred_mode (int8_t *pred_mode_cache, void *logctx, int top_samples_available, int left_samples_available)
 Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks. More...
 
int ff_h264_check_intra_pred_mode (void *logctx, int top_samples_available, int left_samples_available, int mode, int is_chroma)
 Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks. More...
 
int ff_h264_parse_ref_count (int *plist_count, int ref_count[2], GetBitContext *gb, const PPS *pps, int slice_type_nos, int picture_structure, void *logctx)
 
int ff_h264_init_poc (int pic_field_poc[2], int *pic_poc, const SPS *sps, H264POCContext *poc, int picture_structure, int nal_ref_idc)
 
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)
 
static av_always_inline uint32_t pack16to32 (unsigned a, unsigned b)
 

Variables

static const uint8_t scan8 [16 *3+3]
 

Detailed Description

H.264 decoder/parser shared code

Definition in file h264_parse.h.

Macro Definition Documentation

◆ MB_TYPE_REF0

#define MB_TYPE_REF0   MB_TYPE_CODEC_SPECIFIC

Definition at line 36 of file h264_parse.h.

◆ MB_TYPE_8x8DCT

#define MB_TYPE_8x8DCT   0x01000000

Definition at line 37 of file h264_parse.h.

Enumeration Type Documentation

◆ MMCOOpcode

enum MMCOOpcode

Memory management control operation opcode.

Enumerator
MMCO_END 
MMCO_SHORT2UNUSED 
MMCO_LONG2UNUSED 
MMCO_SHORT2LONG 
MMCO_SET_MAX_LONG 
MMCO_RESET 
MMCO_LONG 

Definition at line 59 of file h264_parse.h.

Function Documentation

◆ ff_h264_pred_weight_table()

int ff_h264_pred_weight_table ( GetBitContext gb,
const SPS sps,
const int *  ref_count,
int  slice_type_nos,
H264PredWeightTable pwt,
int  picture_structure,
void *  logctx 
)

Definition at line 30 of file h264_parse.c.

Referenced by h264_slice_header_parse(), and scan_mmco_reset().

◆ ff_h264_check_intra4x4_pred_mode()

int ff_h264_check_intra4x4_pred_mode ( int8_t *  pred_mode_cache,
void *  logctx,
int  top_samples_available,
int  left_samples_available 
)

Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.

Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.

Definition at line 134 of file h264_parse.c.

Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and svq3_decode_mb().

◆ ff_h264_check_intra_pred_mode()

int ff_h264_check_intra_pred_mode ( void *  logctx,
int  top_samples_available,
int  left_samples_available,
int  mode,
int  is_chroma 
)

Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.

Check if the top & left blocks are available if needed & change the dc mode so it only uses the available blocks.

Definition at line 182 of file h264_parse.c.

Referenced by ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), and svq3_decode_mb().

◆ ff_h264_parse_ref_count()

int ff_h264_parse_ref_count ( int *  plist_count,
int  ref_count[2],
GetBitContext gb,
const PPS pps,
int  slice_type_nos,
int  picture_structure,
void *  logctx 
)

Definition at line 222 of file h264_parse.c.

Referenced by h264_slice_header_parse(), and scan_mmco_reset().

◆ ff_h264_init_poc()

int ff_h264_init_poc ( int  pic_field_poc[2],
int *  pic_poc,
const SPS sps,
H264POCContext poc,
int  picture_structure,
int  nal_ref_idc 
)

Definition at line 280 of file h264_parse.c.

Referenced by h264_field_start(), h264_filter(), and parse_nal_units().

◆ ff_h264_decode_extradata()

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 
)

Definition at line 466 of file h264_parse.c.

Referenced by h264_decode_frame(), h264_decode_init(), and h264_parse().

◆ pack16to32()

static av_always_inline uint32_t pack16to32 ( unsigned  a,
unsigned  b 
)
static

Variable Documentation

◆ scan8

const uint8_t scan8[16 *3+3]
static
Initial value:
= {
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
}

Definition at line 40 of file h264_parse.h.

Referenced by check_idct_multiple(), decode_cabac_luma_residual(), decode_cabac_mb_ref(), decode_cabac_residual_dc(), decode_cabac_residual_dc_422(), decode_cabac_residual_internal(), decode_cabac_residual_nondc(), decode_luma_residual(), decode_residual(), decode_slice(), fetch_diagonal_mv(), ff_h264_check_intra4x4_pred_mode(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_h264_idct8_add4(), ff_h264_idct8_add4_8_lsx(), ff_h264_idct8_add4_8_mmi(), ff_h264_idct8_add4_msa(), ff_h264_idct_add16(), ff_h264_idct_add16_8_lsx(), ff_h264_idct_add16_8_mmi(), ff_h264_idct_add16_intra_8_lsx(), ff_h264_idct_add16_intra_msa(), ff_h264_idct_add16_msa(), ff_h264_idct_add16intra(), ff_h264_idct_add16intra_8_mmi(), ff_h264_idct_add8(), ff_h264_idct_add8_422(), ff_h264_idct_add8_422_8_lsx(), ff_h264_idct_add8_422_8_mmi(), ff_h264_idct_add8_422_msa(), ff_h264_idct_add8_8_lsx(), ff_h264_idct_add8_8_mmi(), ff_h264_idct_add8_msa(), ff_h264_slice_context_init(), fill_decode_caches(), fill_filter_caches(), fill_filter_caches_inter(), filter_mb_dir(), get_cabac_cbf_ctx(), get_lowest_part_list_y(), get_lowest_part_y(), h264_er_decode_mb(), h264_frame_start(), hl_decode_mb(), hl_decode_mb_444(), hl_decode_mb_idct_luma(), hl_decode_mb_predict_luma(), mc_dir_part(), mc_part(), mc_part_std(), mc_part_weighted(), pred_16x8_motion(), pred_8x16_motion(), pred_intra_mode(), pred_motion(), pred_non_zero_count(), pred_pskip_motion(), pred_spatial_direct_motion(), pred_temp_direct_motion(), prefetch_motion(), svq3_decode_frame(), svq3_decode_mb(), svq3_mc_dir(), svq3_pred_motion(), and write_back_motion_list().