Main Page | Data Structures | File List | Data Fields | Globals

h264_stream.h File Reference

#include <stdint.h>
#include "bs.h"

Include dependency graph for h264_stream.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sps_t
struct  pps_t
struct  slice_header_t
struct  nal_t
struct  h264_stream_t

Defines

#define _H264_STREAM_H   1
#define NAL_UNIT_TYPE_UNSPECIFIED   0
#define NAL_UNIT_TYPE_CODED_SLICE_NON_IDR   1
#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_A   2
#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_B   3
#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_C   4
#define NAL_UNIT_TYPE_CODED_SLICE_IDR   5
#define NAL_UNIT_TYPE_SEI   6
#define NAL_UNIT_TYPE_SPS   7
#define NAL_UNIT_TYPE_PPS   8
#define NAL_UNIT_TYPE_AUD   9
#define NAL_UNIT_TYPE_END_OF_SEQUENCE   10
#define NAL_UNIT_TYPE_END_OF_STREAM   11
#define NAL_UNIT_TYPE_FILLER   12
#define NAL_UNIT_TYPE_SPS_EXT   13
#define NAL_UNIT_TYPE_CODED_SLICE_AUX   19
#define SH_SLICE_TYPE_P   0
#define SH_SLICE_TYPE_B   1
#define SH_SLICE_TYPE_I   2
#define SH_SLICE_TYPE_SP   3
#define SH_SLICE_TYPE_SI   4
#define SH_SLICE_TYPE_P_ALT   5
#define SH_SLICE_TYPE_B_ALT   6
#define SH_SLICE_TYPE_I_ALT   7
#define SH_SLICE_TYPE_SP_ALT   8
#define SH_SLICE_TYPE_SI_ALT   9
#define SAR_Unspecified   0
#define SAR_1_1   1
#define SAR_12_11   2
#define SAR_10_11   3
#define SAR_16_11   4
#define SAR_40_33   5
#define SAR_24_11   6
#define SAR_20_11   7
#define SAR_32_11   8
#define SAR_80_33   9
#define SAR_18_11   10
#define SAR_15_11   11
#define SAR_64_33   12
#define SAR_160_99   13
#define SAR_Extended   255

Functions

int find_nal_unit (uint8_t *buf, int size, int *nal_start, int *nal_end)
int read_nal_unit (h264_stream_t *h, uint8_t *buf, int size)
void read_pic_parameter_set_rbsp (h264_stream_t *h, bs_t *b)
void read_access_unit_delimiter_rbsp (h264_stream_t *h, bs_t *b)
void read_end_of_seq_rbsp (h264_stream_t *h, bs_t *b)
void read_end_of_stream_rbsp (h264_stream_t *h, bs_t *b)
void read_filler_data_rbsp (h264_stream_t *h, bs_t *b)
void read_slice_layer_rbsp (h264_stream_t *h, bs_t *b)
void read_rbsp_slice_trailing_bits (h264_stream_t *h, bs_t *b)
void read_rbsp_trailing_bits (h264_stream_t *h, bs_t *b)
void read_slice_header (h264_stream_t *h, bs_t *b)
void read_ref_pic_list_reordering (h264_stream_t *h, bs_t *b)
void read_pred_weight_table (h264_stream_t *h, bs_t *b)
void read_dec_ref_pic_marking (h264_stream_t *h, bs_t *b)
void read_seq_parameter_set_rbsp (h264_stream_t *h, bs_t *b)
void read_scaling_list (bs_t *b, int *scalingList, int sizeOfScalingList, int useDefaultScalingMatrixFlag)
void read_vui_parameters (h264_stream_t *h, bs_t *b)
void read_hrd_parameters (h264_stream_t *h, bs_t *b)
int more_rbsp_trailing_data (h264_stream_t *h, bs_t *b)
int write_nal_unit (h264_stream_t *h, uint8_t *buf, int size)
void write_seq_parameter_set_rbsp (h264_stream_t *h, bs_t *b)
void write_scaling_list (bs_t *b, int *scalingList, int sizeOfScalingList, int useDefaultScalingMatrixFlag)
void write_vui_parameters (h264_stream_t *h, bs_t *b)
void write_hrd_parameters (h264_stream_t *h, bs_t *b)
void write_pic_parameter_set_rbsp (h264_stream_t *h, bs_t *b)
void write_access_unit_delimiter_rbsp (h264_stream_t *h, bs_t *b)
void write_end_of_seq_rbsp (h264_stream_t *h, bs_t *b)
void write_end_of_stream_rbsp (h264_stream_t *h, bs_t *b)
void write_filler_data_rbsp (h264_stream_t *h, bs_t *b)
void write_slice_layer_rbsp (h264_stream_t *h, bs_t *b)
void write_rbsp_slice_trailing_bits (h264_stream_t *h, bs_t *b)
void write_rbsp_trailing_bits (h264_stream_t *h, bs_t *b)
void write_slice_header (h264_stream_t *h, bs_t *b)
void write_ref_pic_list_reordering (h264_stream_t *h, bs_t *b)
void write_pred_weight_table (h264_stream_t *h, bs_t *b)
void write_dec_ref_pic_marking (h264_stream_t *h, bs_t *b)
void debug_sps (sps_t *sps)
void debug_pps (pps_t *pps)
void debug_slice_header (slice_header_t *sh)
void debug_nal (h264_stream_t *h, nal_t *nal)
void debug_bytes (uint8_t *buf, int len)
void debug_bs (bs_t *b)


