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

Zip Motion Blocks Video encoder. More...

#include <stdio.h>
#include <stdlib.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
#include <zlib.h>

Go to the source code of this file.

Data Structures

struct  ZmbvEncContext
 Encoder context. More...
 

Macros

#define ZMBV_KEYFRAME   1
 
#define ZMBV_DELTAPAL   2
 
#define ZMBV_BLOCK   16
 

Functions

static int block_cmp (ZmbvEncContext *c, uint8_t *src, int stride, uint8_t *src2, int stride2, int bw, int bh, int *xored)
 Block comparing function XXX should be optimized and moved to DSPContext TODO handle out of edge ME. More...
 
static int zmbv_me (ZmbvEncContext *c, uint8_t *src, int sstride, uint8_t *prev, int pstride, int x, int y, int *mx, int *my, int *xored)
 Motion estimation function TODO make better ME decisions. More...
 
static int encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 
static av_cold int encode_end (AVCodecContext *avctx)
 
static av_cold int encode_init (AVCodecContext *avctx)
 Init zmbv encoder. More...
 

Variables

AVCodec ff_zmbv_encoder
 

Detailed Description

Zip Motion Blocks Video encoder.

Definition in file zmbvenc.c.

Macro Definition Documentation

#define ZMBV_KEYFRAME   1

Definition at line 37 of file zmbvenc.c.

Referenced by encode_frame().

#define ZMBV_DELTAPAL   2

Definition at line 38 of file zmbvenc.c.

Referenced by encode_frame().

#define ZMBV_BLOCK   16

Definition at line 40 of file zmbvenc.c.

Referenced by encode_frame(), encode_init(), and zmbv_me().

Function Documentation

static int block_cmp ( ZmbvEncContext c,
uint8_t src,
int  stride,
uint8_t src2,
int  stride2,
int  bw,
int  bh,
int xored 
)
inlinestatic

Block comparing function XXX should be optimized and moved to DSPContext TODO handle out of edge ME.

Definition at line 66 of file zmbvenc.c.

Referenced by zmbv_me().

static int zmbv_me ( ZmbvEncContext c,
uint8_t src,
int  sstride,
uint8_t prev,
int  pstride,
int  x,
int  y,
int mx,
int my,
int xored 
)
static

Motion estimation function TODO make better ME decisions.

Definition at line 94 of file zmbvenc.c.

Referenced by encode_frame().

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

Definition at line 121 of file zmbvenc.c.

static av_cold int encode_end ( AVCodecContext avctx)
static

Definition at line 258 of file zmbvenc.c.

static av_cold int encode_init ( AVCodecContext avctx)
static

Init zmbv encoder.

Definition at line 274 of file zmbvenc.c.

Variable Documentation

AVCodec ff_zmbv_encoder
Initial value:
= {
.name = "zmbv",
.long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
.priv_data_size = sizeof(ZmbvEncContext),
.encode2 = encode_frame,
.close = encode_end,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int encode_end(AVCodecContext *avctx)
Definition: zmbvenc.c:258
8 bits with AV_PIX_FMT_RGB32 palette
Definition: pixfmt.h:77
Encoder context.
Definition: zmbvenc.c:45
static av_cold int encode_init(AVCodecContext *avctx)
Init zmbv encoder.
Definition: zmbvenc.c:274
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: zmbvenc.c:121
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:266
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64

Definition at line 334 of file zmbvenc.c.