wut  v1.5.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
H264 Stream

Data Structures

struct  H264DecodedVuiParameters
 
struct  H264DecodeResult
 
struct  H264DecodeOutput
 

Typedefs

typedef struct H264DecodedVuiParameters H264DecodedVuiParameters
 
typedef struct H264DecodeResult H264DecodeResult
 
typedef struct H264DecodeOutput H264DecodeOutput
 
typedef void(* H264DECFptrOutputFn) (H264DecodeOutput *output)
 
typedef enum H264Error H264Error
 h264 library errors. More...
 

Enumerations

enum  H264Error {
  H264_ERROR_OK = 0 ,
  H264_ERROR_INVALID_PPS = 24 ,
  H264_ERROR_INVALID_SPS = 26 ,
  H264_ERROR_INVALID_SLICEHEADER = 61 ,
  H264_ERROR_GENERIC = 0x1000000 ,
  H264_ERROR_INVALID_PARAMETER = 0x1010000 ,
  H264_ERROR_OUT_OF_MEMORY = 0x1020000 ,
  H264_ERROR_INVALID_PROFILE = 0x1080000
}
 h264 library errors. More...
 

Functions

H264Error H264DECCheckDecunitLength (void *memory, const uint8_t *buffer, int32_t bufferLength, int32_t offset, int32_t *outLength)
 Check that the stream contains sufficient data to decode an entire frame. More...
 
H264Error H264DECCheckSkipableFrame (const uint8_t *buffer, int32_t bufferLength, BOOL *outSkippable)
 Check if the next NALU can be skipped without breaking decoding. More...
 
H264Error H264DECFindDecstartpoint (const uint8_t *buffer, int32_t bufferLength, int32_t *outOffset)
 Find the first SPS in the stream. More...
 
int32_t H264DECFindIdrpoint (const uint8_t *buffer, int32_t bufferLength, int32_t *outOffset)
 Find the first "IDR point" in the stream. More...
 
H264Error H264DECGetImageSize (const uint8_t *buffer, int32_t bufferLength, int32_t offset, int32_t *outWidth, int32_t *outHeight)
 Parse the H264 stream and read the width & height from the first found SPS. More...
 

Detailed Description


Data Structure Documentation

◆ H264DecodedVuiParameters

struct H264DecodedVuiParameters

Definition at line 49 of file stream.h.

Data Fields
uint8_t aspect_ratio_info_present_flag
uint8_t aspect_ratio_idc
int16_t sar_width
int16_t sar_height
uint8_t overscan_info_present_flag
uint8_t overscan_appropriate_flag
uint8_t video_signal_type_present_flag
uint8_t video_format
uint8_t video_full_range_flag
uint8_t colour_description_present_flag
uint8_t colour_primaries
uint8_t transfer_characteristics
uint8_t matrix_coefficients
uint8_t chroma_loc_info_present_flag
uint8_t chroma_sample_loc_type_top_field
uint8_t chroma_sample_loc_type_bottom_field
uint8_t timing_info_present_flag
uint32_t num_units_in_tick
uint32_t time_scale
uint8_t fixed_frame_rate_flag
uint8_t nal_hrd_parameters_present_flag
uint8_t vcl_hrd_parameters_present_flag
uint8_t low_delay_hrd_flag
uint8_t pic_struct_present_flag
uint8_t bitstream_restriction_flag
uint8_t motion_vectors_over_pic_boundaries_flag
int16_t max_bytes_per_pic_denom
int16_t max_bits_per_mb_denom
int16_t log2_max_mv_length_horizontal
int16_t log2_max_mv_length_vertical
int16_t num_reorder_frames
int16_t max_dec_frame_buffering

◆ H264DecodeResult

struct H264DecodeResult

Definition at line 120 of file stream.h.

Data Fields
int32_t status
double timestamp
int32_t width
int32_t height
int32_t nextLine
uint8_t cropEnableFlag
int32_t cropTop
int32_t cropBottom
int32_t cropLeft
int32_t cropRight
uint8_t panScanEnableFlag
int32_t panScanTop
int32_t panScanBottom
int32_t panScanLeft
int32_t panScanRight
void * framebuffer
uint8_t vui_parameters_present_flag
H264DecodedVuiParameters * vui_parameters

◆ H264DecodeOutput

struct H264DecodeOutput

Definition at line 166 of file stream.h.

Data Fields
int32_t frameCount Number of frames output.
H264DecodeResult ** decodeResults Frames.
void * userMemory User memory pointer passed into SetParam.

Typedef Documentation

◆ H264DecodedVuiParameters

Definition at line 1 of file stream.h.

◆ H264DecodeResult

Definition at line 1 of file stream.h.

◆ H264DecodeOutput

Definition at line 1 of file stream.h.

◆ H264DECFptrOutputFn

typedef void(* H264DECFptrOutputFn) (H264DecodeOutput *output)

Definition at line 17 of file stream.h.

◆ H264Error

typedef enum H264Error H264Error

h264 library errors.

Enumeration Type Documentation

◆ H264Error

enum H264Error

h264 library errors.

Enumerator
H264_ERROR_OK 

No errors.

H264_ERROR_INVALID_PPS 

Invalid picture parameter set.

H264_ERROR_INVALID_SPS 

Invalid sequence parameter set.

H264_ERROR_INVALID_SLICEHEADER 

Invalid slice header.

H264_ERROR_GENERIC 

Generic h264 error.

H264_ERROR_INVALID_PARAMETER 

Invalid parameters passed.

H264_ERROR_OUT_OF_MEMORY 

The amount of memory provided to the h264 library is insufficient.

H264_ERROR_INVALID_PROFILE 

Invalid h264 stream profile.

Only the baseline (66), main (77) and high (100) profiles are allowed.

Definition at line 20 of file stream.h.

Function Documentation

◆ H264DECCheckDecunitLength()

H264Error H264DECCheckDecunitLength ( void *  memory,
const uint8_t *  buffer,
int32_t  bufferLength,
int32_t  offset,
int32_t *  outLength 
)

Check that the stream contains sufficient data to decode an entire frame.

◆ H264DECCheckSkipableFrame()

H264Error H264DECCheckSkipableFrame ( const uint8_t *  buffer,
int32_t  bufferLength,
BOOL outSkippable 
)

Check if the next NALU can be skipped without breaking decoding.

◆ H264DECFindDecstartpoint()

H264Error H264DECFindDecstartpoint ( const uint8_t *  buffer,
int32_t  bufferLength,
int32_t *  outOffset 
)

Find the first SPS in the stream.

◆ H264DECFindIdrpoint()

int32_t H264DECFindIdrpoint ( const uint8_t *  buffer,
int32_t  bufferLength,
int32_t *  outOffset 
)

Find the first "IDR point" in the stream.

An IDR point is either:

  • If an SPS or PPS header is found before the IDR and there are no non-IDR inbetween the SPS/PPS and IDR then return the first of the SPS/PPS.
  • The first found IDR.

◆ H264DECGetImageSize()

H264Error H264DECGetImageSize ( const uint8_t *  buffer,
int32_t  bufferLength,
int32_t  offset,
int32_t *  outWidth,
int32_t *  outHeight 
)

Parse the H264 stream and read the width & height from the first found SPS.