Go to the documentation of this file.
48 for (
i = 0;
i < buf_size;
i++) {
66 while (pic_found &&
i < buf_size) {
68 for(;
i < buf_size;
i++) {
86 for(;
i < buf_size;
i++) {
103 const uint8_t *buf,
int buf_size)
107 int8_t bpc[3], log2_chroma_w[3], log2_chroma_h[3];
108 int size, marker, components;
117 marker = bytestream2_get_be16(&gbc);
121 marker = bytestream2_get_be16(&gbc);
124 size = bytestream2_get_be16(&gbc);
127 marker = bytestream2_get_be16(&gbc);
130 size = bytestream2_get_be16(&gbc);
136 s->width = bytestream2_get_be16(&gbc);
137 s->height = bytestream2_get_be16(&gbc);
144 components = bytestream2_get_byte(&gbc);
145 if (components != 1 && components != 3)
152 marker = bytestream2_get_be16(&gbc);
156 size = bytestream2_get_be16(&gbc);
159 for (
int i = 0;
i < components;
i++) {
161 if (
i && bpc[
i] != bpc[
i-1])
167 if (log2_chroma_h[
i] > log2_chroma_w[
i])
169 if (
i == 2 && (log2_chroma_h[2] != log2_chroma_h[1] ||
170 log2_chroma_w[2] != log2_chroma_w[1]))
205 size = bytestream2_get_be16(&gbc);
216 const uint8_t **poutbuf,
int *poutbuf_size,
217 const uint8_t *buf,
int buf_size)
234 *poutbuf_size = buf_size;
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
#define AV_PIX_FMT_YUV420P10
uint32_t state
contains the last few bytes in MSB order
static av_cold void close(AVCodecParserContext *s)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_PIX_FMT_YUV444P10
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define AV_PIX_FMT_GRAY14
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_PIX_FMT_GRAY10
static av_cold void jpegxsparse_close(AVCodecParserContext *s)
@ AV_PICTURE_TYPE_I
Intra.
#define AV_PIX_FMT_YUV422P10
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int jpegxs_find_frame_end(JPEGXSParseContext *jpegxs, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream.
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV444P12
const FFCodecParser ff_jpegxs_parser
static int jpegxs_parse_frame(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define i(width, name, range_min, range_max)
#define PARSER_CODEC_LIST(...)
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV422P14
main external API structure.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
static int jpegxsvideo_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_YUV420P14