FFmpeg
Data Structures | Functions | Variables
mv30.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/thread.h"
#include "avcodec.h"
#include "bytestream.h"
#include "copy_block.h"
#include "mathops.h"
#include "blockdsp.h"
#include "get_bits.h"
#include "internal.h"
#include "aandcttab.h"

Go to the source code of this file.

Data Structures

struct  MV30Context
 

Functions

static void get_qtable (int16_t *table, int quant, const uint8_t *quant_tab)
 
static void idct_1d (int *blk, int step)
 
static void idct_put (uint8_t *dst, int stride, int *block)
 
static void idct_add (uint8_t *dst, int stride, const uint8_t *src, int in_linesize, int *block)
 
static void idct2_1d (int *blk, int step)
 
static void idct2_put (uint8_t *dst, int stride, int *block)
 
static void idct2_add (uint8_t *dst, int stride, const uint8_t *src, int in_linesize, int *block)
 
static void update_inter_block (uint8_t *dst, int stride, const uint8_t *src, int in_linesize, int block)
 
static int decode_intra_block (AVCodecContext *avctx, int mode, GetByteContext *gbyte, int16_t *qtab, int *block, int *pfill, uint8_t *dst, int linesize)
 
static int decode_inter_block (AVCodecContext *avctx, int mode, GetByteContext *gbyte, int16_t *qtab, int *block, int *pfill, uint8_t *dst, int linesize, const uint8_t *src, int in_linesize)
 
static int decode_coeffs (GetBitContext *gb, int16_t *coeffs, int nb_codes)
 
static int decode_intra (AVCodecContext *avctx, GetBitContext *gb, AVFrame *frame)
 
static int decode_inter (AVCodecContext *avctx, GetBitContext *gb, AVFrame *frame, AVFrame *prev)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold void init_static_data (void)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static void decode_flush (AVCodecContext *avctx)
 
static av_cold int decode_close (AVCodecContext *avctx)
 

Variables

static VLC cbp_tab
 
static const uint8_t luma_tab []
 
static const uint8_t chroma_tab []
 
static const uint8_t zigzag []
 
static const uint16_t cbp_codes []
 
static const uint8_t cbp_bits []
 
AVCodec ff_mv30_decoder
 

Function Documentation

static void get_qtable ( int16_t *  table,
int  quant,
const uint8_t quant_tab 
)
static

Definition at line 95 of file mv30.c.

Referenced by decode_frame().

static void idct_1d ( int blk,
int  step 
)
inlinestatic

Definition at line 105 of file mv30.c.

Referenced by idct_add(), and idct_put().

static void idct_put ( uint8_t dst,
int  stride,
int block 
)
static

Definition at line 135 of file mv30.c.

Referenced by decode_intra_block().

static void idct_add ( uint8_t dst,
int  stride,
const uint8_t src,
int  in_linesize,
int block 
)
static
static void idct2_1d ( int blk,
int  step 
)
inlinestatic

Definition at line 199 of file mv30.c.

Referenced by idct2_add(), and idct2_put().

static void idct2_put ( uint8_t dst,
int  stride,
int block 
)
static

Definition at line 218 of file mv30.c.

Referenced by decode_intra_block().

static void idct2_add ( uint8_t dst,
int  stride,
const uint8_t src,
int  in_linesize,
int block 
)
static

Definition at line 248 of file mv30.c.

Referenced by decode_inter_block().

static void update_inter_block ( uint8_t dst,
int  stride,
const uint8_t src,
int  in_linesize,
int  block 
)
static

Definition at line 281 of file mv30.c.

Referenced by decode_inter_block().

static int decode_intra_block ( AVCodecContext avctx,
int  mode,
GetByteContext gbyte,
int16_t *  qtab,
int block,
int pfill,
uint8_t dst,
int  linesize 
)
static

Definition at line 293 of file mv30.c.

Referenced by decode_inter(), and decode_intra().

static int decode_inter_block ( AVCodecContext avctx,
int  mode,
GetByteContext gbyte,
int16_t *  qtab,
int block,
int pfill,
uint8_t dst,
int  linesize,
const uint8_t src,
int  in_linesize 
)
static

Definition at line 334 of file mv30.c.

Referenced by decode_inter().

static int decode_coeffs ( GetBitContext gb,
int16_t *  coeffs,
int  nb_codes 
)
static

Definition at line 375 of file mv30.c.

Referenced by decode_inter(), and decode_intra().

static int decode_intra ( AVCodecContext avctx,
GetBitContext gb,
AVFrame frame 
)
static

Definition at line 404 of file mv30.c.

Referenced by decode_frame().

static int decode_inter ( AVCodecContext avctx,
GetBitContext gb,
AVFrame frame,
AVFrame prev 
)
static

Definition at line 463 of file mv30.c.

Referenced by decode_frame().

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

Definition at line 604 of file mv30.c.

static av_cold void init_static_data ( void  )
static

Definition at line 665 of file mv30.c.

Referenced by av_codec_init_static(), decode_init(), and vpx_free().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 671 of file mv30.c.

static void decode_flush ( AVCodecContext avctx)
static

Definition at line 690 of file mv30.c.

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 697 of file mv30.c.

Variable Documentation

VLC cbp_tab
static

Definition at line 60 of file mv30.c.

const uint8_t luma_tab[]
static
Initial value:
= {
12, 12, 15, 19, 25, 34, 40, 48,
12, 12, 18, 22, 27, 44, 47, 46,
17, 18, 21, 26, 35, 46, 52, 47,
18, 20, 24, 28, 40, 61, 59, 51,
20, 24, 32, 43, 50, 72, 72, 63,
25, 31, 42, 48, 58, 72, 81, 75,
38, 46, 54, 61, 71, 84, 88, 85,
50, 61, 65, 68, 79, 78, 86, 91,
}

Definition at line 62 of file mv30.c.

Referenced by decode_frame().

const uint8_t chroma_tab[]
static
Initial value:
= {
12, 16, 24, 47, 99, 99, 99, 99,
16, 21, 26, 66, 99, 99, 99, 99,
24, 26, 56, 99, 99, 99, 99, 99,
47, 66, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
}

Definition at line 73 of file mv30.c.

Referenced by decode_frame().

const uint8_t zigzag[]
static
Initial value:
= {
0, 1, 8, 9, 16, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63,
}

Definition at line 84 of file mv30.c.

Referenced by decode_inter_block(), and decode_intra_block().

const uint16_t cbp_codes[]
static
Initial value:
= {
0, 1, 4, 5, 6, 0xE, 0x1E, 0x3E, 0x7E, 0xFE, 0x1FE, 0x1FF,
}

Definition at line 657 of file mv30.c.

Referenced by init_static_data().

const uint8_t cbp_bits[]
static
Initial value:
= {
2, 2, 3, 3, 3, 4, 5, 6, 7, 8, 9, 9,
}

Definition at line 661 of file mv30.c.

Referenced by init_static_data().

AVCodec ff_mv30_decoder
Initial value:
= {
.name = "mv30",
.long_name = NULL_IF_CONFIG_SMALL("MidiVid 3.0"),
.priv_data_size = sizeof(MV30Context),
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: mv30.c:604
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
#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:40
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
static av_cold int decode_init(AVCodecContext *avctx)
Definition: mv30.c:671
static void decode_flush(AVCodecContext *avctx)
Definition: mv30.c:690
static av_cold int decode_close(AVCodecContext *avctx)
Definition: mv30.c:697
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:50

Definition at line 710 of file mv30.c.