Define Documentation

#define _H264_STREAM_H   1
 

Definition at line 25 of file h264_stream.h.

#define NAL_UNIT_TYPE_AUD   9
 

Definition at line 353 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_AUX   19
 

Definition at line 359 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_A   2
 

Definition at line 346 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_B   3
 

Definition at line 347 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_DATA_PARTITION_C   4
 

Definition at line 348 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_IDR   5
 

Definition at line 349 of file h264_stream.h.

#define NAL_UNIT_TYPE_CODED_SLICE_NON_IDR   1
 

Definition at line 345 of file h264_stream.h.

#define NAL_UNIT_TYPE_END_OF_SEQUENCE   10
 

Definition at line 354 of file h264_stream.h.

#define NAL_UNIT_TYPE_END_OF_STREAM   11
 

Definition at line 355 of file h264_stream.h.

#define NAL_UNIT_TYPE_FILLER   12
 

Definition at line 356 of file h264_stream.h.

#define NAL_UNIT_TYPE_PPS   8
 

Definition at line 352 of file h264_stream.h.

#define NAL_UNIT_TYPE_SEI   6
 

Definition at line 350 of file h264_stream.h.

#define NAL_UNIT_TYPE_SPS   7
 

Definition at line 351 of file h264_stream.h.

#define NAL_UNIT_TYPE_SPS_EXT   13
 

Definition at line 357 of file h264_stream.h.

#define NAL_UNIT_TYPE_UNSPECIFIED   0
 

Definition at line 344 of file h264_stream.h.

#define SAR_10_11   3
 

Definition at line 379 of file h264_stream.h.

#define SAR_12_11   2
 

Definition at line 378 of file h264_stream.h.

#define SAR_15_11   11
 

Definition at line 387 of file h264_stream.h.

#define SAR_160_99   13
 

Definition at line 389 of file h264_stream.h.

#define SAR_16_11   4
 

Definition at line 380 of file h264_stream.h.

#define SAR_18_11   10
 

Definition at line 386 of file h264_stream.h.

#define SAR_1_1   1
 

Definition at line 377 of file h264_stream.h.

#define SAR_20_11   7
 

Definition at line 383 of file h264_stream.h.

#define SAR_24_11   6
 

Definition at line 382 of file h264_stream.h.

#define SAR_32_11   8
 

Definition at line 384 of file h264_stream.h.

#define SAR_40_33   5
 

Definition at line 381 of file h264_stream.h.

#define SAR_64_33   12
 

Definition at line 388 of file h264_stream.h.

#define SAR_80_33   9
 

Definition at line 385 of file h264_stream.h.

#define SAR_Extended   255
 

Definition at line 391 of file h264_stream.h.

Referenced by read_vui_parameters(), and write_vui_parameters().

#define SAR_Unspecified   0
 

Definition at line 376 of file h264_stream.h.

#define SH_SLICE_TYPE_B   1
 

Definition at line 365 of file h264_stream.h.

Referenced by debug_slice_header(), read_pred_weight_table(), read_ref_pic_list_reordering(), read_slice_header(), write_pred_weight_table(), write_ref_pic_list_reordering(), and write_slice_header().

#define SH_SLICE_TYPE_B_ALT   6
 

Definition at line 370 of file h264_stream.h.

#define SH_SLICE_TYPE_I   2
 

Definition at line 366 of file h264_stream.h.

Referenced by debug_slice_header(), read_ref_pic_list_reordering(), read_slice_header(), write_ref_pic_list_reordering(), and write_slice_header().

#define SH_SLICE_TYPE_I_ALT   7
 

Definition at line 371 of file h264_stream.h.

#define SH_SLICE_TYPE_P   0
 

Definition at line 364 of file h264_stream.h.

Referenced by debug_slice_header(), read_slice_header(), and write_slice_header().

#define SH_SLICE_TYPE_P_ALT   5
 

Definition at line 369 of file h264_stream.h.

#define SH_SLICE_TYPE_SI   4
 

Definition at line 368 of file h264_stream.h.

Referenced by read_ref_pic_list_reordering(), read_slice_header(), write_ref_pic_list_reordering(), and write_slice_header().

#define SH_SLICE_TYPE_SI_ALT   9
 

Definition at line 373 of file h264_stream.h.

