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

Sorenson Vector Quantizer #1 (SVQ1) video codec. More...

#include "avcodec.h"
#include "hpeldsp.h"
#include "me_cmp.h"
#include "mpegvideo.h"
#include "h263.h"
#include "internal.h"
#include "mpegutils.h"
#include "svq1.h"
#include "svq1enc.h"
#include "svq1enc_cb.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Macros

#define QUALITY_THRESHOLD   100
 
#define THRESHOLD_MULTIPLIER   0.6
 

Functions

static void svq1_write_header (SVQ1EncContext *s, int frame_type)
 
static int ssd_int8_vs_int16_c (const int8_t *pix1, const int16_t *pix2, intptr_t size)
 
static int encode_block (SVQ1EncContext *s, uint8_t *src, uint8_t *ref, uint8_t *decoded, int stride, int level, int threshold, int lambda, int intra)
 
static void init_block_index (MpegEncContext *s)
 
static int svq1_encode_plane (SVQ1EncContext *s, int plane, unsigned char *src_plane, unsigned char *ref_plane, unsigned char *decoded_plane, int width, int height, int src_stride, int stride)
 
static av_cold int svq1_encode_end (AVCodecContext *avctx)
 
static av_cold int svq1_encode_init (AVCodecContext *avctx)
 
static int svq1_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 

Variables

AVCodec ff_svq1_encoder
 

Detailed Description

Sorenson Vector Quantizer #1 (SVQ1) video codec.

For more information of the SVQ1 algorithm, visit: http://www.pcisys.net/~melanson/codecs/

Definition in file svq1enc.c.

Macro Definition Documentation

#define QUALITY_THRESHOLD   100

Definition at line 76 of file svq1enc.c.

Referenced by svq1_encode_plane().

#define THRESHOLD_MULTIPLIER   0.6

Definition at line 77 of file svq1enc.c.

Referenced by svq1_encode_plane().

Function Documentation

static void svq1_write_header ( SVQ1EncContext s,
int  frame_type 
)
static

Definition at line 42 of file svq1enc.c.

Referenced by svq1_encode_frame().

static int ssd_int8_vs_int16_c ( const int8_t *  pix1,
const int16_t *  pix2,
intptr_t  size 
)
static

Definition at line 79 of file svq1enc.c.

Referenced by svq1_encode_init().

static int encode_block ( SVQ1EncContext s,
uint8_t src,
uint8_t ref,
uint8_t decoded,
int  stride,
int  level,
int  threshold,
int  lambda,
int  intra 
)
static

Definition at line 89 of file svq1enc.c.

Referenced by svq1_encode_plane().

static void init_block_index ( MpegEncContext s)
static

Definition at line 234 of file svq1enc.c.

Referenced by svq1_encode_plane().

static int svq1_encode_plane ( SVQ1EncContext s,
int  plane,
unsigned char *  src_plane,
unsigned char *  ref_plane,
unsigned char *  decoded_plane,
int  width,
int  height,
int  src_stride,
int  stride 
)
static

Definition at line 243 of file svq1enc.c.

Referenced by svq1_encode_frame().

static av_cold int svq1_encode_end ( AVCodecContext avctx)
static

Definition at line 483 of file svq1enc.c.

Referenced by svq1_encode_init().

static av_cold int svq1_encode_init ( AVCodecContext avctx)
static

Definition at line 514 of file svq1enc.c.

static int svq1_encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame pict,
int *  got_packet 
)
static

Definition at line 576 of file svq1enc.c.

Variable Documentation

AVCodec ff_svq1_encoder
Initial value:
= {
.name = "svq1",
.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
.priv_data_size = sizeof(SVQ1EncContext),
.encode2 = svq1_encode_frame,
.close = svq1_encode_end,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
}

Definition at line 643 of file svq1enc.c.