FFmpeg
Loading...
Searching...
No Matches
msvideo1enc.c File Reference

Microsoft Video-1 encoder. More...

#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
#include "bytestream.h"
#include "libavutil/lfg.h"
#include "libavutil/mem.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)
 

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
 
static av_cold int encode_end (AVCodecContext *avctx)
 Uninit encoder.
 

Variables

static const int remap [16] = { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 }
 
const FFCodec 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 62 of file msvideo1enc.c.

Referenced by encode_frame().

◆ SKIPS_MAX

#define SKIPS_MAX   0x03FF

Definition at line 63 of file msvideo1enc.c.

Referenced by encode_frame().

◆ MKRGB555

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

Definition at line 64 of file msvideo1enc.c.

Referenced by encode_frame().

Enumeration Type Documentation

◆ MSV1Mode

enum MSV1Mode
Enumerator
MODE_SKIP 
MODE_FILL 
MODE_2COL 
MODE_8COL 

Definition at line 55 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 68 of file msvideo1enc.c.

◆ encode_init()

static av_cold int encode_init ( AVCodecContext * avctx)
static

init encoder

Definition at line 272 of file msvideo1enc.c.

◆ encode_end()

static av_cold int encode_end ( AVCodecContext * avctx)
static

Uninit encoder.

Definition at line 298 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

◆ ff_msvideo1_encoder

const FFCodec ff_msvideo1_encoder
Initial value:
= {
.p.name = "msvideo1",
CODEC_LONG_NAME("Microsoft Video-1"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(Msvideo1EncContext),
.close = encode_end,
}
static av_cold int encode_init(AVCodecContext *avctx)
Definition asvenc.c:373
#define CODEC_PIXFMTS(...)
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame, AVPacket *pkt)
Definition ffmpeg_enc.c:694
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition codec.h:147
@ AV_CODEC_ID_MSVIDEO1
Definition codec_id.h:96
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int encode_end(AVCodecContext *avctx)
Definition huffyuvenc.c:978
#define AV_PIX_FMT_RGB555
Definition pixfmt.h:533
Encoder context.
Definition msvideo1enc.c:38

Definition at line 308 of file msvideo1enc.c.