#define SH_SLICE_TYPE_SP   3
 

Definition at line 367 of file h264_stream.h.

Referenced by read_slice_header(), and write_slice_header().

#define SH_SLICE_TYPE_SP_ALT   8
 

Definition at line 372 of file h264_stream.h.


Function Documentation

void debug_bs bs_t b  ) 
 

Definition at line 2027 of file h264_stream.c.

References bs_t::bits_left, bs_init(), bs_read_u1(), bs_t::end, bs_t::p, and bs_t::start.

Here is the call graph for this function:

void debug_bytes uint8_t *  buf,
int  len
 

Definition at line 2016 of file h264_stream.c.

void debug_nal h264_stream_t h,
nal_t nal
 

Print the contents of a NAL unit to standard output. The NAL which is printed out has a type determined by nal and data which comes from other fields within h depending on its type.

Parameters:
[in] h the stream object
[in] nal the nal unit

Definition at line 2000 of file h264_stream.c.

References debug_pps(), debug_slice_header(), debug_sps(), nal_t::forbidden_zero_bit, nal_t::nal_ref_idc, nal_t::nal_unit_type, h264_stream_t::pps, h264_stream_t::sh, and h264_stream_t::sps.

Referenced by main().

Here is the call graph for this function:

void debug_pps pps_t pps  ) 
 

Definition at line 1891 of file h264_stream.c.

References pps_t::chroma_qp_index_offset, pps_t::constrained_intra_pred_flag, pps_t::deblocking_filter_control_present_flag, pps_t::entropy_coding_mode_flag, pps_t::num_ref_idx_l0_active_minus1, pps_t::num_ref_idx_l1_active_minus1, pps_t::num_slice_groups_minus1, pps_t::pic_init_qp_minus26, pps_t::pic_init_qs_minus26, pps_t::pic_order_present_flag, pps_t::pic_parameter_set_id, pps_t::pic_scaling_matrix_present_flag, pps_t::redundant_pic_cnt_present_flag, pps_t::second_chroma_qp_index_offset, pps_t::seq_parameter_set_id, pps_t::slice_group_map_type, pps_t::transform_8x8_mode_flag, pps_t::weighted_bipred_idc, and pps_t::weighted_pred_flag.

Referenced by debug_nal().

void debug_slice_header slice_header_t sh  ) 
 

Definition at line 1927 of file h264_stream.c.

References slice_header_t::bottom_field_flag, slice_header_t::cabac_init_idc, slice_header_t::delta_pic_order_cnt_bottom, slice_header_t::direct_spatial_mv_pred_flag, slice_header_t::disable_deblocking_filter_idc, slice_header_t::drpm, slice_header_t::field_pic_flag, slice_header_t::first_mb_in_slice, slice_header_t::frame_num, slice_header_t::idr_pic_id, slice_header_t::num_ref_idx_active_override_flag, slice_header_t::num_ref_idx_l0_active_minus1, slice_header_t::num_ref_idx_l1_active_minus1, slice_header_t::pic_order_cnt_lsb, slice_header_t::pic_parameter_set_id, slice_header_t::pwt, slice_header_t::redundant_pic_cnt, slice_header_t::rplr, SH_SLICE_TYPE_B, SH_SLICE_TYPE_I, SH_SLICE_TYPE_P, slice_header_t::slice_alpha_c0_offset_div2, slice_header_t::slice_beta_offset_div2, slice_header_t::slice_group_change_cycle, slice_header_t::slice_qp_delta, slice_header_t::slice_qs_delta, slice_header_t::slice_type, and slice_header_t::sp_for_switch_flag.

Referenced by debug_nal().

void debug_sps sps_t sps  ) 
 

Definition at line 1799 of file h264_stream.c.

References sps_t::bit_depth_chroma_minus8, sps_t::bit_depth_luma_minus8, sps_t::chroma_format_idc, sps_t::constraint_set0_flag, sps_t::constraint_set1_flag, sps_t::constraint_set2_flag, sps_t::constraint_set3_flag, sps_t::delta_pic_order_always_zero_flag, sps_t::direct_8x8_inference_flag, sps_t::frame_crop_bottom_offset, sps_t::frame_crop_left_offset, sps_t::frame_crop_right_offset, sps_t::frame_crop_top_offset, sps_t::frame_cropping_flag, sps_t::frame_mbs_only_flag, sps_t::gaps_in_frame_num_value_allowed_flag, sps_t::hrd, sps_t::level_idc, sps_t::log2_max_frame_num_minus4, sps_t::log2_max_pic_order_cnt_lsb_minus4, sps_t::mb_adaptive_frame_field_flag, sps_t::num_ref_frames, sps_t::num_ref_frames_in_pic_order_cnt_cycle, sps_t::offset_for_non_ref_pic, sps_t::offset_for_top_to_bottom_field, sps_t::pic_height_in_map_units_minus1, sps_t::pic_order_cnt_type, sps_t::pic_width_in_mbs_minus1, sps_t::profile_idc, sps_t::qpprime_y_zero_transform_bypass_flag, sps_t::reserved_zero_4bits, sps_t::residual_colour_transform_flag, sps_t::seq_parameter_set_id, sps_t::seq_scaling_matrix_present_flag, sps_t::vui, and sps_t::vui_parameters_present_flag.

