FFmpeg
|
Go to the source code of this file.
Macros | |
#define | PUT_COEFF(c) |
#define | ALIGN(a) |
aligns the bitstream to the given power of two More... | |
#define | BLOCK(quant, dst, stride) |
Functions | |
static int | get_block (GetBitContext *gb, int16_t *block, const uint8_t *scan, const uint32_t *quant) |
read one block from stream More... | |
int | ff_rtjpeg_decode_frame_yuv420 (RTJpegContext *c, AVFrame *f, const uint8_t *buf, int buf_size) |
decode one rtjpeg YUV420 frame More... | |
void | ff_rtjpeg_decode_init (RTJpegContext *c, int width, int height, const uint32_t *lquant, const uint32_t *cquant) |
initialize an RTJpegContext, may be called multiple times More... | |
void | ff_rtjpeg_init (RTJpegContext *c, AVCodecContext *avctx) |
#define PUT_COEFF | ( | c | ) |
#define ALIGN | ( | a | ) |
aligns the bitstream to the given power of two
Definition at line 30 of file rtjpeg.c.
Referenced by get_block().
Referenced by ff_rtjpeg_decode_frame_yuv420().
|
inlinestatic |
read one block from stream
gb | contains stream data |
block | where data is written to |
scan | array containing the mapping stream address -> block position |
quant | quantization factors |
Note: GetBitContext is used to make the code simpler, since all data is aligned this could be done faster in a different way, e.g. as it is done in MPlayer libmpcodecs/native/rtjpegn.c.
int ff_rtjpeg_decode_frame_yuv420 | ( | RTJpegContext * | c, |
AVFrame * | f, | ||
const uint8_t * | buf, | ||
int | buf_size | ||
) |
decode one rtjpeg YUV420 frame
c | context, must be initialized via ff_rtjpeg_decode_init |
f | AVFrame to place decoded frame into. If parts of the frame are not coded they are left unchanged, so consider initializing it |
buf | buffer containing input data |
buf_size | length of input data in bytes |
Definition at line 106 of file rtjpeg.c.
Referenced by decode_frame().
void ff_rtjpeg_decode_init | ( | RTJpegContext * | c, |
int | width, | ||
int | height, | ||
const uint32_t * | lquant, | ||
const uint32_t * | cquant | ||
) |
initialize an RTJpegContext, may be called multiple times
c | context to initialize |
width | width of image, will be rounded down to the nearest multiple of 16 for decoding |
height | height of image, will be rounded down to the nearest multiple of 16 for decoding |
lquant | luma quantization table to use |
cquant | chroma quantization table to use |
Definition at line 158 of file rtjpeg.c.
Referenced by codec_reinit(), and decode_frame().
void ff_rtjpeg_init | ( | RTJpegContext * | c, |
AVCodecContext * | avctx | ||
) |
Definition at line 170 of file rtjpeg.c.
Referenced by decode_init().