FFmpeg
Data Structures | Macros | Functions
mvcdec.c File Reference
#include "config_components.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  MvcContext
 

Macros

#define PIX16(target, true, false)
 
#define ROW16(row, a1, a0, b1, b0)
 
#define PIX32(target, true, false)
 
#define ROW32(row, a1, a0, b1, b0)
 
#define MVC2_BLOCK
 

Functions

static av_cold int mvc_decode_init (AVCodecContext *avctx)
 
static int decode_mvc1 (AVCodecContext *avctx, GetByteContext *gb, uint8_t *dst_start, int width, int height, int linesize)
 
static void set_4x4_block (uint8_t *dst, int linesize, uint32_t pixel)
 
static int decode_mvc2 (AVCodecContext *avctx, GetByteContext *gb, uint8_t *dst_start, int width, int height, int linesize, int vflip)
 
static int mvc_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 

Detailed Description

Silicon Graphics Motion Video Compressor 1 & 2 decoder

Definition in file mvcdec.c.

Macro Definition Documentation

◆ PIX16

#define PIX16 (   target,
  true,
  false 
)
Value:
i = (mask & target) ? true : false; \
AV_WN16A(dst, v[i] & 0x7FFF); \
dst += 2;

◆ ROW16

#define ROW16 (   row,
  a1,
  a0,
  b1,
  b0 
)
Value:
dst = dst_start + (y + row) * linesize + x * 2; \
PIX16(1 << (row * 4), a1, a0) \
PIX16(1 << (row * 4 + 1), a1, a0) \
PIX16(1 << (row * 4 + 2), b1, b0) \
PIX16(1 << (row * 4 + 3), b1, b0)

◆ PIX32

#define PIX32 (   target,
  true,
  false 
)
Value:
AV_WN32A(dst, (mask & target) ? v[true] : v[false]); \
dst += 4;

Definition at line 119 of file mvcdec.c.

◆ ROW32

#define ROW32 (   row,
  a1,
  a0,
  b1,
  b0 
)
Value:
dst = dst_start + (y + row) * linesize + x * 4; \
PIX32(1 << (row * 4), a1, a0) \
PIX32(1 << (row * 4 + 1), a1, a0) \
PIX32(1 << (row * 4 + 2), b1, b0) \
PIX32(1 << (row * 4 + 3), b1, b0)

Definition at line 123 of file mvcdec.c.

◆ MVC2_BLOCK

#define MVC2_BLOCK
Value:
ROW32(0, 1, 0, 3, 2); \
ROW32(1, 1, 0, 3, 2); \
ROW32(2, 5, 4, 7, 6); \
ROW32(3, 5, 4, 7, 6);

Definition at line 130 of file mvcdec.c.

Function Documentation

◆ mvc_decode_init()

static av_cold int mvc_decode_init ( AVCodecContext avctx)
static

Definition at line 40 of file mvcdec.c.

◆ decode_mvc1()

static int decode_mvc1 ( AVCodecContext avctx,
GetByteContext gb,
uint8_t *  dst_start,
int  width,
int  height,
int  linesize 
)
static

Definition at line 63 of file mvcdec.c.

Referenced by mvc_decode_frame().

◆ set_4x4_block()

static void set_4x4_block ( uint8_t *  dst,
int  linesize,
uint32_t  pixel 
)
static

Definition at line 111 of file mvcdec.c.

Referenced by decode_mvc2().

◆ decode_mvc2()

static int decode_mvc2 ( AVCodecContext avctx,
GetByteContext gb,
uint8_t *  dst_start,
int  width,
int  height,
int  linesize,
int  vflip 
)
static

Definition at line 136 of file mvcdec.c.

Referenced by mvc_decode_frame().

◆ mvc_decode_frame()

static int mvc_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 228 of file mvcdec.c.

AV_WN32A
#define AV_WN32A(p, v)
Definition: intreadwrite.h:536
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:2035
a1
#define a1
Definition: regdef.h:47
mask
static const uint16_t mask[17]
Definition: lzw.c:38
ROW32
#define ROW32(row, a1, a0, b1, b0)
Definition: mvcdec.c:123
a0
#define a0
Definition: regdef.h:46
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
b0
static double b0(void *priv, double x, double y)
Definition: vf_xfade.c:2034