Libav
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 OFFSET(x)   offsetof(MpegEncContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

av_cold int ff_mjpeg_encode_init (MpegEncContext *s)
 
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[8][64])
 

Variables

static const AVOption options []
 
static const AVClass mjpeg_class
 
AVCodec ff_mjpeg_encoder
 

Detailed Description

MJPEG encoder.

Definition in file mjpegenc.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 155 of file mjpegenc.c.

◆ VE

Definition at line 156 of file mjpegenc.c.

Function Documentation

◆ ff_mjpeg_encode_init()

av_cold int ff_mjpeg_encode_init ( MpegEncContext s)

Definition at line 42 of file mjpegenc.c.

Referenced by ff_mpv_encode_init(), and put_marker().

◆ ff_mjpeg_encode_close()

void ff_mjpeg_encode_close ( MpegEncContext s)

Definition at line 75 of file mjpegenc.c.

Referenced by ff_mpv_encode_end(), and put_marker().

◆ encode_block()

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

Definition at line 80 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_mb().

◆ ff_mjpeg_encode_mb()

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

Definition at line 138 of file mjpegenc.c.

Referenced by encode_mb_internal(), and put_marker().

Variable Documentation

◆ options

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},
}
static const float pred[4]
Definition: siprdata.h:259
#define OFFSET(x)
Definition: mjpegenc.c:155
NULL
Definition: eval.c:55
#define VE
Definition: mjpegenc.c:156

Definition at line 157 of file mjpegenc.c.

◆ mjpeg_class

const AVClass mjpeg_class
static
Initial value:
= {
.class_name = "mjpeg",
.item_name = av_default_item_name,
.option = options,
}
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:55
static const AVOption options[]
Definition: mjpegenc.c:157

Definition at line 166 of file mjpegenc.c.

◆ ff_mjpeg_encoder

AVCodec ff_mjpeg_encoder
Initial value:
= {
.name = "mjpeg",
.long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
.priv_data_size = sizeof(MpegEncContext),
.priv_class = &mjpeg_class,
.pix_fmts = (const enum AVPixelFormat[]){
},
}
static const AVClass mjpeg_class
Definition: mjpegenc.c:166
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:72
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:71
int ff_mpv_encode_init(AVCodecContext *avctx)
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:257
MpegEncContext.
Definition: mpegvideo.h:76
int ff_mpv_encode_end(AVCodecContext *avctx)
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
AVPixelFormat
Pixel format.
Definition: pixfmt.h:57

Definition at line 173 of file mjpegenc.c.