GstVp8Parser

For more details about the structures, you can refer to the specifications: VP8-rfc6386.pdf

Functions

gst_vp8_parser_init

void 
gst_vp8_parser_init (GstVp8Parser * parser)

Initializes the supplied parser structure with its default values.

Parameters:

parser

The GstVp8Parser to initialize

Returns ( void ) –
No description available

Since : 1.4


gst_vp8_parser_parse_frame_header

GstVp8ParserResult
gst_vp8_parser_parse_frame_header (GstVp8Parser * parser,
                                   GstVp8FrameHdr * frame_hdr,
                                   const guint8 * data,
                                   gsize size)

Parses the VP8 bitstream contained in data, and fills in frame_hdr with the information. The supplied data shall point to a complete frame since there is no sync code specified for VP8 bitstreams. Thus, the size argument shall represent the whole frame size.

Parameters:

parser

The GstVp8Parser

frame_hdr

The GstVp8FrameHdr to fill

data

The data to parse

size

The size of the data to parse

Since : 1.4


Structures

GstVp8FrameHdr

struct _GstVp8FrameHdr
{
  guint8 key_frame;
  guint8 version;
  guint8 show_frame;
  guint8 data_chunk_size;
  guint32 first_part_size;

  /* if key_frame == 1 */
  guint16 width;
  guint16 height;
  guint8 horiz_scale_code;
  guint8 vert_scale_code;
  guint8 color_space;
  guint8 clamping_type;

  guint8 filter_type;
  guint8 loop_filter_level;
  guint8 sharpness_level;
  guint8 log2_nbr_of_dct_partitions;
  guint partition_size[8];

  GstVp8QuantIndices quant_indices;
  GstVp8TokenProbs token_probs;
  GstVp8MvProbs mv_probs;
  GstVp8ModeProbs mode_probs;

  guint8 refresh_entropy_probs;
  guint8 refresh_last;
  /* if key_frame != 1 */
  guint8 refresh_golden_frame;
  guint8 refresh_alternate_frame;
  guint8 copy_buffer_to_golden;
  guint8 copy_buffer_to_alternate;
  guint8 sign_bias_golden;
  guint8 sign_bias_alternate;

  guint8 mb_no_skip_coeff;
  guint8 prob_skip_false;

  /* if key_frame != 1 */
  guint8 prob_intra;
  guint8 prob_last;
  guint8 prob_gf;

  /* Range decoder state */
  guint8 rd_range;
  guint8 rd_value;
  guint8 rd_count;

  /* Size of the Frame Header in bits */
  guint header_size;
};

Frame header.

Fields

key_frame (guint8) –

indicates whether the frame is a key frame (1), or an inter frame (0)

version (guint8) –

version number

show_frame (guint8) –

indicates whether the frame is meant to be displayed (1), or not (0)

data_chunk_size (guint8) –

the size in bytes of the Uncompressed Data Chunk

first_part_size (guint32) –

the size in bytes of the first partition (control partition), excluding the uncompressed data chunk

width (guint16) –

the frame width in pixels

height (guint16) –

the frame height in pixels

horiz_scale_code (guint8) –

horizontal scale code value

vert_scale_code (guint8) –

vertical scale code value

color_space (guint8) –

defines the YUV color space of the sequence

clamping_type (guint8) –

specifies if the decoder is required to clamp the reconstructed pixel values

filter_type (guint8) –

determines whether the normal or the simple loop filter is used

loop_filter_level (guint8) –

controls the deblocking filter

sharpness_level (guint8) –

controls the deblocking filter

log2_nbr_of_dct_partitions (guint8) –

determines the number of separate partitions containing the DCT coefficients of the macroblocks

partition_size (guint [8] ) –

determines the size of each separate partition containing the DCT coefficients of the macroblocks, including the very last one (calculated size)

quant_indices (GstVp8QuantIndices) –

dequantization indices (see GstVp8QuantIndices)

token_probs (GstVp8TokenProbs) –

token probabilities (see GstVp8TokenProbs)

mv_probs (GstVp8MvProbs) –

probabilities used for motion vector decoding (see GstVp8MvProbs)

mode_probs (GstVp8ModeProbs) –

probabilities used for intra-prediction mode decoding tree (see GstVp8ModeProbs)

refresh_entropy_probs (guint8) –

determines whether updated token probabilities are used only for this frame or until further update

refresh_last (guint8) –

determines if the current decoded frame refreshes the last frame reference buffer

refresh_golden_frame (guint8) –

determines if the current decoded frame refreshes the golden frame

refresh_alternate_frame (guint8) –

determines if the current decoded frame refreshes the alternate reference frame

copy_buffer_to_golden (guint8) –

determines if the golden reference is replaced by another reference

copy_buffer_to_alternate (guint8) –

determines if the alternate reference is replaced by another reference

sign_bias_golden (guint8) –

controls the sign of motion vectors when the golden frame is referenced

sign_bias_alternate (guint8) –

controls the sign of motion vectors when the alternate frame is referenced

mb_no_skip_coeff (guint8) –

enables (0) or disables (1) the skipping of macroblocks containing no non-zero coefficients

prob_skip_false (guint8) –

indicates the probability that the macroblock is not skipped

prob_intra (guint8) –

indicates the probability of an intra macroblock

prob_last (guint8) –

indicates the probability that the last reference frame is used for inter-prediction

prob_gf (guint8) –

