libavcodec/h264.h File Reference

H.264 / AVC / MPEG4 part10 codec. More...

#include "dsputil.h"
#include "cabac.h"
#include "mpegvideo.h"
#include "h264pred.h"

Go to the source code of this file.

Data Structures

struct  SPS
 Sequence parameter set. More...
struct  PPS
 Picture parameter set. More...
struct  MMCO
 Memory management control operation. More...
struct  H264Context
 H264Context. More...

Defines

#define interlaced_dct   interlaced_dct_is_a_bad_name
#define mb_intra   mb_intra_is_not_initialized_see_mb_type
#define LUMA_DC_BLOCK_INDEX   25
#define CHROMA_DC_BLOCK_INDEX   26
#define CHROMA_DC_COEFF_TOKEN_VLC_BITS   8
#define COEFF_TOKEN_VLC_BITS   8
#define TOTAL_ZEROS_VLC_BITS   9
#define CHROMA_DC_TOTAL_ZEROS_VLC_BITS   3
#define RUN_VLC_BITS   3
#define RUN7_VLC_BITS   6
#define MAX_SPS_COUNT   32
#define MAX_PPS_COUNT   256
#define MAX_MMCO_COUNT   66
#define MAX_DELAYED_PIC_COUNT   16
#define ALLOW_INTERLACE
#define ALLOW_NOCHROMA
#define MAX_SLICES   16
 The maximum number of slices supported by the decoder.
#define MB_MBAFF   h->mb_mbaff
#define MB_FIELD   h->mb_field_decoding_flag
#define FRAME_MBAFF   h->mb_aff_frame
#define FIELD_PICTURE   (s->picture_structure != PICT_FRAME)
#define FIELD_OR_MBAFF_PICTURE   (FRAME_MBAFF || FIELD_PICTURE)
#define CHROMA   h->sps.chroma_format_idc
#define EXTENDED_SAR   255
#define MB_TYPE_REF0   MB_TYPE_ACPRED
#define MB_TYPE_8x8DCT   0x01000000
#define IS_REF0(a)   ((a) & MB_TYPE_REF0)
#define IS_8x8DCT(a)   ((a) & MB_TYPE_8x8DCT)
#define LIST_NOT_USED   -1
#define PART_NOT_AVAILABLE   -2

Enumerations

enum  {
  NAL_SLICE = 1, NAL_DPA, NAL_DPB, NAL_DPC,
  NAL_IDR_SLICE, NAL_SEI, NAL_SPS, NAL_PPS,
  NAL_AUD, NAL_END_SEQUENCE, NAL_END_STREAM, NAL_FILLER_DATA,
  NAL_SPS_EXT, NAL_AUXILIARY_SLICE = 19
}
enum  SEI_Type { SEI_BUFFERING_PERIOD = 0, SEI_TYPE_PIC_TIMING = 1, SEI_TYPE_USER_DATA_UNREGISTERED = 5, SEI_TYPE_RECOVERY_POINT = 6 }
 SEI message types. More...
enum  SEI_PicStructType {
  SEI_PIC_STRUCT_FRAME = 0, SEI_PIC_STRUCT_TOP_FIELD = 1, SEI_PIC_STRUCT_BOTTOM_FIELD = 2, SEI_PIC_STRUCT_TOP_BOTTOM = 3,
  SEI_PIC_STRUCT_BOTTOM_TOP = 4, SEI_PIC_STRUCT_TOP_BOTTOM_TOP = 5, SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM = 6, SEI_PIC_STRUCT_FRAME_DOUBLING = 7,
  SEI_PIC_STRUCT_FRAME_TRIPLING = 8
}
 pic_struct in picture timing SEI message More...
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_decode_sei (H264Context *h)
 Decode SEI.
int ff_h264_decode_seq_parameter_set (H264Context *h)
 Decode SPS.
int ff_h264_decode_picture_parameter_set (H264Context *h, int bit_length)
 Decode PPS.
const uint8_t * ff_h264_decode_nal (H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length)
 Decodes a network abstraction layer unit.
int ff_h264_decode_rbsp_trailing (H264Context *h, const uint8_t *src)
 identifies the exact end of the bitstream


Detailed Description

H.264 / AVC / MPEG4 part10 codec.

Author:
Michael Niedermayer <michaelni@gmx.at>

Definition in file h264.h.


Define Documentation

#define ALLOW_INTERLACE

Definition at line 58 of file h264.h.

#define ALLOW_NOCHROMA

Definition at line 60 of file h264.h.

#define CHROMA   h->sps.chroma_format_idc

Definition at line 84 of file h264.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), and pred_weight_table().

#define CHROMA_DC_BLOCK_INDEX   26

Definition at line 40 of file h264.h.

Referenced by decode_mb_cavlc(), and decode_residual().

#define CHROMA_DC_COEFF_TOKEN_VLC_BITS   8

Definition at line 42 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().

#define CHROMA_DC_TOTAL_ZEROS_VLC_BITS   3

Definition at line 45 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().

#define COEFF_TOKEN_VLC_BITS   8

Definition at line 43 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().

#define EXTENDED_SAR   255

Definition at line 89 of file h264.h.

Referenced by decode_vui_parameters().

#define FIELD_OR_MBAFF_PICTURE   (FRAME_MBAFF || FIELD_PICTURE)

Definition at line 81 of file h264.h.

Referenced by decode_frame(), decode_slice(), and decode_slice_header().

#define FIELD_PICTURE   (s->picture_structure != PICT_FRAME)

