FFmpeg
Data Structures | Enumerations | Functions | Variables
jpeg2000_parser.c File Reference
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  JPEG2000ParserContext
 

Enumerations

enum  frame_type { jp2_file = 1, j2k_cstream }
 

Functions

static void reset_context (JPEG2000ParserContext *m)
 
static uint8_t info_marker (uint16_t marker)
 
static int find_frame_end (JPEG2000ParserContext *m, const uint8_t *buf, int buf_size)
 Find the end of the current frame in the bitstream. More...
 
static int jpeg2000_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

const AVCodecParser ff_jpeg2000_parser
 

Detailed Description

JPEG2000 parser.

Definition in file jpeg2000_parser.c.

Enumeration Type Documentation

◆ frame_type

enum frame_type
Enumerator
jp2_file 
j2k_cstream 

Definition at line 31 of file jpeg2000_parser.c.

Function Documentation

◆ reset_context()

static void reset_context ( JPEG2000ParserContext m)
inlinestatic

Definition at line 49 of file jpeg2000_parser.c.

Referenced by find_frame_end().

◆ info_marker()

static uint8_t info_marker ( uint16_t  marker)
static

Definition at line 66 of file jpeg2000_parser.c.

Referenced by find_frame_end().

◆ find_frame_end()

static int find_frame_end ( JPEG2000ParserContext m,
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 -1

Definition at line 93 of file jpeg2000_parser.c.

Referenced by jpeg2000_parse().

◆ jpeg2000_parse()

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

Definition at line 188 of file jpeg2000_parser.c.

Variable Documentation

◆ ff_jpeg2000_parser

const AVCodecParser ff_jpeg2000_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_JPEG2000 },
.priv_data_size = sizeof(JPEG2000ParserContext),
.parser_parse = jpeg2000_parse,
.parser_close = ff_parse_close,
}

Definition at line 214 of file jpeg2000_parser.c.

ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:288
jpeg2000_parse
static int jpeg2000_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: jpeg2000_parser.c:188
JPEG2000ParserContext
Definition: jpeg2000_parser.c:36
AV_CODEC_ID_JPEG2000
@ AV_CODEC_ID_JPEG2000
Definition: codec_id.h:140