FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
mjpegenc.c File Reference

MJPEG encoder. More...

#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "jpegtables.h"
#include "mjpegenc_common.h"
#include "mpegvideo.h"
#include "mjpeg.h"
#include "mjpegenc.h"

Go to the source code of this file.

Macros

#define V_MAX   2
 
#define OFFSET(x)   offsetof(MpegEncContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static av_cold void init_uni_ac_vlc (const uint8_t huff_size_ac[256], uint8_t *uni_ac_vlc_len)
 
av_cold int ff_mjpeg_encode_init (MpegEncContext *s)
 
av_cold void ff_mjpeg_encode_close (MpegEncContext *s)
 
static void encode_block (MpegEncContext *s, int16_t *block, int n)
 
void ff_mjpeg_encode_mb (MpegEncContext *s, int16_t block[12][64])
 
static int amv_encode_picture (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic_arg, int *got_packet)
 

Variables

static uint8_t uni_ac_vlc_len [64 *64 *2]
 
static uint8_t uni_chroma_ac_vlc_len [64 *64 *2]
 
static const AVOption options []
 

Detailed Description

MJPEG encoder.

Definition in file mjpegenc.c.

Macro Definition Documentation

#define V_MAX   2

Definition at line 215 of file mjpegenc.c.

Referenced by amv_encode_picture().

#define OFFSET (   x)    offsetof(MpegEncContext, x)

Definition at line 256 of file mjpegenc.c.

Definition at line 257 of file mjpegenc.c.

Function Documentation

static av_cold void init_uni_ac_vlc ( const uint8_t  huff_size_ac[256],
uint8_t uni_ac_vlc_len 
)
static

Definition at line 45 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_init().

av_cold int ff_mjpeg_encode_init ( MpegEncContext s)

Definition at line 71 of file mjpegenc.c.

Referenced by ff_mpv_encode_init().

av_cold void ff_mjpeg_encode_close ( MpegEncContext s)

Definition at line 116 of file mjpegenc.c.

Referenced by ff_mpv_encode_end().

static void encode_block ( MpegEncContext s,
int16_t *  block,
int  n 
)
static

Definition at line 121 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_mb().

void ff_mjpeg_encode_mb ( MpegEncContext s,
int16_t  block[12][64] 
)

Definition at line 179 of file mjpegenc.c.

Referenced by encode_mb_internal().

static int amv_encode_picture ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pic_arg,
int *  got_packet 
)
static

Definition at line 216 of file mjpegenc.c.

Variable Documentation

uint8_t uni_ac_vlc_len[64 *64 *2]
static

Definition at line 42 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_init().

uint8_t uni_chroma_ac_vlc_len[64 *64 *2]
static

Definition at line 43 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_init().

const AVOption options[]
static
Initial value:
= {
{ "pred", "Prediction method", OFFSET(pred), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 3, VE, "pred" },
{ "left", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "pred" },
{ "plane", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "pred" },
{ "median", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, INT_MIN, INT_MAX, VE, "pred" },
{ NULL},
}
#define NULL
Definition: coverity.c:32
#define FF_MPV_COMMON_OPTS
Definition: mpegvideo.h:603
static const float pred[4]
Definition: siprdata.h:259
#define OFFSET(x)
Definition: mjpegenc.c:256
#define VE
Definition: mjpegenc.c:257

Definition at line 258 of file mjpegenc.c.