#define FRAME_MBAFF   h->mb_aff_frame

#define interlaced_dct   interlaced_dct_is_a_bad_name

Definition at line 36 of file h264.h.

#define IS_8x8DCT (  )     ((a) & MB_TYPE_8x8DCT)

#define IS_REF0 (  )     ((a) & MB_TYPE_REF0)

Definition at line 93 of file h264.h.

Referenced by decode_mb_cavlc().

#define LIST_NOT_USED   -1

Definition at line 290 of file h264.h.

Referenced by decode_mb_cabac(), decode_mb_cavlc(), fill_caches(), and write_back_motion().

#define LUMA_DC_BLOCK_INDEX   25

Definition at line 39 of file h264.h.

Referenced by decode_mb_cavlc(), and decode_residual().

#define MAX_DELAYED_PIC_COUNT   16

Definition at line 54 of file h264.h.

Referenced by decode_frame(), and flush_dpb().

#define MAX_MMCO_COUNT   66

Definition at line 52 of file h264.h.

Referenced by decode_ref_pic_marking().

#define MAX_PPS_COUNT   256

#define MAX_SLICES   16

The maximum number of slices supported by the decoder.

must be a power of 2

Definition at line 66 of file h264.h.

Referenced by decode_slice_header(), and filter_mb_dir().

#define MAX_SPS_COUNT   32

#define MB_FIELD   h->mb_field_decoding_flag

#define mb_intra   mb_intra_is_not_initialized_see_mb_type

Definition at line 37 of file h264.h.

#define MB_MBAFF   h->mb_mbaff

#define MB_TYPE_8x8DCT   0x01000000

Definition at line 92 of file h264.h.

Referenced by decode_mb_cabac(), and decode_mb_cavlc().

#define MB_TYPE_REF0   MB_TYPE_ACPRED

Definition at line 91 of file h264.h.

#define PART_NOT_AVAILABLE   -2

#define RUN7_VLC_BITS   6

Definition at line 47 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().

#define RUN_VLC_BITS   3

Definition at line 46 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().

#define TOTAL_ZEROS_VLC_BITS   9

Definition at line 44 of file h264.h.

Referenced by decode_init_vlc(), and decode_residual().


Enumeration Type Documentation

anonymous enum

Enumerator:
NAL_SLICE 
NAL_DPA 
NAL_DPB 
NAL_DPC 
NAL_IDR_SLICE 
NAL_SEI 
NAL_SPS 
NAL_PPS 
NAL_AUD 
NAL_END_SEQUENCE 
NAL_END_STREAM 
NAL_FILLER_DATA 
NAL_SPS_EXT 
NAL_AUXILIARY_SLICE 

Definition at line 97 of file h264.h.

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 220 of file h264.h.

pic_struct in picture timing SEI message

Enumerator:
SEI_PIC_STRUCT_FRAME  0: frame
SEI_PIC_STRUCT_TOP_FIELD  1: top field
SEI_PIC_STRUCT_BOTTOM_FIELD  2: bottom field
SEI_PIC_STRUCT_TOP_BOTTOM  3: top field, bottom field, in that order
SEI_PIC_STRUCT_BOTTOM_TOP  4: bottom field, top field, in that order
SEI_PIC_STRUCT_TOP_BOTTOM_TOP  5: top field, bottom field, top field repeated, in that order
SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM  6: bottom field, top field, bottom field repeated, in that order
SEI_PIC_STRUCT_FRAME_DOUBLING  7: frame doubling
SEI_PIC_STRUCT_FRAME_TRIPLING  8: frame tripling

Definition at line 127 of file h264.h.

enum SEI_Type

SEI message types.

Enumerator:
SEI_BUFFERING_PERIOD  buffering period (H.264, D.1.1)
SEI_TYPE_PIC_TIMING  picture timing
SEI_TYPE_USER_DATA_UNREGISTERED  unregistered user data
SEI_TYPE_RECOVERY_POINT  recovery point (frame # to decoder sync)

Definition at line 117 of file h264.h.


Function Documentation

const uint8_t* ff_h264_decode_nal ( H264Context h,
const uint8_t *  src,
int *  dst_length,
int *  consumed,
int  length 
)

Decodes a network abstraction layer unit.

Parameters:
consumed is the number of bytes used as input
length is the length of the array
dst_length is the number of decoded bytes FIXME here or a decode rbsp tailing?
Returns:
decoded bytes, might be src+1 if no escapes

Definition at line 1363 of file h264.c.

Referenced by decode_nal_units(), and parse_nal_units().

int ff_h264_decode_picture_parameter_set ( H264Context h,
int  bit_length 
)

Decode PPS.

Definition at line 7255 of file h264.c.

Referenced by decode_nal_units(), and parse_nal_units().

int ff_h264_decode_rbsp_trailing ( H264Context h,
const uint8_t *  src 
)

identifies the exact end of the bitstream

Returns:
the length of the trailing, or 0 if damaged

Definition at line 1453 of file h264.c.

Referenced by decode_nal_units().

int ff_h264_decode_sei ( H264Context h  ) 

Decode SEI.

Definition at line 6906 of file h264.c.

Referenced by decode_nal_units(), and parse_nal_units().

int ff_h264_decode_seq_parameter_set ( H264Context h  ) 

Decode SPS.

Definition at line 7104 of file h264.c.

Referenced by decode_nal_units(), and parse_nal_units().


Generated on Fri Oct 26 02:35:43 2012 for FFmpeg by  doxygen 1.5.8