FFmpeg
Data Structures | Macros | Functions
rtjpeg.h File Reference
#include <stdint.h>
#include "libavutil/mem_internal.h"
#include "idctdsp.h"

Go to the source code of this file.

Data Structures

struct  RTJpegContext
 

Macros

#define RTJPEG_FILE_VERSION   0
 
#define RTJPEG_HEADER_SIZE   12
 

Functions

void ff_rtjpeg_init (RTJpegContext *c, AVCodecContext *avctx)
 
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...
 
int ff_rtjpeg_decode_frame_yuv420 (RTJpegContext *c, AVFrame *f, const uint8_t *buf, int buf_size)
 decode one rtjpeg YUV420 frame More...
 

Macro Definition Documentation

◆ RTJPEG_FILE_VERSION

#define RTJPEG_FILE_VERSION   0

Definition at line 30 of file rtjpeg.h.

◆ RTJPEG_HEADER_SIZE

#define RTJPEG_HEADER_SIZE   12

Definition at line 31 of file rtjpeg.h.

Function Documentation

◆ ff_rtjpeg_init()

void ff_rtjpeg_init ( RTJpegContext c,
AVCodecContext avctx 
)

Definition at line 170 of file rtjpeg.c.

Referenced by decode_init().

◆ ff_rtjpeg_decode_init()

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

Parameters
ccontext to initialize
widthwidth of image, will be rounded down to the nearest multiple of 16 for decoding
heightheight of image, will be rounded down to the nearest multiple of 16 for decoding
lquantluma quantization table to use
cquantchroma quantization table to use

Definition at line 158 of file rtjpeg.c.

Referenced by codec_reinit(), and decode_frame().

◆ ff_rtjpeg_decode_frame_yuv420()

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

decode one rtjpeg YUV420 frame

Parameters
ccontext, must be initialized via ff_rtjpeg_decode_init
fAVFrame to place decoded frame into. If parts of the frame are not coded they are left unchanged, so consider initializing it
bufbuffer containing input data
buf_sizelength of input data in bytes
Returns
number of bytes consumed from the input buffer

Definition at line 106 of file rtjpeg.c.

Referenced by decode_frame().