FFmpeg
Data Structures | Enumerations | Functions | Variables
jpeg2000_parser.c File Reference

JPEG2000 parser. More...

#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

AVCodecParser ff_jpeg2000_parser
 

Detailed Description

JPEG2000 parser.

Definition in file jpeg2000_parser.c.

Enumeration Type Documentation

enum frame_type
Enumerator
jp2_file 
j2k_cstream 

Definition at line 31 of file jpeg2000_parser.c.

Function Documentation

static void reset_context ( JPEG2000ParserContext m)
inlinestatic

Definition at line 50 of file jpeg2000_parser.c.

Referenced by find_frame_end().

static uint8_t info_marker ( uint16_t  marker)
static

Definition at line 68 of file jpeg2000_parser.c.

Referenced by 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 83 of file jpeg2000_parser.c.

Referenced by 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 159 of file jpeg2000_parser.c.

Variable Documentation

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,
}
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:319
static int jpeg2000_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)

Definition at line 185 of file jpeg2000_parser.c.