Referenced by debug_nal().

int find_nal_unit uint8_t *  buf,
int  size,
int *  nal_start,
int *  nal_end
 

Find the beginning and end of a NAL (Network Abstraction Layer) unit in a byte buffer containing H264 bitstream data.

Parameters:
[in] buf the buffer
[in] size the size of the buffer
[out] nal_start the beginning offset of the nal
[out] nal_end the end offset of the nal
Returns:
the length of the nal, or 0 if did not find start of nal, or -1 if did not find end of nal

Definition at line 73 of file h264_stream.c.

Referenced by main().

int more_rbsp_trailing_data h264_stream_t h,
bs_t b
 

Definition at line 618 of file h264_stream.c.

References bs_eof().

Referenced by read_rbsp_slice_trailing_bits(), and write_rbsp_slice_trailing_bits().

Here is the call graph for this function:

void read_access_unit_delimiter_rbsp h264_stream_t h,
bs_t b
 

Definition at line 546 of file h264_stream.c.

References bs_read_u(), and read_rbsp_trailing_bits().

Referenced by read_nal_unit().

Here is the call graph for this function:

void read_dec_ref_pic_marking h264_stream_t h,
bs_t b
 

Definition at line 860 of file h264_stream.c.

References bs_eof(), bs_read_u1(), bs_read_ue(), slice_header_t::drpm, h264_stream_t::nal, nal_t::nal_unit_type, and h264_stream_t::sh.

Referenced by read_slice_header().

Here is the call graph for this function:

void read_end_of_seq_rbsp h264_stream_t h,
bs_t b
 

Definition at line 553 of file h264_stream.c.

Referenced by read_nal_unit().

void read_end_of_stream_rbsp h264_stream_t h,
bs_t b
 

Definition at line 558 of file h264_stream.c.

Referenced by read_nal_unit().

void read_filler_data_rbsp h264_stream_t h,
bs_t b
 

Definition at line 563 of file h264_stream.c.

References bs_read_f(), next_bits(), and read_rbsp_trailing_bits().

Here is the call graph for this function:

void read_hrd_parameters h264_stream_t h,
bs_t b
 

Definition at line 391 of file h264_stream.c.

References bs_read_u(), bs_read_u1(), bs_read_ue(), sps_t::hrd, and h264_stream_t::sps.

Referenced by read_vui_parameters().

Here is the call graph for this function:

int read_nal_unit h264_stream_t h,
uint8_t *  buf,
int  size
 

Read a NAL unit from a byte buffer. The buffer must start exactly at the beginning of the nal (after the start prefix). The NAL is read into h->nal and into other fields within h depending on its type (check h->nal->nal_unit_type after reading).

Parameters:
[in,out] h the stream object
[in] buf the buffer
[in] size the size of the buffer
Returns:
the length of data actually read

Definition at line 129 of file h264_stream.c.

References bs_init(), bs_read_f(), bs_read_u(), nal_t::forbidden_zero_bit, h264_stream_t::nal, nal_t::nal_ref_idc, nal_t::nal_unit_type, read_access_unit_delimiter_rbsp(), read_end_of_seq_rbsp(), read_end_of_stream_rbsp(), read_pic_parameter_set_rbsp(), read_seq_parameter_set_rbsp(), and read_slice_layer_rbsp().

Referenced by main().

Here is the call graph for this function:

void read_pic_parameter_set_rbsp h264_stream_t h,
bs_t b
 

Definition at line 430 of file h264_stream.c.

References pps_t::bottom_right, bs_read_se(), bs_read_u(), bs_read_u1(), bs_read_ue(), pps_t::chroma_qp_index_offset, pps_t::constrained_intra_pred_flag, pps_t::deblocking_filter_control_present_flag, pps_t::entropy_coding_mode_flag, log2, more_rbsp_data(), pps_t::num_ref_idx_l0_active_minus1, pps_t::num_ref_idx_l1_active_minus1, pps_t::num_slice_groups_minus1, pps_t::pic_init_qp_minus26, pps_t::pic_init_qs_minus26, pps_t::pic_order_present_flag, pps_t::pic_parameter_set_id, pps_t::pic_scaling_list_present_flag, pps_t::pic_scaling_matrix_present_flag, pps_t::pic_size_in_map_units_minus1, h264_stream_t::pps, read_rbsp_trailing_bits(), read_scaling_list(), pps_t::redundant_pic_cnt_present_flag, pps_t::run_length_minus1, pps_t::ScalingList4x4, pps_t::ScalingList8x8, pps_t::second_chroma_qp_index_offset, pps_t::seq_parameter_set_id, pps_t::slice_group_change_direction_flag, pps_t::slice_group_change_rate_minus1, pps_t::slice_group_id, pps_t::slice_group_map_type, pps_t::top_left, pps_t::transform_8x8_mode_flag, pps_t::UseDefaultScalingMatrix4x4Flag, pps_t::UseDefaultScalingMatrix8x8Flag, pps_t::weighted_bipred_idc, and pps_t::weighted_pred_flag.

