Go to the documentation of this file.
39 for (
i = 0;
i < buf_size;
i++) {
52 for(;
i < buf_size;
i++) {
68 const uint8_t *buf,
int buf_size)
72 int8_t bpc[3], log2_chroma_w[3], log2_chroma_h[3];
73 int size, marker, components;
82 marker = bytestream2_get_be16(&gbc);
86 marker = bytestream2_get_be16(&gbc);
89 size = bytestream2_get_be16(&gbc);
92 marker = bytestream2_get_be16(&gbc);
95 size = bytestream2_get_be16(&gbc);
101 s->width = bytestream2_get_be16(&gbc);
102 s->height = bytestream2_get_be16(&gbc);
109 components = bytestream2_get_byte(&gbc);
110 if (components != 1 && components != 3)
117 marker = bytestream2_get_be16(&gbc);
121 size = bytestream2_get_be16(&gbc);
124 for (
int i = 0;
i < components;
i++) {
126 if (
i && bpc[
i] != bpc[
i-1])
132 if (log2_chroma_h[
i] > log2_chroma_w[
i])
134 if (
i == 2 && (log2_chroma_h[2] != log2_chroma_h[1] ||
135 log2_chroma_w[2] != log2_chroma_w[1]))
170 size = bytestream2_get_be16(&gbc);
181 const uint8_t **poutbuf,
int *poutbuf_size,
182 const uint8_t *buf,
int buf_size)
198 *poutbuf_size = buf_size;
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
av_cold void ff_parse_close(AVCodecParserContext *s)
#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
@ 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)
#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(...)
static int jpegxs_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream.
#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