FFmpeg
Data Structures | Macros | Functions | Variables
lcevc_parser.c File Reference
#include <stdint.h>
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
#include "h2645_parse.h"
#include "lcevc.h"
#include "parser.h"
#include "parser_internal.h"

Go to the source code of this file.

Data Structures

struct  LCEVCParserContext
 

Macros

#define START_CODE   0x000001
 start_code_prefix_one_3bytes More...
 

Functions

static int lcevc_find_frame_end (AVCodecParserContext *s, const uint8_t *buf, int buf_size)
 
static uint64_t get_mb (GetBitContext *s)
 
static int parse_nal_unit (AVCodecParserContext *s, AVCodecContext *avctx, const H2645NAL *nal)
 
static int parse_nal_units (AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx)
 
static int lcevc_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
static void lcevc_parser_close (AVCodecParserContext *s)
 

Variables

static enum AVPixelFormat pix_fmts [4][4]
 
struct {
   int   width
 
   int   height
 
resolution_type_lut [63]
 
const FFCodecParser ff_lcevc_parser
 

Macro Definition Documentation

◆ START_CODE

#define START_CODE   0x000001

start_code_prefix_one_3bytes

Definition at line 31 of file lcevc_parser.c.

Function Documentation

◆ lcevc_find_frame_end()

static int lcevc_find_frame_end ( AVCodecParserContext s,
const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 43 of file lcevc_parser.c.

Referenced by lcevc_parse().

◆ get_mb()

static uint64_t get_mb ( GetBitContext s)
inlinestatic

Definition at line 103 of file lcevc_parser.c.

Referenced by parse_nal_unit().

◆ parse_nal_unit()

static int parse_nal_unit ( AVCodecParserContext s,
AVCodecContext avctx,
const H2645NAL nal 
)
static

Definition at line 119 of file lcevc_parser.c.

Referenced by parse_nal_units().

◆ parse_nal_units()

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

Definition at line 206 of file lcevc_parser.c.

Referenced by lcevc_parse().

◆ lcevc_parse()

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

Definition at line 241 of file lcevc_parser.c.

◆ lcevc_parser_close()

static void lcevc_parser_close ( AVCodecParserContext s)
static

Definition at line 276 of file lcevc_parser.c.

Variable Documentation

◆ pix_fmts

enum AVPixelFormat pix_fmts[4][4]
static

◆ width

int width

Definition at line 85 of file lcevc_parser.c.

◆ height

int height

Definition at line 86 of file lcevc_parser.c.

◆ resolution_type_lut

const { ... } resolution_type_lut[63]
Initial value:
= {
{ 0, 0},
{ 360, 200 }, { 400, 240 }, { 480, 320 }, { 640, 360 },
{ 640, 480 }, { 768, 480 }, { 800, 600 }, { 852, 480 },
{ 854, 480 }, { 856, 480 }, { 960, 540 }, { 960, 640 },
{ 1024, 576 }, { 1024, 600 }, { 1024, 768 }, { 1152, 864 },
{ 1280, 720 }, { 1280, 800 }, { 1280, 1024 }, { 1360, 768 },
{ 1366, 768 }, { 1920, 1200 }, { 2048, 1080 }, { 2048, 1152 },
{ 2048, 1536 }, { 2160, 1440 }, { 2560, 1440 }, { 2560, 1600 },
{ 2560, 2048 }, { 3200, 1800 }, { 3200, 2048 }, { 3200, 2400 },
{ 3440, 1440 }, { 3840, 1600 }, { 3840, 2160 }, { 3840, 2400 },
{ 4096, 2160 }, { 4096, 3072 }, { 5120, 2880 }, { 5120, 3200 },
{ 5120, 4096 }, { 6400, 4096 }, { 6400, 4800 }, { 7680, 4320 },
{ 7680, 4800 },
}

Referenced by parse_nal_unit().

◆ ff_lcevc_parser

const FFCodecParser ff_lcevc_parser
Initial value:

Definition at line 285 of file lcevc_parser.c.

AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:539
LCEVCParserContext
Definition: lcevc_parser.c:33
close
static av_cold void close(AVCodecParserContext *s)
Definition: apv_parser.c:197
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:542
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:521
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:519
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:540
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
parse
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: apv_parser.c:92
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:544
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:546
AV_CODEC_ID_LCEVC
@ AV_CODEC_ID_LCEVC
Definition: codec_id.h:615
lcevc_parse
static int lcevc_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: lcevc_parser.c:241
PARSER_CODEC_LIST
#define PARSER_CODEC_LIST(...)
Definition: parser_internal.h:76
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:543
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:548
lcevc_parser_close
static void lcevc_parser_close(AVCodecParserContext *s)
Definition: lcevc_parser.c:276
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
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:549
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:520
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:547