svq1enc.c File Reference

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

#include "avcodec.h"
#include "dsputil.h"
#include "hpeldsp.h"
#include "mpegvideo.h"
#include "h263.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "svq1.h"
#include "svq1enc_cb.h"
Include dependency graph for svq1enc.c:

Go to the source code of this file.

Data Structures

struct  SVQ1Context
 

Macros

#define QUALITY_THRESHOLD   100
 
#define THRESHOLD_MULTIPLIER   0.6
 

Typedefs

typedef struct SVQ1Context SVQ1Context
 

Functions

static void svq1_write_header (SVQ1Context *s, int frame_type)
 
static int encode_block (SVQ1Context *s, uint8_t *src, uint8_t *ref, uint8_t *decoded, int stride, int level, int threshold, int lambda, int intra)
 
static int svq1_encode_plane (SVQ1Context *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_init (AVCodecContext *avctx)
 
static int svq1_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 
static av_cold int svq1_encode_end (AVCodecContext *avctx)
 

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 113 of file svq1enc.c.

Referenced by svq1_encode_plane().

#define THRESHOLD_MULTIPLIER   0.6

Definition at line 114 of file svq1enc.c.

Referenced by svq1_encode_plane().

Typedef Documentation

typedef struct SVQ1Context SVQ1Context

Function Documentation

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

Definition at line 116 of file svq1enc.c.

Referenced by svq1_encode_plane().

static av_cold int svq1_encode_end ( AVCodecContext avctx)
static

Definition at line 597 of file svq1enc.c.

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

Definition at line 535 of file svq1enc.c.

static av_cold int svq1_encode_init ( AVCodecContext avctx)
static

Definition at line 501 of file svq1enc.c.

static int svq1_encode_plane ( SVQ1Context 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 261 of file svq1enc.c.

Referenced by svq1_encode_frame().

static void svq1_write_header ( SVQ1Context s,
int  frame_type 
)
static

Definition at line 79 of file svq1enc.c.

Referenced by svq1_encode_frame().

Variable Documentation

AVCodec ff_svq1_encoder
Initial value:
= {
.name = "svq1",
.priv_data_size = sizeof(SVQ1Context),
.encode2 = svq1_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV410P,
.long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"),
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int svq1_encode_init(AVCodecContext *avctx)
Definition: svq1enc.c:501
struct SVQ1Context SVQ1Context
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int svq1_encode_end(AVCodecContext *avctx)
Definition: svq1enc.c:597
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:74
static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: svq1enc.c:535
AVPixelFormat
Pixel format.
Definition: pixfmt.h:66

Definition at line 624 of file svq1enc.c.