rtjpeg.c File Reference

Go to the source code of this file.

Functions

static int get_block (GetBitContext *gb, DCTELEM *block, uint8_t *scan, uint32_t *quant)
 read one block from stream
int rtjpeg_decode_frame_yuv420 (RTJpegContext *c, AVFrame *f, uint8_t *buf, int buf_size)
 decode one rtjpeg YUV420 frame
void rtjpeg_decode_init (RTJpegContext *c, DSPContext *dsp, int width, int height, uint32_t *lquant, uint32_t *cquant)
 initialize an RTJpegContext, may be called multiple times


Function Documentation

static int get_block ( GetBitContext gb,
DCTELEM block,
uint8_t *  scan,
uint32_t quant 
) [inline, static]

read one block from stream

Parameters:
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

Definition at line 46 of file rtjpeg.c.

Referenced by rtjpeg_decode_frame_yuv420().

int rtjpeg_decode_frame_yuv420 ( RTJpegContext c,
AVFrame f,
uint8_t *  buf,
int  buf_size 
)

decode one rtjpeg YUV420 frame

Parameters:
c context, must be initialized via 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
Returns:
number of bytes consumed from the input buffer

Definition at line 99 of file rtjpeg.c.

Referenced by decode_frame().

void rtjpeg_decode_init ( RTJpegContext c,
DSPContext dsp,
int  width,
int  height,
uint32_t lquant,
uint32_t cquant 
)

initialize an RTJpegContext, may be called multiple times

Parameters:
c context to initialize
dsp specifies the idct to use for decoding
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 148 of file rtjpeg.c.

Referenced by codec_reinit(), and decode_frame().


Generated on Sat Dec 18 05:15:55 2010 for MythTV by  doxygen 1.5.5