FFmpeg
Loading...
Searching...
No Matches
jpeg2000_parser.c File Reference

JPEG2000 parser. More...

#include "parser.h"
#include "parser_internal.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.
 
static int jpeg2000_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

const FFCodecParser 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 32 of file jpeg2000_parser.c.

Function Documentation

◆ reset_context()

static void reset_context ( JPEG2000ParserContext * m)
inlinestatic

Definition at line 50 of file jpeg2000_parser.c.

Referenced by find_frame_end().

◆ info_marker()

static uint8_t info_marker ( uint16_t marker)
static

Definition at line 67 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 94 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 189 of file jpeg2000_parser.c.

Variable Documentation

◆ ff_jpeg2000_parser

const FFCodecParser ff_jpeg2000_parser
Initial value:
= {
.priv_data_size = sizeof(JPEG2000ParserContext),
}
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
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
@ AV_CODEC_ID_JPEG2000
Definition codec_id.h:138
static int jpeg2000_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
av_cold void ff_parse_close(AVCodecParserContext *s)
Definition parser.c:300
#define PARSER_CODEC_LIST(...)

Definition at line 215 of file jpeg2000_parser.c.