FFmpeg
Data Structures | Macros | Functions | Variables
evc_parser.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "evc.h"
#include "evc_parse.h"

Go to the source code of this file.

Data Structures

struct  EVCParserContext
 

Macros

#define NUM_CHROMA_FORMATS   4
 

Functions

static int parse_nal_unit (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
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. More...
 
static int decode_extradata (AVCodecParserContext *s, AVCodecContext *avctx)
 
static int evc_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
static void evc_parser_close (AVCodecParserContext *s)
 

Variables

static enum AVPixelFormat pix_fmts_8bit [NUM_CHROMA_FORMATS]
 
static enum AVPixelFormat pix_fmts_9bit [NUM_CHROMA_FORMATS]
 
static enum AVPixelFormat pix_fmts_10bit [NUM_CHROMA_FORMATS]
 
static enum AVPixelFormat pix_fmts_12bit [NUM_CHROMA_FORMATS]
 
static enum AVPixelFormat pix_fmts_14bit [NUM_CHROMA_FORMATS]
 
static enum AVPixelFormat pix_fmts_16bit [NUM_CHROMA_FORMATS]
 
const AVCodecParser ff_evc_parser
 

Macro Definition Documentation

◆ NUM_CHROMA_FORMATS

#define NUM_CHROMA_FORMATS   4

Definition at line 35 of file evc_parser.c.

Function Documentation

◆ parse_nal_unit()

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

Definition at line 61 of file evc_parser.c.

Referenced by decode_extradata(), and parse_nal_units().

◆ parse_nal_units()

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

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

Parameters
scodec parser context
avctxcodec context
bufbuffer with field/frame data
buf_sizesize of the buffer

Definition at line 220 of file evc_parser.c.

Referenced by evc_parse().

◆ decode_extradata()

static int decode_extradata ( AVCodecParserContext s,
AVCodecContext avctx 
)
static

Definition at line 256 of file evc_parser.c.

Referenced by evc_parse().

◆ evc_parse()

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

Definition at line 333 of file evc_parser.c.

◆ evc_parser_close()

static void evc_parser_close ( AVCodecParserContext s)
static

Definition at line 365 of file evc_parser.c.

Variable Documentation

◆ pix_fmts_8bit

enum AVPixelFormat pix_fmts_8bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 37 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ pix_fmts_9bit

enum AVPixelFormat pix_fmts_9bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 41 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ pix_fmts_10bit

enum AVPixelFormat pix_fmts_10bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 45 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ pix_fmts_12bit

enum AVPixelFormat pix_fmts_12bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 49 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ pix_fmts_14bit

enum AVPixelFormat pix_fmts_14bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 53 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ pix_fmts_16bit

enum AVPixelFormat pix_fmts_16bit[NUM_CHROMA_FORMATS]
static
Initial value:

Definition at line 57 of file evc_parser.c.

Referenced by parse_nal_unit().

◆ ff_evc_parser

const AVCodecParser ff_evc_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_EVC },
.priv_data_size = sizeof(EVCParserContext),
.parser_parse = evc_parse,
.parser_close = evc_parser_close,
}

Definition at line 372 of file evc_parser.c.

AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:478
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:458
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:476
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:462
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:481
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:490
AV_CODEC_ID_EVC
@ AV_CODEC_ID_EVC
Definition: codec_id.h:321
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:491
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:475
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:489
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:461
evc_parse
static int evc_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: evc_parser.c:333
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:459
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:479
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:483
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:485
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:477
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:482
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:487
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
EVCParserContext
Definition: evc_parser.c:28
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:488
evc_parser_close
static void evc_parser_close(AVCodecParserContext *s)
Definition: evc_parser.c:365
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:460
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:486