FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hevc_parser.c File Reference
#include "libavutil/common.h"
#include "parser.h"
#include "hevc.h"
#include "golomb.h"

Go to the source code of this file.

Data Structures

struct  HEVCParseContext
 

Macros

#define START_CODE   0x000001
 start_code_prefix_one_3bytes
 

Functions

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.
 
static int parse_nal_units (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 Parse NAL units of found picture and decode some basic information.
 
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 int hevc_init (AVCodecParserContext *s)
 
static void hevc_close (AVCodecParserContext *s)
 

Variables

AVCodecParser ff_hevc_parser
 

Macro Definition Documentation

#define START_CODE   0x000001

start_code_prefix_one_3bytes

Definition at line 29 of file hevc_parser.c.

Referenced by hevc_find_frame_end(), and hevc_split().

Function Documentation

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 40 of file hevc_parser.c.

Referenced by hevc_parse().

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

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 87 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 260 of file hevc_parser.c.

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

Definition at line 287 of file hevc_parser.c.

static int hevc_init ( AVCodecParserContext s)
static

Definition at line 308 of file hevc_parser.c.

static void hevc_close ( AVCodecParserContext s)
static

Definition at line 319 of file hevc_parser.c.

Variable Documentation

AVCodecParser ff_hevc_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_HEVC },
.priv_data_size = sizeof(HEVCParseContext),
.parser_init = hevc_init,
.parser_parse = hevc_parse,
.parser_close = hevc_close,
}

Definition at line 345 of file hevc_parser.c.