FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
msvideo1enc.c File Reference
#include "avcodec.h"
#include "encode.h"
#include "internal.h"
#include "bytestream.h"
#include "libavutil/lfg.h"
#include "elbg.h"
#include "libavutil/imgutils.h"

Go to the source code of this file.

Data Structures

struct  Msvideo1EncContext
 Encoder context. More...
 

Macros

#define SKIP_PREFIX   0x8400
 
#define SKIPS_MAX   0x03FF
 
#define MKRGB555(in, off)   (((in)[off] << 10) | ((in)[(off) + 1] << 5) | ((in)[(off) + 2]))
 

Enumerations

enum  MSV1Mode { MODE_SKIP = 0, MODE_FILL, MODE_2COL, MODE_8COL }
 

Functions

static int encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
 
static av_cold int encode_init (AVCodecContext *avctx)
 init encoder More...
 
static av_cold int encode_end (AVCodecContext *avctx)
 Uninit encoder. More...
 

Variables

static const int remap [16] = { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 }
 
const AVCodec ff_msvideo1_encoder
 

Detailed Description

Microsoft Video-1 encoder

Definition in file msvideo1enc.c.

Macro Definition Documentation

◆ SKIP_PREFIX

#define SKIP_PREFIX   0x8400

Definition at line 61 of file msvideo1enc.c.

◆ SKIPS_MAX

#define SKIPS_MAX   0x03FF

Definition at line 62 of file msvideo1enc.c.

◆ MKRGB555

#define MKRGB555 (   in,
  off 
)    (((in)[off] << 10) | ((in)[(off) + 1] << 5) | ((in)[(off) + 2]))

Definition at line 63 of file msvideo1enc.c.

Enumeration Type Documentation

◆ MSV1Mode

enum MSV1Mode
Enumerator
MODE_SKIP 
MODE_FILL 
MODE_2COL 
MODE_8COL 

Definition at line 54 of file msvideo1enc.c.

Function Documentation

◆ encode_frame()

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

Definition at line 67 of file msvideo1enc.c.

◆ encode_init()

static av_cold int encode_init ( AVCodecContext avctx)
static

init encoder

Definition at line 269 of file msvideo1enc.c.

◆ encode_end()

static av_cold int encode_end ( AVCodecContext avctx)
static

Uninit encoder.

Definition at line 295 of file msvideo1enc.c.

Variable Documentation

◆ remap

const int remap[16] = { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 }
static

Definition at line 65 of file msvideo1enc.c.

Referenced by dv_calc_mb_coordinates(), and encode_frame().

◆ ff_msvideo1_encoder

const AVCodec ff_msvideo1_encoder
Initial value:
= {
.name = "msvideo1",
.long_name = NULL_IF_CONFIG_SMALL("Microsoft Video-1"),
.priv_data_size = sizeof(Msvideo1EncContext),
.encode2 = encode_frame,
.close = encode_end,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 305 of file msvideo1enc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
init
static int init
Definition: av_tx.c:47
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:296
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
encode_end
static av_cold int encode_end(AVCodecContext *avctx)
Uninit encoder.
Definition: msvideo1enc.c:295
Msvideo1EncContext
Encoder context.
Definition: msvideo1enc.c:37
AV_PIX_FMT_RGB555
#define AV_PIX_FMT_RGB555
Definition: pixfmt.h:392
encode_init
static av_cold int encode_init(AVCodecContext *avctx)
init encoder
Definition: msvideo1enc.c:269
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
encode_frame
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet)
Definition: msvideo1enc.c:67
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_MSVIDEO1
@ AV_CODEC_ID_MSVIDEO1
Definition: codec_id.h:96