Referenced by read_nal_unit().

Here is the call graph for this function:

void read_pred_weight_table h264_stream_t h,
bs_t b
 

Definition at line 799 of file h264_stream.c.

References bs_read_se(), bs_read_u1(), bs_read_ue(), sps_t::chroma_format_idc, pps_t::num_ref_idx_l0_active_minus1, pps_t::num_ref_idx_l1_active_minus1, h264_stream_t::pps, slice_header_t::pwt, h264_stream_t::sh, SH_SLICE_TYPE_B, slice_header_t::slice_type, and h264_stream_t::sps.

Referenced by read_slice_header().

Here is the call graph for this function:

void read_rbsp_slice_trailing_bits h264_stream_t h,
bs_t b
 

Definition at line 621 of file h264_stream.c.

References bs_read_f(), pps_t::entropy_coding_mode_flag, more_rbsp_trailing_data(), h264_stream_t::pps, and read_rbsp_trailing_bits().

Here is the call graph for this function:

void read_rbsp_trailing_bits h264_stream_t h,
bs_t b
 

Definition at line 635 of file h264_stream.c.

References bs_byte_aligned(), and bs_read_f().

Referenced by read_access_unit_delimiter_rbsp(), read_filler_data_rbsp(), read_pic_parameter_set_rbsp(), read_rbsp_slice_trailing_bits(), and read_seq_parameter_set_rbsp().

Here is the call graph for this function:

void read_ref_pic_list_reordering h264_stream_t h,
bs_t b
 

Definition at line 752 of file h264_stream.c.

References bs_eof(), bs_read_u1(), bs_read_ue(), slice_header_t::rplr, h264_stream_t::sh, SH_SLICE_TYPE_B, SH_SLICE_TYPE_I, SH_SLICE_TYPE_SI, and slice_header_t::slice_type.

Referenced by read_slice_header().

Here is the call graph for this function:

void read_scaling_list bs_t b,
int *  scalingList,
int  sizeOfScalingList,
int  useDefaultScalingMatrixFlag
 

Definition at line 296 of file h264_stream.c.

References bs_read_se().

Referenced by read_pic_parameter_set_rbsp(), and read_seq_parameter_set_rbsp().

Here is the call graph for this function:

void read_seq_parameter_set_rbsp h264_stream_t h,
bs_t b
 

Definition at line 204 of file h264_stream.c.

References sps_t::bit_depth_chroma_minus8, sps_t::bit_depth_luma_minus8, bs_read_se(), bs_read_u(), bs_read_u1(), bs_read_u8(), bs_read_ue(), sps_t::chroma_format_idc, sps_t::constraint_set0_flag, sps_t::constraint_set1_flag, sps_t::constraint_set2_flag, sps_t::constraint_set3_flag, sps_t::delta_pic_order_always_zero_flag, sps_t::direct_8x8_inference_flag, sps_t::frame_crop_bottom_offset, sps_t::frame_crop_left_offset, sps_t::frame_crop_right_offset, sps_t::frame_crop_top_offset, sps_t::frame_cropping_flag, sps_t::frame_mbs_only_flag, sps_t::gaps_in_frame_num_value_allowed_flag, sps_t::level_idc, sps_t::log2_max_frame_num_minus4, sps_t::log2_max_pic_order_cnt_lsb_minus4, sps_t::mb_adaptive_frame_field_flag, sps_t::num_ref_frames, sps_t::num_ref_frames_in_pic_order_cnt_cycle, sps_t::offset_for_non_ref_pic, sps_t::offset_for_ref_frame, sps_t::offset_for_top_to_bottom_field, sps_t::pic_height_in_map_units_minus1, sps_t::pic_order_cnt_type, sps_t::pic_width_in_mbs_minus1, sps_t::profile_idc, sps_t::qpprime_y_zero_transform_bypass_flag, read_rbsp_trailing_bits(), read_scaling_list(), read_vui_parameters(), sps_t::reserved_zero_4bits, sps_t::residual_colour_transform_flag, sps_t::ScalingList4x4, sps_t::ScalingList8x8, sps_t::seq_parameter_set_id, sps_t::seq_scaling_list_present_flag, sps_t::seq_scaling_matrix_present_flag, h264_stream_t::sps, sps_t::UseDefaultScalingMatrix4x4Flag, sps_t::UseDefaultScalingMatrix8x8Flag, and sps_t::vui_parameters_present_flag.

