FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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"

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)
 
static av_cold int mvc_decode_end (AVCodecContext *avctx)
 

Detailed Description

Silicon Graphics Motion Video Compressor 1 & 2 decoder.

Definition in file mvcdec.c.

Macro Definition Documentation

#define PIX16 (   target,
  true,
  false 
)
Value:
i = (mask & target) ? true : false; \
AV_WN16A(dst, (v[i] & 0x7C00) | (v[i] & 0x3E0) | (v[i] & 0x1F)); \
dst += 2;
#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)

Referenced by decode_mvc1().

#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.

#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.

#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.

Referenced by decode_mvc2().

Function Documentation

static av_cold int mvc_decode_init ( AVCodecContext avctx)
static

Definition at line 35 of file mvcdec.c.

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

Definition at line 59 of file mvcdec.c.

Referenced by mvc_decode_frame().

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().

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().

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

Definition at line 223 of file mvcdec.c.

static av_cold int mvc_decode_end ( AVCodecContext avctx)
static

Definition at line 253 of file mvcdec.c.