libavcodec/mjpegenc.c File Reference

MJPEG encoder. More...

#include <assert.h>
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "mjpeg.h"
#include "mjpegenc.h"

Go to the source code of this file.

Defines

#define V_MAX   2

Functions

av_cold int ff_mjpeg_encode_init (MpegEncContext *s)
void ff_mjpeg_encode_close (MpegEncContext *s)
static int put_huffman_table (MpegEncContext *s, int table_class, int table_id, const uint8_t *bits_table, const uint8_t *value_table)
static void jpeg_table_header (MpegEncContext *s)
static void jpeg_put_comments (MpegEncContext *s)
void ff_mjpeg_encode_picture_header (MpegEncContext *s)
static void escape_FF (MpegEncContext *s, int start)
void ff_mjpeg_encode_stuffing (PutBitContext *pbc)
void ff_mjpeg_encode_picture_trailer (MpegEncContext *s)
void ff_mjpeg_encode_dc (MpegEncContext *s, int val, uint8_t *huff_size, uint16_t *huff_code)
static void encode_block (MpegEncContext *s, DCTELEM *block, int n)
void ff_mjpeg_encode_mb (MpegEncContext *s, DCTELEM block[6][64])
static int amv_encode_picture (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)

Variables

AVCodec ff_mjpeg_encoder
AVCodec ff_amv_encoder


Detailed Description

MJPEG encoder.

Definition in file mjpegenc.c.


Define Documentation

#define V_MAX   2

Definition at line 452 of file mjpegenc.c.

Referenced by amv_encode_picture().


Function Documentation

static int amv_encode_picture ( AVCodecContext avctx,
unsigned char *  buf,
int  buf_size,
void *  data 
) [static]

Definition at line 453 of file mjpegenc.c.

static void encode_block ( MpegEncContext s,
DCTELEM block,
int  n 
) [static]

Definition at line 376 of file mjpegenc.c.

static void escape_FF ( MpegEncContext s,
int  start 
) [static]

Definition at line 282 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_picture_trailer().

void ff_mjpeg_encode_close ( MpegEncContext s  ) 

Definition at line 80 of file mjpegenc.c.

Referenced by MPV_encode_end().

void ff_mjpeg_encode_dc ( MpegEncContext s,
int  val,
uint8_t *  huff_size,
uint16_t *  huff_code 
)

Definition at line 354 of file mjpegenc.c.

Referenced by encode_block(), and encode_picture_lossless().

av_cold int ff_mjpeg_encode_init ( MpegEncContext s  ) 

Definition at line 47 of file mjpegenc.c.

Referenced by MPV_encode_init().

void ff_mjpeg_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64] 
)

Definition at line 434 of file mjpegenc.c.

Referenced by encode_mb_internal().

void ff_mjpeg_encode_picture_header ( MpegEncContext s  ) 

Definition at line 197 of file mjpegenc.c.

Referenced by encode_picture(), and encode_picture_lossless().

void ff_mjpeg_encode_picture_trailer ( MpegEncContext s  ) 

Definition at line 342 of file mjpegenc.c.

Referenced by encode_picture_lossless(), and MPV_encode_picture().

void ff_mjpeg_encode_stuffing ( PutBitContext pbc  ) 

Definition at line 335 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_picture_trailer(), and write_slice_end().

static void jpeg_put_comments ( MpegEncContext s  )  [static]

Definition at line 153 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_picture_header().

static void jpeg_table_header ( MpegEncContext s  )  [static]

Definition at line 107 of file mjpegenc.c.

Referenced by ff_mjpeg_encode_picture_header().

static int put_huffman_table ( MpegEncContext s,
int  table_class,
int  table_id,
const uint8_t *  bits_table,
const uint8_t *  value_table 
) [static]

Definition at line 86 of file mjpegenc.c.

Referenced by jpeg_table_header().


Variable Documentation

Initial value:

 {
    .name           = "amv",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_AMV,
    .priv_data_size = sizeof(MpegEncContext),
    .init           = MPV_encode_init,
    .encode         = amv_encode_picture,
    .close          = MPV_encode_end,
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, -1},
    .long_name      = NULL_IF_CONFIG_SMALL("AMV Video"),
}

Definition at line 485 of file mjpegenc.c.

Initial value:

 {
    .name           = "mjpeg",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_MJPEG,
    .priv_data_size = sizeof(MpegEncContext),
    .init           = MPV_encode_init,
    .encode         = MPV_encode_picture,
    .close          = MPV_encode_end,
    .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE},
    .long_name= NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
}

Definition at line 473 of file mjpegenc.c.


Generated on Fri Oct 26 02:43:48 2012 for FFmpeg by  doxygen 1.5.8