Referenced by read_nal_unit().

Here is the call graph for this function:

void read_slice_header h264_stream_t h,
bs_t b
 

Definition at line 650 of file h264_stream.c.

References slice_header_t::bottom_field_flag, bs_read_se(), bs_read_u(), bs_read_u1(), bs_read_ue(), slice_header_t::cabac_init_idc, pps_t::deblocking_filter_control_present_flag, sps_t::delta_pic_order_always_zero_flag, slice_header_t::delta_pic_order_cnt, slice_header_t::delta_pic_order_cnt_bottom, slice_header_t::direct_spatial_mv_pred_flag, slice_header_t::disable_deblocking_filter_idc, pps_t::entropy_coding_mode_flag, slice_header_t::field_pic_flag, slice_header_t::first_mb_in_slice, sps_t::frame_mbs_only_flag, slice_header_t::frame_num, slice_header_t::idr_pic_id, log2, sps_t::log2_max_frame_num_minus4, sps_t::log2_max_pic_order_cnt_lsb_minus4, h264_stream_t::nal, nal_t::nal_ref_idc, nal_t::nal_unit_type, slice_header_t::num_ref_idx_active_override_flag, slice_header_t::num_ref_idx_l0_active_minus1, slice_header_t::num_ref_idx_l1_active_minus1, pps_t::num_slice_groups_minus1, slice_header_t::pic_order_cnt_lsb, sps_t::pic_order_cnt_type, pps_t::pic_order_present_flag, slice_header_t::pic_parameter_set_id, pps_t::pic_size_in_map_units_minus1, h264_stream_t::pps, read_dec_ref_pic_marking(), read_pred_weight_table(), read_ref_pic_list_reordering(), slice_header_t::redundant_pic_cnt, pps_t::redundant_pic_cnt_present_flag, h264_stream_t::sh, SH_SLICE_TYPE_B, SH_SLICE_TYPE_I, SH_SLICE_TYPE_P, SH_SLICE_TYPE_SI, SH_SLICE_TYPE_SP, slice_header_t::slice_alpha_c0_offset_div2, slice_header_t::slice_beta_offset_div2, slice_header_t::slice_group_change_cycle, pps_t::slice_group_change_rate_minus1, pps_t::slice_group_map_type, slice_header_t::slice_qp_delta, slice_header_t::slice_qs_delta, slice_header_t::slice_type, slice_header_t::sp_for_switch_flag, h264_stream_t::sps, pps_t::weighted_bipred_idc, and pps_t::weighted_pred_flag.

Referenced by read_slice_layer_rbsp().

Here is the call graph for this function:

void read_slice_layer_rbsp h264_stream_t h,
bs_t b
 

Definition at line 574 of file h264_stream.c.

References read_slice_header().

Referenced by read_nal_unit().

Here is the call graph for this function:

void read_vui_parameters h264_stream_t h,
bs_t b
 

Definition at line 316 of file h264_stream.c.

References bs_read_u(), bs_read_u1(), bs_read_u8(), bs_read_ue(), read_hrd_parameters(), SAR_Extended, h264_stream_t::sps, and sps_t::vui.

Referenced by read_seq_parameter_set_rbsp().

Here is the call graph for this function:

void write_access_unit_delimiter_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1399 of file h264_stream.c.

References bs_write_u(), and write_rbsp_trailing_bits().

Referenced by write_nal_unit().

Here is the call graph for this function:

void write_dec_ref_pic_marking h264_stream_t h,
bs_t b
 

Definition at line 1708 of file h264_stream.c.

References bs_write_u1(), bs_write_ue(), slice_header_t::drpm, h264_stream_t::nal, nal_t::nal_unit_type, and h264_stream_t::sh.

Referenced by write_slice_header().

Here is the call graph for this function:

void write_end_of_seq_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1407 of file h264_stream.c.

Referenced by write_nal_unit().

void write_end_of_stream_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1412 of file h264_stream.c.

Referenced by write_nal_unit().

void write_filler_data_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1417 of file h264_stream.c.

References bs_write_f(), next_bits(), and write_rbsp_trailing_bits().

Here is the call graph for this function:

void write_hrd_parameters h264_stream_t h,
bs_t b
 

Definition at line 1246 of file h264_stream.c.

References bs_write_u(), bs_write_u1(), bs_write_ue(), sps_t::hrd, and h264_stream_t::sps.

Referenced by write_vui_parameters().

Here is the call graph for this function:

int write_nal_unit h264_stream_t h,
uint8_t *  buf,
int  size
 

Write a NAL unit to a byte buffer. The NAL which is written out has a type determined by h->nal and data which comes from other fields within h depending on its type.

Parameters:
[in,out] h the stream object
[out] buf the buffer
[in] size the size of the buffer
Returns:
the length of data actually written

Definition at line 976 of file h264_stream.c.

