FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
h2645_parse.c File Reference
#include <string.h>
#include "config.h"
#include "libavutil/intmath.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "bytestream.h"
#include "hevc.h"
#include "h264.h"
#include "h2645_parse.h"

Go to the source code of this file.

Macros

#define STARTCODE_TEST
 

Functions

int ff_h2645_extract_rbsp (const uint8_t *src, int length, H2645RBSP *rbsp, H2645NAL *nal, int small_padding)
 Extract the raw (unescaped) bitstream. More...
 
static const char * hevc_nal_unit_name (int nal_type)
 
static const char * h264_nal_unit_name (int nal_type)
 
static int get_bit_length (H2645NAL *nal, int skip_trailing_zeros)
 
static int hevc_parse_nal_header (H2645NAL *nal, void *logctx)
 
static int h264_parse_nal_header (H2645NAL *nal, void *logctx)
 
static int find_next_start_code (const uint8_t *buf, const uint8_t *next_avc)
 
int ff_h2645_packet_split (H2645Packet *pkt, const uint8_t *buf, int length, void *logctx, int is_nalff, int nal_length_size, enum AVCodecID codec_id, int small_padding)
 Split an input packet into NAL units. More...
 
void ff_h2645_packet_uninit (H2645Packet *pkt)
 Free all the allocated memory in the packet. More...
 

Variables

static const char * hevc_nal_type_name [64]
 
static const char * h264_nal_type_name [32]
 

Macro Definition Documentation

#define STARTCODE_TEST
Value:
if (i + 2 < length && src[i + 1] == 0 && src[i + 2] <= 3) { \
if (src[i + 2] != 3 && src[i + 2] != 0) { \
/* startcode, so we must be past the end */ \
length = i; \
} \
break; \
}
#define src
Definition: vp8dsp.c:254
GLsizei GLsizei * length
Definition: opengl_enc.c:115
if(ret< 0)
Definition: vf_mcdeint.c:279

Referenced by ff_h2645_extract_rbsp().

Function Documentation

int ff_h2645_extract_rbsp ( const uint8_t src,
int  length,
H2645RBSP rbsp,
H2645NAL nal,
int  small_padding 
)

Extract the raw (unescaped) bitstream.

Definition at line 34 of file h2645_parse.c.

Referenced by ff_h2645_packet_split(), generate_fake_vps(), and parse_nal_units().

static const char* hevc_nal_unit_name ( int  nal_type)
static

Definition at line 216 of file h2645_parse.c.

Referenced by hevc_parse_nal_header().

static const char* h264_nal_unit_name ( int  nal_type)
static

Definition at line 257 of file h2645_parse.c.

Referenced by h264_parse_nal_header().

static int get_bit_length ( H2645NAL nal,
int  skip_trailing_zeros 
)
static

Definition at line 263 of file h2645_parse.c.

Referenced by ff_h2645_packet_split().

static int hevc_parse_nal_header ( H2645NAL nal,
void logctx 
)
static
Returns
AVERROR_INVALIDDATA if the packet is not a valid NAL unit, 0 if the unit should be skipped, 1 otherwise

Definition at line 292 of file h2645_parse.c.

Referenced by ff_h2645_packet_split().

static int h264_parse_nal_header ( H2645NAL nal,
void logctx 
)
static

Definition at line 314 of file h2645_parse.c.

Referenced by ff_h2645_packet_split().

static int find_next_start_code ( const uint8_t buf,
const uint8_t next_avc 
)
static

Definition at line 331 of file h2645_parse.c.

Referenced by ff_h2645_packet_split().

int ff_h2645_packet_split ( H2645Packet pkt,
const uint8_t buf,
int  length,
void logctx,
int  is_nalff,
int  nal_length_size,
enum AVCodecID  codec_id,
int  small_padding 
)

Split an input packet into NAL units.

Definition at line 346 of file h2645_parse.c.

Referenced by cbs_h2645_split_fragment(), decode_extradata_ps(), decode_nal_units(), extract_extradata_h2645(), hevc_decode_nal_units(), and parse_nal_units().

void ff_h2645_packet_uninit ( H2645Packet pkt)

Variable Documentation

const char* hevc_nal_type_name[64]
static

Definition at line 149 of file h2645_parse.c.

Referenced by hevc_nal_unit_name().

const char* h264_nal_type_name[32]
static

Definition at line 222 of file h2645_parse.c.

Referenced by h264_nal_unit_name().