indicates the probability that the golden reference frame is used for inter-prediction

rd_range (guint8) –

last range decoder value for "Range"

rd_value (guint8) –

last range decoder value for "Value"

rd_count (guint8) –

number of bits left in range decoder "Value" (@rd_value)

header_size (guint) –

the size in bits of the Frame Header, thus excluding any Uncompressed Data Chunk bytes


GstVp8MbLfAdjustments

struct _GstVp8MbLfAdjustments
{
  guint8 loop_filter_adj_enable;
  guint8 mode_ref_lf_delta_update;

  /* if mode_ref_lf_delta_update == 1 */
  gint8 ref_frame_delta[4];
  gint8 mb_mode_delta[4];
};

MB-level loop filter adjustments.

Fields

loop_filter_adj_enable (guint8) –

indicates if the MB-level loop filter adjustment is on for the current frame

mode_ref_lf_delta_update (guint8) –

indicates if the delta values used in an adjustment are updated in the current frame

ref_frame_delta (gint8 [4] ) –

indicates the adjustment delta value corresponding to a certain used reference frame

mb_mode_delta (gint8 [4] ) –

indicates the adjustment delta value corresponding to a certain MB prediction mode


GstVp8ModeProbs

struct _GstVp8ModeProbs
{
  guint8 y_prob[4];
  guint8 uv_prob[3];
};

Probabilities used for intra-prediction mode decoding tree.

Each probability value in thie structure is live across frames, until they are reset to their default values on key frame.

Fields

y_prob (guint8 [4] ) –

indicates the branch probabilities of the luma intra-prediction mode decoding tree

uv_prob (guint8 [3] ) –

indicates the branch probabilities of the chroma intra-prediction mode decoding tree


GstVp8MvProbs

struct _GstVp8MvProbs
{
  guint8 prob[2][19];
};

Probabilities used for motion vector decoding, with cumulative updates applied.

Each probability value in this matrix is live across frames, until they are reset to their default values on key frame.

Fields

prob (guint8 [2][19] ) –

MV probability


GstVp8Parser

struct _GstVp8Parser
{
  GstVp8Segmentation segmentation;
  GstVp8MbLfAdjustments mb_lf_adjust;
  GstVp8TokenProbs token_probs;
  GstVp8MvProbs mv_probs;
  GstVp8ModeProbs mode_probs;
};

Parser context that needs to be live across frames. For instance the probabilities tables stored in GstVp8FrameHdr may depend on the previous frames.

Fields

segmentation (GstVp8Segmentation) –

segmentation feature data

mb_lf_adjust (GstVp8MbLfAdjustments) –

MB-level loop filter adjustments

token_probs (GstVp8TokenProbs) –

token probabilities

mv_probs (GstVp8MvProbs) –

probabilities used for motion vector decoding

mode_probs (GstVp8ModeProbs) –

probabilities used for intra-prediction mode decoding tree.


GstVp8QuantIndices

struct _GstVp8QuantIndices
{
  guint8 y_ac_qi;
  gint8 y_dc_delta;
  gint8 y2_dc_delta;
  gint8 y2_ac_delta;
  gint8 uv_dc_delta;
  gint8 uv_ac_delta;
};

Fields

y_ac_qi (guint8) –
No description available
y_dc_delta (gint8) –
No description available
y2_dc_delta (gint8) –
No description available
y2_ac_delta (gint8) –
No description available
uv_dc_delta (gint8) –
No description available
uv_ac_delta (gint8) –
No description available

GstVp8Segmentation

struct _GstVp8Segmentation
{
  guint8 segmentation_enabled;
  guint8 update_mb_segmentation_map;
  guint8 update_segment_feature_data;

  /* if update_segment_feature_data == 1 */
  guint8 segment_feature_mode;
  gint8 quantizer_update_value[4];
  gint8 lf_update_value[4];

  /* if update_mb_segmentation_map == 1 */
  guint8 segment_prob[3];
};

Segmentation feature data.

Fields

segmentation_enabled (guint8) –

enables the segmentation feature for the current frame

update_mb_segmentation_map (guint8) –

determines if the MB segmentation map is updated in the current frame

update_segment_feature_data (guint8) –

indicates if the segment feature data is updated in the current frame

segment_feature_mode (guint8) –

indicates the feature data update mode (0: delta, 1: absolute value)

quantizer_update_value (gint8 [4] ) –

indicates the update value for the segment quantizer

lf_update_value (gint8 [4] ) –

indicates the update value for the loop filter level

segment_prob (guint8 [3] ) –

indicates the branch probabilities of the segment_id decoding tree


GstVp8TokenProbs

struct _GstVp8TokenProbs
{
  guint8 prob[4][8][3][11];
};

Token probabilities, with cumulative updates applied.

Each probability value in this matrix is live across frames, until they are reset to their default values on key frame.

Fields

prob (guint8 [4][8][3][11] ) –

token probability


Enumerations

GstVp8ParserResult

typedef enum {
  GST_VP8_PARSER_OK,
  GST_VP8_PARSER_BROKEN_DATA,
  GST_VP8_PARSER_ERROR,
} GstVp8ParserResult;

The result of parsing VP8 data.

Members

GST_VP8_PARSER_OK (0) –

The parsing succeeded

GST_VP8_PARSER_BROKEN_DATA (1) –

The data to parse is broken

GST_VP8_PARSER_ERROR (2) –

An error accured when parsing


The results of the search are