FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
h264_ps.c File Reference

H.264 / AVC / MPEG4 part10 parameter set decoding. More...

#include <inttypes.h>
#include "libavutil/imgutils.h"
#include "internal.h"
#include "mathops.h"
#include "avcodec.h"
#include "h264.h"
#include "h264data.h"
#include "golomb.h"

Go to the source code of this file.

Macros

#define MAX_LOG2_MAX_FRAME_NUM   (12 + 4)
 
#define MIN_LOG2_MAX_FRAME_NUM   4
 

Functions

static int decode_hrd_parameters (H264Context *h, SPS *sps)
 
static int decode_vui_parameters (H264Context *h, SPS *sps)
 
static void decode_scaling_list (H264Context *h, uint8_t *factors, int size, const uint8_t *jvt_list, const uint8_t *fallback_list)
 
static void decode_scaling_matrices (H264Context *h, SPS *sps, PPS *pps, int is_sps, uint8_t(*scaling_matrix4)[16], uint8_t(*scaling_matrix8)[64])
 
int ff_h264_decode_seq_parameter_set (H264Context *h, int ignore_truncation)
 Decode SPS. More...
 
static void build_qp_table (PPS *pps, int t, int index, const int depth)
 
static int more_rbsp_data_in_pps (H264Context *h, PPS *pps)
 
int ff_h264_decode_picture_parameter_set (H264Context *h, int bit_length)
 Decode PPS. More...
 

Variables

static const uint8_t default_scaling4 [2][16]
 
static const uint8_t default_scaling8 [2][64]
 
static const int level_max_dpb_mbs [][2]
 

Detailed Description

H.264 / AVC / MPEG4 part10 parameter set decoding.

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file h264_ps.c.

Macro Definition Documentation

#define MAX_LOG2_MAX_FRAME_NUM   (12 + 4)

Definition at line 38 of file h264_ps.c.

Referenced by ff_h264_decode_seq_parameter_set().

#define MIN_LOG2_MAX_FRAME_NUM   4

Definition at line 39 of file h264_ps.c.

Referenced by ff_h264_decode_seq_parameter_set().

Function Documentation

static int decode_hrd_parameters ( H264Context h,
SPS sps 
)
inlinestatic

Definition at line 87 of file h264_ps.c.

Referenced by decode_vui_parameters().

static int decode_vui_parameters ( H264Context h,
SPS sps 
)
inlinestatic

Definition at line 112 of file h264_ps.c.

Referenced by ff_h264_decode_seq_parameter_set().

static void decode_scaling_list ( H264Context h,
uint8_t factors,
int  size,
const uint8_t jvt_list,
const uint8_t fallback_list 
)
static

Definition at line 227 of file h264_ps.c.

Referenced by decode_scaling_matrices().

static void decode_scaling_matrices ( H264Context h,
SPS sps,
PPS pps,
int  is_sps,
uint8_t(*)  scaling_matrix4[16],
uint8_t(*)  scaling_matrix8[64] 
)
static
int ff_h264_decode_seq_parameter_set ( H264Context h,
int  ignore_truncation 
)

Decode SPS.

Definition at line 280 of file h264_ps.c.

Referenced by decode_nal_units(), and parse_nal_units().

static void build_qp_table ( PPS pps,
int  t,
int  index,
const int  depth 
)
static

Definition at line 563 of file h264_ps.c.

Referenced by ff_h264_decode_picture_parameter_set().

static int more_rbsp_data_in_pps ( H264Context h,
PPS pps 
)
static

Definition at line 572 of file h264_ps.c.

Referenced by ff_h264_decode_picture_parameter_set().

int ff_h264_decode_picture_parameter_set ( H264Context h,
int  bit_length 
)

Decode PPS.

Definition at line 587 of file h264_ps.c.

Referenced by decode_nal_units(), and parse_nal_units().

Variable Documentation

const uint8_t default_scaling4[2][16]
static
Initial value:
= {
{ 6, 13, 20, 28, 13, 20, 28, 32,
20, 28, 32, 37, 28, 32, 37, 42 },
{ 10, 14, 20, 24, 14, 20, 24, 27,
20, 24, 27, 30, 24, 27, 30, 34 }
}

Definition at line 41 of file h264_ps.c.

Referenced by decode_scaling_matrices().

const uint8_t default_scaling8[2][64]
static
Initial value:
= {
{ 6, 10, 13, 16, 18, 23, 25, 27,
10, 11, 16, 18, 23, 25, 27, 29,
13, 16, 18, 23, 25, 27, 29, 31,
16, 18, 23, 25, 27, 29, 31, 33,
18, 23, 25, 27, 29, 31, 33, 36,
23, 25, 27, 29, 31, 33, 36, 38,
25, 27, 29, 31, 33, 36, 38, 40,
27, 29, 31, 33, 36, 38, 40, 42 },
{ 9, 13, 15, 17, 19, 21, 22, 24,
13, 13, 17, 19, 21, 22, 24, 25,
15, 17, 19, 21, 22, 24, 25, 27,
17, 19, 21, 22, 24, 25, 27, 28,
19, 21, 22, 24, 25, 27, 28, 30,
21, 22, 24, 25, 27, 28, 30, 32,
22, 24, 25, 27, 28, 30, 32, 33,
24, 25, 27, 28, 30, 32, 33, 35 }
}

Definition at line 48 of file h264_ps.c.

Referenced by decode_scaling_matrices().

const int level_max_dpb_mbs[][2]
static
Initial value:
= {
{ 10, 396 },
{ 11, 900 },
{ 12, 2376 },
{ 13, 2376 },
{ 20, 2376 },
{ 21, 4752 },
{ 22, 8100 },
{ 30, 8100 },
{ 31, 18000 },
{ 32, 20480 },
{ 40, 32768 },
{ 41, 32768 },
{ 42, 34816 },
{ 50, 110400 },
{ 51, 184320 },
{ 52, 184320 },
}

Definition at line 68 of file h264_ps.c.

Referenced by ff_h264_decode_seq_parameter_set().