FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
interplayacm.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  InterplayACMContext
 

Macros

#define BITSTREAM_READER_LE
 
#define set_pos(s, r, c, idx)
 

Typedefs

typedef int(* filler )(InterplayACMContext *s, unsigned ind, unsigned col)
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int zero (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int bad (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int linear (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k13 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k12 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k24 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k23 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k35 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k34 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k45 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int k44 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int t15 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int t27 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int t37 (InterplayACMContext *s, unsigned ind, unsigned col)
 
static int fill_block (InterplayACMContext *s)
 
static void juggle (int *wrap_p, int *block_p, unsigned sub_len, unsigned sub_count)
 
static void juggle_block (InterplayACMContext *s)
 
static int decode_block (InterplayACMContext *s)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
 
static av_cold int decode_close (AVCodecContext *avctx)
 

Variables

static const int8_t map_1bit [] = { -1, +1 }
 
static const int8_t map_2bit_near [] = { -2, -1, +1, +2 }
 
static const int8_t map_2bit_far [] = { -3, -2, +2, +3 }
 
static const int8_t map_3bit [] = { -4, -3, -2, -1, +1, +2, +3, +4 }
 
static int mul_3x3 [3 *3 *3]
 
static int mul_3x5 [5 *5 *5]
 
static int mul_2x11 [11 *11]
 
static const filler filler_list []
 
AVCodec ff_interplay_acm_decoder
 

Macro Definition Documentation

#define BITSTREAM_READER_LE

Definition at line 23 of file interplayacm.c.

#define set_pos (   s,
  r,
  c,
  idx 
)
Value:
do { \
unsigned pos = ((r) << s->level) + (c); \
s->block[pos] = s->midbuf[(idx)]; \
} while (0)
const char * s
Definition: avisynth_c.h:631
const char * r
Definition: vf_curves.c:107
static double c[64]

Definition at line 96 of file interplayacm.c.

Referenced by k12(), k13(), k23(), k24(), k34(), k35(), k44(), k45(), linear(), t15(), t27(), t37(), and zero().

Typedef Documentation

typedef int(* filler)(InterplayACMContext *s, unsigned ind, unsigned col)

Definition at line 389 of file interplayacm.c.

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 56 of file interplayacm.c.

static int zero ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 101 of file interplayacm.c.

static int bad ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 110 of file interplayacm.c.

static int linear ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 115 of file interplayacm.c.

Referenced by av_resample_init(), and resample_init().

static int k13 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 128 of file interplayacm.c.

static int k12 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 153 of file interplayacm.c.

static int k24 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 171 of file interplayacm.c.

static int k23 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 197 of file interplayacm.c.

static int k35 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 215 of file interplayacm.c.

static int k34 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 249 of file interplayacm.c.

static int k45 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 274 of file interplayacm.c.

static int k44 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 301 of file interplayacm.c.

static int t15 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 319 of file interplayacm.c.

Referenced by iadst16_1d(), itxfm_wrap(), and pred8x8l_down_left().

static int t27 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 344 of file interplayacm.c.

Referenced by itxfm_wrap().

static int t37 ( InterplayACMContext s,
unsigned  ind,
unsigned  col 
)
static

Definition at line 369 of file interplayacm.c.

static int fill_block ( InterplayACMContext s)
static

Definition at line 402 of file interplayacm.c.

Referenced by decode_block().

static void juggle ( int *  wrap_p,
int *  block_p,
unsigned  sub_len,
unsigned  sub_count 
)
static

Definition at line 417 of file interplayacm.c.

Referenced by juggle_block().

static void juggle_block ( InterplayACMContext s)
static

Definition at line 443 of file interplayacm.c.

Referenced by decode_block().

static int decode_block ( InterplayACMContext s)
static

Definition at line 496 of file interplayacm.c.

Referenced by decode_frame().

static int decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 525 of file interplayacm.c.

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 592 of file interplayacm.c.

Variable Documentation

const int8_t map_1bit[] = { -1, +1 }
static

Definition at line 27 of file interplayacm.c.

Referenced by k12(), k13(), k34(), and k35().

const int8_t map_2bit_near[] = { -2, -1, +1, +2 }
static

Definition at line 28 of file interplayacm.c.

Referenced by k23(), and k24().

const int8_t map_2bit_far[] = { -3, -2, +2, +3 }
static

Definition at line 29 of file interplayacm.c.

Referenced by k34(), and k35().

const int8_t map_3bit[] = { -4, -3, -2, -1, +1, +2, +3, +4 }
static

Definition at line 30 of file interplayacm.c.

Referenced by k44(), and k45().

int mul_3x3[3 *3 *3]
static

Definition at line 32 of file interplayacm.c.

Referenced by decode_init(), and t15().

int mul_3x5[5 *5 *5]
static

Definition at line 33 of file interplayacm.c.

Referenced by decode_init(), and t27().

int mul_2x11[11 *11]
static

Definition at line 34 of file interplayacm.c.

Referenced by decode_init(), and t37().

const filler filler_list[]
static
Initial value:
= {
k24, k23, t27, k35,
k34, bad, k45, k44,
bad, t37, bad, bad,
}
static int linear(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:115
static int k24(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:171
static int k35(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:215
static int k44(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:301
static int t15(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:319
static int t27(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:344
static int k34(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:249
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:101
static int k12(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:153
static int k13(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:128
static int t37(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:369
static int k23(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:197
static int bad(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:110
static int k45(InterplayACMContext *s, unsigned ind, unsigned col)
Definition: interplayacm.c:274

Definition at line 391 of file interplayacm.c.

Referenced by fill_block().

AVCodec ff_interplay_acm_decoder
Initial value:
= {
.name = "interplayacm",
.long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"),
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
.priv_data_size = sizeof(InterplayACMContext),
}
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
Definition: interplayacm.c:525
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:881
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static av_cold int decode_close(AVCodecContext *avctx)
Definition: interplayacm.c:592
static av_cold int decode_init(AVCodecContext *avctx)
Definition: interplayacm.c:56
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:856

Definition at line 605 of file interplayacm.c.