libavcodec/h264_ps.c File Reference

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

#include "libavutil/imgutils.h"
#include "internal.h"
#include "dsputil.h"
#include "avcodec.h"
#include "h264.h"
#include "h264data.h"
#include "golomb.h"
#include <assert.h>

Go to the source code of this file.

Defines

#define QP(qP, depth)   ( (qP)+6*((depth)-8) )
#define CHROMA_QP_TABLE_END(d)

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)
 Decode SPS.
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.

Variables

static const AVRational pixel_aspect [17]
const uint8_t ff_h264_chroma_qp [5][QP_MAX_NUM+1]
 One chroma qp table for each possible bit depth (8-12).
static const uint8_t default_scaling4 [2][16]
static const uint8_t default_scaling8 [2][64]


Detailed Description

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

Author:
Michael Niedermayer <michaelni@gmx.at>

Definition in file h264_ps.c.


Define Documentation

#define CHROMA_QP_TABLE_END (  ) 

Value:

QP(0,d),  QP(1,d),  QP(2,d),  QP(3,d),  QP(4,d),  QP(5,d),\
     QP(6,d),  QP(7,d),  QP(8,d),  QP(9,d), QP(10,d), QP(11,d),\
    QP(12,d), QP(13,d), QP(14,d), QP(15,d), QP(16,d), QP(17,d),\
    QP(18,d), QP(19,d), QP(20,d), QP(21,d), QP(22,d), QP(23,d),\
    QP(24,d), QP(25,d), QP(26,d), QP(27,d), QP(28,d), QP(29,d),\
    QP(29,d), QP(30,d), QP(31,d), QP(32,d), QP(32,d), QP(33,d),\
    QP(34,d), QP(34,d), QP(35,d), QP(35,d), QP(36,d), QP(36,d),\
    QP(37,d), QP(37,d), QP(37,d), QP(38,d), QP(38,d), QP(38,d),\
    QP(39,d), QP(39,d), QP(39,d), QP(39,d)

Definition at line 62 of file h264_ps.c.

#define QP ( qP,
depth   )     ( (qP)+6*((depth)-8) )

Definition at line 60 of file h264_ps.c.

Referenced by dering_TMPL(), do_a_deblock_C(), postProcess_TMPL(), and vertX1Filter_TMPL().


Function Documentation

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

Definition at line 485 of file h264_ps.c.

Referenced by ff_h264_decode_picture_parameter_set().

static int decode_hrd_parameters ( H264Context h,
SPS sps 
) [inline, static]

Definition at line 133 of file h264_ps.c.

Referenced by decode_vui_parameters().

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 262 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]

static int decode_vui_parameters ( H264Context h,
SPS sps 
) [inline, static]

Definition at line 158 of file h264_ps.c.

Referenced by ff_h264_decode_seq_parameter_set().

int ff_h264_decode_picture_parameter_set ( H264Context h,
int  bit_length 
)

Decode PPS.

Definition at line 508 of file h264_ps.c.

Referenced by decode_nal_units(), and parse_nal_units().

int ff_h264_decode_seq_parameter_set ( H264Context h  ) 

Decode SPS.

Definition at line 314 of file h264_ps.c.

Referenced by decode_nal_units(), and parse_nal_units().

static int more_rbsp_data_in_pps ( H264Context h,
PPS pps 
) [static]

Definition at line 493 of file h264_ps.c.

Referenced by ff_h264_decode_picture_parameter_set().


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 101 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 113 of file h264_ps.c.

Referenced by decode_scaling_matrices().

const uint8_t ff_h264_chroma_qp[5][QP_MAX_NUM+1]

Initial value:

 {
    {

    },
    {
        0, 1, 2, 3, 4, 5,

    },
    {
        0, 1, 2, 3,  4,  5,
        6, 7, 8, 9, 10, 11,

    },
    {
        0,  1, 2, 3,  4,  5,
        6,  7, 8, 9, 10, 11,
        12,13,14,15, 16, 17,

    },
    {
        0,  1, 2, 3,  4,  5,
        6,  7, 8, 9, 10, 11,
        12,13,14,15, 16, 17,
        18,19,20,21, 22, 23,

    },
}
One chroma qp table for each possible bit depth (8-12).

Definition at line 73 of file h264_ps.c.

Referenced by build_qp_table(), and hl_decode_mb_internal().

const AVRational pixel_aspect[17] [static]

Initial value:

{
 {0, 1},
 {1, 1},
 {12, 11},
 {10, 11},
 {16, 11},
 {40, 33},
 {24, 11},
 {20, 11},
 {32, 11},
 {80, 33},
 {18, 11},
 {15, 11},
 {64, 33},
 {160,99},
 {4, 3},
 {3, 2},
 {2, 1},
}

Definition at line 40 of file h264_ps.c.


Generated on Fri Oct 26 02:46:08 2012 for FFmpeg by  doxygen 1.5.8