References bs_init(), bs_pos(), bs_write_f(), bs_write_u(), nal_t::forbidden_zero_bit, h264_stream_t::nal, nal_t::nal_ref_idc, nal_t::nal_unit_type, write_access_unit_delimiter_rbsp(), write_end_of_seq_rbsp(), write_end_of_stream_rbsp(), write_pic_parameter_set_rbsp(), write_seq_parameter_set_rbsp(), and write_slice_layer_rbsp().

Here is the call graph for this function:

void write_pic_parameter_set_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1284 of file h264_stream.c.

References pps_t::bottom_right, bs_write_se(), bs_write_u(), bs_write_u1(), bs_write_ue(), pps_t::chroma_qp_index_offset, pps_t::constrained_intra_pred_flag, pps_t::deblocking_filter_control_present_flag, pps_t::entropy_coding_mode_flag, log2, more_rbsp_data(), pps_t::num_ref_idx_l0_active_minus1, pps_t::num_ref_idx_l1_active_minus1, pps_t::num_slice_groups_minus1, pps_t::pic_init_qp_minus26, pps_t::pic_init_qs_minus26, pps_t::pic_order_present_flag, pps_t::pic_parameter_set_id, pps_t::pic_scaling_list_present_flag, pps_t::pic_scaling_matrix_present_flag, pps_t::pic_size_in_map_units_minus1, h264_stream_t::pps, pps_t::redundant_pic_cnt_present_flag, pps_t::run_length_minus1, pps_t::ScalingList4x4, pps_t::ScalingList8x8, pps_t::second_chroma_qp_index_offset, pps_t::seq_parameter_set_id, pps_t::slice_group_change_direction_flag, pps_t::slice_group_change_rate_minus1, pps_t::slice_group_id, pps_t::slice_group_map_type, pps_t::top_left, pps_t::transform_8x8_mode_flag, pps_t::UseDefaultScalingMatrix4x4Flag, pps_t::UseDefaultScalingMatrix8x8Flag, pps_t::weighted_bipred_idc, pps_t::weighted_pred_flag, write_rbsp_trailing_bits(), and write_scaling_list().

Referenced by write_nal_unit().

Here is the call graph for this function:

void write_pred_weight_table h264_stream_t h,
bs_t b
 

Definition at line 1647 of file h264_stream.c.

References bs_write_se(), bs_write_u1(), bs_write_ue(), sps_t::chroma_format_idc, pps_t::num_ref_idx_l0_active_minus1, pps_t::num_ref_idx_l1_active_minus1, h264_stream_t::pps, slice_header_t::pwt, h264_stream_t::sh, SH_SLICE_TYPE_B, slice_header_t::slice_type, and h264_stream_t::sps.

Referenced by write_slice_header().

Here is the call graph for this function:

void write_rbsp_slice_trailing_bits h264_stream_t h,
bs_t b
 

Definition at line 1468 of file h264_stream.c.

References bs_write_f(), pps_t::entropy_coding_mode_flag, more_rbsp_trailing_data(), h264_stream_t::pps, and write_rbsp_trailing_bits().

Referenced by write_slice_layer_rbsp().

Here is the call graph for this function:

void write_rbsp_trailing_bits h264_stream_t h,
bs_t b
 

Definition at line 1482 of file h264_stream.c.

References bs_byte_aligned(), and bs_write_f().

Referenced by write_access_unit_delimiter_rbsp(), write_filler_data_rbsp(), write_pic_parameter_set_rbsp(), write_rbsp_slice_trailing_bits(), and write_seq_parameter_set_rbsp().

Here is the call graph for this function:

void write_ref_pic_list_reordering h264_stream_t h,
bs_t b
 

Definition at line 1604 of file h264_stream.c.

References bs_write_u1(), bs_write_ue(), slice_header_t::rplr, h264_stream_t::sh, SH_SLICE_TYPE_B, SH_SLICE_TYPE_I, SH_SLICE_TYPE_SI, and slice_header_t::slice_type.

Referenced by write_slice_header().

Here is the call graph for this function:

void write_scaling_list bs_t b,
int *  scalingList,
int  sizeOfScalingList,
int  useDefaultScalingMatrixFlag
 

Definition at line 1146 of file h264_stream.c.

References bs_write_se().

Referenced by write_pic_parameter_set_rbsp(), and write_seq_parameter_set_rbsp().

Here is the call graph for this function:

void write_seq_parameter_set_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1055 of file h264_stream.c.

