FFmpeg
Data Structures | Functions | Variables
imm4.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/thread.h"
#include "avcodec.h"
#include "bswapdsp.h"
#include "copy_block.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  IMM4Context
 

Functions

static int get_cbphi (GetBitContext *gb, int x)
 
static int decode_block (AVCodecContext *avctx, GetBitContext *gb, int block, int factor, int flag, int offset, int flag2)
 
static int decode_blocks (AVCodecContext *avctx, GetBitContext *gb, unsigned cbp, int flag, int offset, unsigned flag2)
 
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 imm4_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 const uint8_t intra_cb []
 
static const uint8_t inter_cb []
 
static const uint8_t cbplo_symbols []
 
static const uint8_t cbplo_bits []
 
static const uint8_t cbplo_codes []
 
static const uint8_t cbphi_bits []
 
static const uint8_t cbphi_codes []
 
static const uint8_t blktype_symbols []
 
static const uint8_t blktype_bits []
 
static const uint8_t blktype_codes []
 
static const uint16_t block_symbols []
 
static const uint8_t block_bits []
 
static const uint8_t block_codes []
 
static VLC cbplo_tab
 
static VLC cbphi_tab
 
static VLC blktype_tab
 
static VLC block_tab
 
AVCodec ff_imm4_decoder
 

Function Documentation

static int get_cbphi ( GetBitContext gb,
int  x 
)
static

Definition at line 129 of file imm4.c.

Referenced by decode_inter(), and decode_intra().

static int decode_block ( AVCodecContext avctx,
GetBitContext gb,
int  block,
int  factor,
int  flag,
int  offset,
int  flag2 
)
static

Definition at line 140 of file imm4.c.

Referenced by decode_blocks().

static int decode_blocks ( AVCodecContext avctx,
GetBitContext gb,
unsigned  cbp,
int  flag,
int  offset,
unsigned  flag2 
)
static

Definition at line 183 of file imm4.c.

Referenced by decode_inter(), and decode_intra().

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

Definition at line 213 of file imm4.c.

Referenced by decode_frame().

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

Definition at line 264 of file imm4.c.

Referenced by decode_frame().

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

Definition at line 367 of file imm4.c.

static av_cold void imm4_init_static_data ( void  )
static

Definition at line 489 of file imm4.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 504 of file imm4.c.

static void decode_flush ( AVCodecContext avctx)
static

Definition at line 526 of file imm4.c.

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 533 of file imm4.c.

Variable Documentation

const uint8_t intra_cb[]
static
Initial value:
= {
24, 18, 12
}

Definition at line 53 of file imm4.c.

Referenced by decode_intra().

const uint8_t inter_cb[]
static
Initial value:
= {
30, 20, 15
}

Definition at line 57 of file imm4.c.

Referenced by decode_inter().

const uint8_t cbplo_symbols[]
static
Initial value:
= {
3, 4, 19, 20, 35, 36, 51, 52
}

Definition at line 61 of file imm4.c.

Referenced by imm4_init_static_data().

const uint8_t cbplo_bits[]
static
Initial value:
= {
1, 4, 3, 6, 3, 6, 3, 6
}

Definition at line 65 of file imm4.c.

Referenced by imm4_init_static_data().

const uint8_t cbplo_codes[]
static
Initial value:
= {
1, 1, 1, 1, 2, 2, 3, 3
}

Definition at line 69 of file imm4.c.

Referenced by imm4_init_static_data().

const uint8_t cbphi_bits[]
static
Initial value:
= {
4, 5, 5, 4, 5, 4, 6, 4, 5, 6, 4, 4, 4, 4, 4, 2
}

Definition at line 73 of file imm4.c.

Referenced by imm4_init_static_data().

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

Definition at line 77 of file imm4.c.

Referenced by imm4_init_static_data().

const uint8_t blktype_symbols[]
static
Initial value:
= {
0, 1, 2, 3, 4, 16, 17, 18, 19, 20, 32, 33, 34, 35, 48, 50, 51, 52
}

