header.c File Reference

H.264 Slice and Sequence headers. More...

#include <math.h>
#include "global.h"
#include "elements.h"
#include "header.h"
#include "rtp.h"
#include "mbuffer.h"
#include "vlc.h"
#include "parset.h"

Include dependency graph for header.c:

Go to the source code of this file.

Defines

#define SYMTRACESTRING(s)

Functions

static int ref_pic_list_reordering (Slice *currSlice, Bitstream *bitstream)
static int pred_weight_table (Slice *currSlice, Bitstream *bitstream)
static int get_picture_type (Slice *currSlice)
int SliceHeader (Slice *currSlice)
int dec_ref_pic_marking (Bitstream *bitstream, DecRefPicMarking_t *p_drpm, int idr_flag, int no_output_of_prior_pics_flag, int long_term_reference_flag)
int Partition_BC_Header (Slice *currSlice, int PartNo)

Variables

const int * assignSE2partition [2]
const int assignSE2partition_NoDP [SE_MAX_ELEMENTS]
const int assignSE2partition_DP [SE_MAX_ELEMENTS]


Detailed Description

H.264 Slice and Sequence headers.

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file header.c.


Function Documentation

int dec_ref_pic_marking ( Bitstream bitstream,
DecRefPicMarking_t p_drpm,
int  idr_flag,
int  no_output_of_prior_pics_flag,
int  long_term_reference_flag 
)

write the memory management control operations

Returns:
number of bits used

Definition at line 317 of file header.c.

References error(), u_1(), and ue_v().

Referenced by SliceHeader().

Here is the call graph for this function:

static int get_picture_type ( Slice currSlice  )  [static]

Selects picture type and codes it to symbol.

Returns:
symbol value for picture type

Definition at line 473 of file header.c.

References error(), and slice::slice_type.

Referenced by SliceHeader().

Here is the call graph for this function:

int Partition_BC_Header ( Slice currSlice,
int  PartNo 
)

int Partition_BC_Header () write the Partition type B, C header

Returns:
Number of bits used by the partition header
Parameters
PartNo: Partition Number to which the header should be written
Side effects
Partition header as per VCEG-N72r2 is written into the appropriate partition bit buffer
Limitations/Shortcomings/Tweaks
The current code does not support the change of picture parameters within one coded sequence, hence there is only one parameter set necessary. This is hard coded to zero.
Date:
October 24, 2001
Author:
Stephan Wenger stewe@cs.tu-berlin.de

Definition at line 530 of file header.c.

References syntaxelement::len, syntaxelement::type, syntaxelement::value1, syntaxelement::value2, and writeSE_UVLC().

Referenced by start_slice().

Here is the call graph for this function:

static int pred_weight_table ( Slice currSlice,
Bitstream bitstream 
) [static]

write prediction weight table

Returns:
number of bits used

Definition at line 382 of file header.c.

References se_v(), slice::slice_type, u_1(), ue_v(), slice::wp_offset, and slice::wp_weight.

Referenced by SliceHeader().

Here is the call graph for this function:

static int ref_pic_list_reordering ( Slice currSlice,
Bitstream bitstream 
) [static]

writes the ref_pic_list_reordering syntax based on content of according fields in p_Img structure

Returns:
number of bits used

Definition at line 247 of file header.c.

References slice::slice_type, u_1(), and ue_v().

Referenced by SliceHeader().

Here is the call graph for this function:

int SliceHeader ( Slice currSlice  ) 


Variable Documentation

const int* assignSE2partition[2]

lookup-table to assign different elements to partition

Note:
here we defined up to 6 different partitions similar to document Q15-k-18 described in the PROGFRAMEMODE. The Sliceheader contains the PSYNC information.
Elements inside a partition are not ordered. They are ordered by occurence in the stream. Assumption: Only partitionlosses are considered.
The texture elements luminance and chrominance are not ordered in the progressive form This may be changed in image.c
-IMPORTANT: Picture- or Sliceheaders must be assigned to partition 0.
Furthermore partitions must follow syntax dependencies as outlined in document Q15-J-23.

Definition at line 34 of file header.c.

Referenced by end_macroblock(), malloc_slice(), min_rdcost_16x16(), rdcost_for_4x4_intra_blocks(), rdcost_for_4x4_intra_blocks_444(), rdcost_for_8x8_intra_blocks(), rdcost_for_8x8_intra_blocks_444(), RDCost_for_8x8blocks(), SliceHeader(), writeCBPandDquant(), writeChromaCoeff(), writeChromaIntraPredMode(), writeCoeff16x16_CABAC(), writeCoeff4x4_CABAC(), writeCoeff4x4_CAVLC_444(), writeCoeff4x4_CAVLC_normal(), writeCoeff8x8_CABAC(), writeIntra4x4Modes(), writeIntra8x8Modes(), writeMBLayerBSlice(), writeMBLayerPSlice(), writeMotionVector8x8(), and writeReferenceFrame().

const int assignSE2partition_DP[SE_MAX_ELEMENTS]

Initial value:

  
  {  0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 0 }

Definition at line 37 of file header.c.

const int assignSE2partition_NoDP[SE_MAX_ELEMENTS]

Initial value:

  {  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 35 of file header.c.


Documentation generated with DoxyGen