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

Go to the source code of this file.

Macros

#define STARTCODE_TEST
 

Functions

int ff_hevc_extract_rbsp (HEVCContext *s, const uint8_t *src, int length, HEVCNAL *nal)
 Extract the raw (unescaped) HEVC bitstream. More...
 
static const char * nal_unit_name (int nal_type)
 
static int hls_nal_unit (HEVCNAL *nal, AVCodecContext *avctx)
 
int ff_hevc_split_packet (HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, int length, AVCodecContext *avctx, int is_nalff, int nal_length_size)
 Split an input packet into NAL units. More...
 

Macro Definition Documentation

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

Referenced by ff_hevc_extract_rbsp().

Function Documentation

int ff_hevc_extract_rbsp ( HEVCContext s,
const uint8_t src,
int  length,
HEVCNAL nal 
)

Extract the raw (unescaped) HEVC bitstream.

Definition at line 32 of file hevc_parse.c.

Referenced by ff_hevc_split_packet(), and generate_fake_vps().

static const char* nal_unit_name ( int  nal_type)
static

Definition at line 149 of file hevc_parse.c.

Referenced by hls_nal_unit().

static int hls_nal_unit ( HEVCNAL nal,
AVCodecContext avctx 
)
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 185 of file hevc_parse.c.

Referenced by ff_hevc_split_packet().

int ff_hevc_split_packet ( HEVCContext s,
HEVCPacket pkt,
const uint8_t buf,
int  length,
AVCodecContext avctx,
int  is_nalff,
int  nal_length_size 
)

Split an input packet into NAL units.

Definition at line 208 of file hevc_parse.c.

Referenced by decode_nal_units(), and parse_nal_units().