Definition at line 81 of file imm4.c.

Referenced by imm4_init_static_data().

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

Definition at line 85 of file imm4.c.

Referenced by imm4_init_static_data().

const uint8_t blktype_codes[]
static
Initial value:
= {
1, 3, 2, 3, 4, 3, 7, 5, 4, 4, 2, 6, 4, 3, 5, 5, 3, 2
}

Definition at line 89 of file imm4.c.

Referenced by imm4_init_static_data().

const uint16_t block_symbols[]
static
Initial value:
= {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0x81, 0x82, 0x83,
0x84, 0x85, 0x86, 0x101, 0x102, 0x103, 0x104, 0x181, 0x182, 0x183, 0x201, 0x202,
0x203, 0x281, 0x282, 0x283, 0x301, 0x302, 0x303, 0x381, 0x382, 0x401, 0x402,
0x481, 0x482, 0x501, 0x502, 0x581, 0x601, 0x681, 0x701, 0x781, 0x801, 0x881,
0x901, 0x981, 0xA01, 0xA81, 0xB01, 0xB81, 0xC01, 0xC81, 0xD01, 0x4001, 0x4002,
0x4003, 0x4081, 0x4082, 0x4101, 0x4181, 0x4201, 0x4281, 0x4301, 0x4381, 0x4401,
0x4481, 0x4501, 0x4581, 0x4601, 0x4681, 0x4701, 0x4781, 0x4801, 0x4881, 0x4901,
0x4981, 0x4A01, 0x4A81, 0x4B01, 0x4B81, 0x4C01, 0x4C81, 0x4D01, 0x4D81, 0x4E01,
0x4E81, 0x4F01, 0x4F81, 0x5001, 0x5081, 0x5101, 0x5181, 0x5201, 0x5281, 0x5301,
0x5381, 0x5401
}

Definition at line 93 of file imm4.c.

Referenced by imm4_init_static_data().

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

Definition at line 106 of file imm4.c.

Referenced by decode_entropy_image(), imm4_init_static_data(), parse_transform_color(), and parse_transform_predictor().

const uint8_t block_codes[]
static
Initial value:
= {
3, 2, 15, 21, 23, 31, 37, 36, 33, 32, 7, 6, 32, 6, 20, 30, 15, 33, 80,
14, 29, 14, 81, 13, 35, 13, 12, 34, 82, 11, 12, 83, 19, 11, 84, 18,
10, 17, 9, 16, 8, 22, 85, 21, 20, 28, 27, 33, 32, 31, 30, 29, 28,
27, 26, 34, 35, 86, 87, 7, 25, 5, 15, 4, 14, 13, 12, 19, 18, 17, 16,
26, 25, 24, 23, 22, 21, 20, 19, 24, 23, 22, 21, 20, 19, 18, 17, 7,
6, 5, 4, 36, 37, 38, 39, 88, 89, 90, 91, 92, 93, 94, 95
}

Definition at line 115 of file imm4.c.

Referenced by imm4_init_static_data().

VLC cbplo_tab
static

Definition at line 124 of file imm4.c.

VLC cbphi_tab
static

Definition at line 125 of file imm4.c.

VLC blktype_tab
static

Definition at line 126 of file imm4.c.

VLC block_tab
static

Definition at line 127 of file imm4.c.

AVCodec ff_imm4_decoder
Initial value:
= {
.name = "imm4",
.long_name = NULL_IF_CONFIG_SMALL("Infinity IMM4"),
.priv_data_size = sizeof(IMM4Context),
.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 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
static void decode_flush(AVCodecContext *avctx)
Definition: imm4.c:526
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int decode_close(AVCodecContext *avctx)
Definition: imm4.c:533
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: imm4.c:367
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:982
static av_cold int decode_init(AVCodecContext *avctx)
Definition: imm4.c:504

Definition at line 544 of file imm4.c.