FFmpeg  4.0
Data Structures | Macros | Functions
mvcdec.c File Reference

Silicon Graphics Motion Video Compressor 1 & 2 decoder. More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.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, void *data, 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;
static const uint16_t mask[17]
Definition: lzw.c:38

◆ 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)
#define a0
Definition: regdef.h:46
#define a1
Definition: regdef.h:47

Referenced by decode_mvc1().

◆ PIX32

#define PIX32 (   target,
  true,
  false 
)
Value:
AV_WN32A(dst, (mask & target) ? v[true] : v[false]); \
dst += 4;
#define AV_WN32A(p, v)
Definition: intreadwrite.h:538
static const uint16_t mask[17]
Definition: lzw.c:38

Definition at line 116 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)
#define a0
Definition: regdef.h:46
#define a1
Definition: regdef.h:47

Definition at line 120 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);
#define ROW32(row, a1, a0, b1, b0)
Definition: mvcdec.c:120

Definition at line 127 of file mvcdec.c.

Referenced by decode_mvc2().

Function Documentation

◆ mvc_decode_init()

static av_cold int mvc_decode_init ( AVCodecContext avctx)
static

Definition at line 37 of file mvcdec.c.

Referenced by mvc_decode_frame().

◆ decode_mvc1()

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

Definition at line 60 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 108 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 133 of file mvcdec.c.

Referenced by mvc_decode_frame().

◆ mvc_decode_frame()

static int mvc_decode_frame ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 225 of file mvcdec.c.