FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
h264_parser.c File Reference

H.264 / AVC / MPEG-4 part10 parser. More...

#include <assert.h>
#include <stdint.h>
#include "libavutil/avutil.h"
#include "libavutil/error.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/pixfmt.h"
#include "get_bits.h"
#include "golomb.h"
#include "h264.h"
#include "h264_sei.h"
#include "h264data.h"
#include "internal.h"
#include "mpegutils.h"
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  H264ParseContext
 

Macros

#define UNCHECKED_BITSTREAM_READER   1
 

Functions

static int h264_find_frame_end (H264ParseContext *p, const uint8_t *buf, int buf_size, void *logctx)
 
static int scan_mmco_reset (AVCodecParserContext *s, GetBitContext *gb, void *logctx)
 
static int get_avc_nalsize (H264ParseContext *p, const uint8_t *buf, int buf_size, int *buf_index, void *logctx)
 
static int parse_nal_units (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *const buf, int buf_size)
 Parse NAL units of found picture and decode some basic information. More...
 
static int h264_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
static int h264_split (AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
static void h264_close (AVCodecParserContext *s)
 
static av_cold int init (AVCodecParserContext *s)
 

Variables

AVCodecParser ff_h264_parser
 

Detailed Description

H.264 / AVC / MPEG-4 part10 parser.

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file h264_parser.c.

Macro Definition Documentation

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 28 of file h264_parser.c.

Function Documentation

static int h264_find_frame_end ( H264ParseContext p,
const uint8_t buf,
int  buf_size,
void logctx 
)
static

Definition at line 64 of file h264_parser.c.

Referenced by h264_parse().

static int scan_mmco_reset ( AVCodecParserContext s,
GetBitContext gb,
void logctx 
)
static

Definition at line 151 of file h264_parser.c.

Referenced by parse_nal_units().

static int get_avc_nalsize ( H264ParseContext p,
const uint8_t buf,
int  buf_size,
int *  buf_index,
void logctx 
)
inlinestatic

Definition at line 229 of file h264_parser.c.

Referenced by parse_nal_units().

static int parse_nal_units ( AVCodecParserContext s,
AVCodecContext avctx,
const uint8_t *const  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 257 of file h264_parser.c.

Referenced by h264_parse().

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

Definition at line 553 of file h264_parser.c.

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

Definition at line 611 of file h264_parser.c.

static void h264_close ( AVCodecParserContext s)
static

Definition at line 648 of file h264_parser.c.

static av_cold int init ( AVCodecParserContext s)
static

Definition at line 659 of file h264_parser.c.

Variable Documentation

AVCodecParser ff_h264_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_H264 },
.priv_data_size = sizeof(H264ParseContext),
.parser_init = init,
.parser_parse = h264_parse,
.parser_close = h264_close,
}
static char * split(char *message, char delim)
Definition: af_channelmap.c:81
static void h264_close(AVCodecParserContext *s)
Definition: h264_parser.c:648
static int h264_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Definition: h264_parser.c:611
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:659
static int h264_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: h264_parser.c:553

Definition at line 667 of file h264_parser.c.