FFmpeg
Data Structures | Macros | Functions | Variables
hevc_parser.c File Reference
#include "libavutil/common.h"
#include "golomb.h"
#include "hevc.h"
#include "hevc_parse.h"
#include "hevc_ps.h"
#include "hevc_sei.h"
#include "h2645_parse.h"
#include "internal.h"
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  HEVCParserContext
 

Macros

#define START_CODE   0x000001
 start_code_prefix_one_3bytes More...
 
#define IS_IRAP_NAL(nal)   (nal->type >= 16 && nal->type <= 23)
 
#define IS_IDR_NAL(nal)   (nal->type == HEVC_NAL_IDR_W_RADL || nal->type == HEVC_NAL_IDR_N_LP)
 

Functions

static int hevc_parse_slice_header (AVCodecParserContext *s, H2645NAL *nal, AVCodecContext *avctx)
 
static int parse_nal_units (AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx)
 Parse NAL units of found picture and decode some basic information. More...
 
static int hevc_find_frame_end (AVCodecParserContext *s, const uint8_t *buf, int buf_size)
 Find the end of the current frame in the bitstream. More...
 
static int hevc_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
static int hevc_split (AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
static void hevc_parser_close (AVCodecParserContext *s)
 

Variables

AVCodecParser ff_hevc_parser
 

Macro Definition Documentation

#define START_CODE   0x000001

start_code_prefix_one_3bytes

Definition at line 34 of file hevc_parser.c.

Referenced by hevc_find_frame_end(), and hevc_split().

#define IS_IRAP_NAL (   nal)    (nal->type >= 16 && nal->type <= 23)

Definition at line 36 of file hevc_parser.c.

Referenced by hevc_parse_slice_header().

#define IS_IDR_NAL (   nal)    (nal->type == HEVC_NAL_IDR_W_RADL || nal->type == HEVC_NAL_IDR_N_LP)

Definition at line 37 of file hevc_parser.c.

Referenced by hevc_parse_slice_header().

Function Documentation

static int hevc_parse_slice_header ( AVCodecParserContext s,
H2645NAL nal,
AVCodecContext avctx 
)
static

Definition at line 55 of file hevc_parser.c.

Referenced by parse_nal_units().

static int parse_nal_units ( AVCodecParserContext s,
const uint8_t buf,
int  buf_size,
AVCodecContext avctx 
)
static

Parse NAL units of found picture and decode some basic information.

Parameters
sparser context.
avctxcodec context.
bufbuffer with field/frame data.
buf_sizesize of the buffer.

Definition at line 181 of file hevc_parser.c.

Referenced by hevc_parse().

static int hevc_find_frame_end ( AVCodecParserContext s,
const uint8_t buf,
int  buf_size 
)
static

Find the end of the current frame in the bitstream.

Returns
the position of the first byte of the next frame, or END_NOT_FOUND

Definition at line 258 of file hevc_parser.c.

Referenced by hevc_parse().

static int hevc_parse ( AVCodecParserContext s,
AVCodecContext avctx,
const uint8_t **  poutbuf,
int poutbuf_size,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 298 of file hevc_parser.c.

static int hevc_split ( AVCodecContext avctx,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 337 of file hevc_parser.c.

static void hevc_parser_close ( AVCodecParserContext s)
static

Definition at line 369 of file hevc_parser.c.

Variable Documentation

AVCodecParser ff_hevc_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_HEVC },
.priv_data_size = sizeof(HEVCParserContext),
.parser_parse = hevc_parse,
.parser_close = hevc_parser_close,
}
static int hevc_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Definition: hevc_parser.c:337
static char * split(char *message, char delim)
Definition: af_channelmap.c:81
static int hevc_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: hevc_parser.c:298
static void hevc_parser_close(AVCodecParserContext *s)
Definition: hevc_parser.c:369

Definition at line 380 of file hevc_parser.c.