References sps_t::bit_depth_chroma_minus8, sps_t::bit_depth_luma_minus8, bs_write_se(), bs_write_u(), bs_write_u1(), bs_write_u8(), bs_write_ue(), sps_t::chroma_format_idc, sps_t::constraint_set0_flag, sps_t::constraint_set1_flag, sps_t::constraint_set2_flag, sps_t::constraint_set3_flag, sps_t::delta_pic_order_always_zero_flag, sps_t::direct_8x8_inference_flag, sps_t::frame_crop_bottom_offset, sps_t::frame_crop_left_offset, sps_t::frame_crop_right_offset, sps_t::frame_crop_top_offset, sps_t::frame_cropping_flag, sps_t::frame_mbs_only_flag, sps_t::gaps_in_frame_num_value_allowed_flag, sps_t::level_idc, sps_t::log2_max_frame_num_minus4, sps_t::log2_max_pic_order_cnt_lsb_minus4, sps_t::mb_adaptive_frame_field_flag, sps_t::num_ref_frames, sps_t::num_ref_frames_in_pic_order_cnt_cycle, sps_t::offset_for_non_ref_pic, sps_t::offset_for_ref_frame, sps_t::offset_for_top_to_bottom_field, sps_t::pic_height_in_map_units_minus1, sps_t::pic_order_cnt_type, sps_t::pic_width_in_mbs_minus1, sps_t::profile_idc, sps_t::qpprime_y_zero_transform_bypass_flag, sps_t::reserved_zero_4bits, sps_t::residual_colour_transform_flag, sps_t::ScalingList4x4, sps_t::ScalingList8x8, sps_t::seq_parameter_set_id, sps_t::seq_scaling_list_present_flag, sps_t::seq_scaling_matrix_present_flag, h264_stream_t::sps, sps_t::UseDefaultScalingMatrix4x4Flag, sps_t::UseDefaultScalingMatrix8x8Flag, sps_t::vui_parameters_present_flag, write_rbsp_trailing_bits(), write_scaling_list(), and write_vui_parameters().

Referenced by write_nal_unit().

Here is the call graph for this function:

void write_slice_header h264_stream_t h,
bs_t b
 

Definition at line 1497 of file h264_stream.c.

References slice_header_t::bottom_field_flag, bs_write_se(), bs_write_u(), bs_write_u1(), bs_write_ue(), slice_header_t::cabac_init_idc, pps_t::deblocking_filter_control_present_flag, sps_t::delta_pic_order_always_zero_flag, slice_header_t::delta_pic_order_cnt, slice_header_t::delta_pic_order_cnt_bottom, slice_header_t::direct_spatial_mv_pred_flag, slice_header_t::disable_deblocking_filter_idc, pps_t::entropy_coding_mode_flag, slice_header_t::field_pic_flag, slice_header_t::first_mb_in_slice, sps_t::frame_mbs_only_flag, slice_header_t::frame_num, slice_header_t::idr_pic_id, log2, sps_t::log2_max_frame_num_minus4, sps_t::log2_max_pic_order_cnt_lsb_minus4, h264_stream_t::nal, nal_t::nal_ref_idc, nal_t::nal_unit_type, slice_header_t::num_ref_idx_active_override_flag, slice_header_t::num_ref_idx_l0_active_minus1, slice_header_t::num_ref_idx_l1_active_minus1, pps_t::num_slice_groups_minus1, slice_header_t::pic_order_cnt_lsb, sps_t::pic_order_cnt_type, pps_t::pic_order_present_flag, slice_header_t::pic_parameter_set_id, pps_t::pic_size_in_map_units_minus1, h264_stream_t::pps, slice_header_t::redundant_pic_cnt, pps_t::redundant_pic_cnt_present_flag, h264_stream_t::sh, SH_SLICE_TYPE_B, SH_SLICE_TYPE_I, SH_SLICE_TYPE_P, SH_SLICE_TYPE_SI, SH_SLICE_TYPE_SP, slice_header_t::slice_alpha_c0_offset_div2, slice_header_t::slice_beta_offset_div2, slice_header_t::slice_group_change_cycle, pps_t::slice_group_change_rate_minus1, pps_t::slice_group_map_type, slice_header_t::slice_qp_delta, slice_header_t::slice_qs_delta, slice_header_t::slice_type, slice_header_t::sp_for_switch_flag, h264_stream_t::sps, pps_t::weighted_bipred_idc, pps_t::weighted_pred_flag, write_dec_ref_pic_marking(), write_pred_weight_table(), and write_ref_pic_list_reordering().

Referenced by write_slice_layer_rbsp().

Here is the call graph for this function:

void write_slice_layer_rbsp h264_stream_t h,
bs_t b
 

Definition at line 1428 of file h264_stream.c.

References write_rbsp_slice_trailing_bits(), and write_slice_header().

Referenced by write_nal_unit().

Here is the call graph for this function:

void write_vui_parameters h264_stream_t h,
bs_t b
 

Definition at line 1171 of file h264_stream.c.

References bs_write_u(), bs_write_u1(), bs_write_u8(), bs_write_ue(), SAR_Extended, h264_stream_t::sps, sps_t::vui, and write_hrd_parameters().

Referenced by write_seq_parameter_set_rbsp().

Here is the call graph for this function:


Generated on Sat Jul 22 22:05:40 2006 by  doxygen 1.4.4