FFmpeg
Loading...
Searching...
No Matches
interplayacm.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.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 void decode_init_static (void)
 
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, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
 
static void decode_flush (AVCodecContext *avctx)
 
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 []
 
const FFCodec ff_interplay_acm_decoder
 

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 25 of file interplayacm.c.

◆ set_pos

#define set_pos ( s,
r,
c,
idx )
Value:
do { \
unsigned pos = ((r) << s->level) + (c); \
s->block[pos] = s->midbuf[(idx)]; \
} while (0)
#define s(width, name)
Definition cbs_vp9.c:198
#define r
Definition input.c:42
unsigned int pos
Definition spdifenc.c:431
static double c[64]

Definition at line 116 of file interplayacm.c.

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

Typedef Documentation

◆ filler

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

Definition at line 421 of file interplayacm.c.

Function Documentation

◆ decode_init_static()

static av_cold void decode_init_static ( void )
static

Definition at line 62 of file interplayacm.c.

Referenced by decode_ctx_init(), decode_init(), and decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext * avctx)
static

Definition at line 77 of file interplayacm.c.

◆ zero()

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

Definition at line 121 of file interplayacm.c.

Referenced by add_pixels_clamped_msa(), apv_extract_header_info(), avc_loopfilter_cb_or_cr_inter_edge_hor_msa(), avc_loopfilter_cb_or_cr_inter_edge_ver_msa(), avc_loopfilter_cb_or_cr_intra_edge_hor_msa(), avc_loopfilter_cb_or_cr_intra_edge_ver_msa(), avc_loopfilter_luma_inter_edge_hor_msa(), avc_loopfilter_luma_inter_edge_ver_msa(), avc_loopfilter_luma_intra_edge_hor_msa(), avc_loopfilter_luma_intra_edge_ver_msa(), avc_wgt_4x2_msa(), check_dcbzl_effect(), copy_8bit_to_16bit_width8_msa(), DECL_FUNC(), ff_h264_add_pixels4_8_lasx(), ff_h264_add_pixels8_8_lasx(), ff_h264_h_lpf_luma_8_lasx(), ff_h264_h_lpf_luma_intra_8_lasx(), ff_h264_idct_add_msa(), ff_h264_loop_filter_strength_lasx(), ff_h264_loop_filter_strength_msa(), ff_h264_v_lpf_luma_8_lasx(), ff_h264_v_lpf_luma_intra_8_lasx(), ff_hevc_idct_4x4_lsx(), ff_hevc_loop_filter_chroma_h_8_lsx(), ff_hevc_loop_filter_chroma_v_8_lsx(), ff_hevc_loop_filter_luma_h_8_lsx(), ff_hevc_loop_filter_luma_v_8_lsx(), ff_hscale_16_to_15_lasx(), ff_hscale_16_to_19_lasx(), ff_hscale_8_to_15_lasx(), ff_hscale_8_to_19_lasx(), ff_jpegls_decode_picture(), ff_loop_filter_h_48_16_lsx(), ff_loop_filter_h_48_16_msa(), ff_loop_filter_h_84_16_lsx(), ff_loop_filter_h_84_16_msa(), ff_loop_filter_h_88_16_lsx(), ff_loop_filter_h_88_16_msa(), ff_loop_filter_h_8_8_lsx(), ff_loop_filter_h_8_8_msa(), ff_loop_filter_v_16_8_lsx(), ff_loop_filter_v_16_8_msa(), ff_loop_filter_v_48_16_lsx(), ff_loop_filter_v_48_16_msa(), ff_loop_filter_v_84_16_lsx(), ff_loop_filter_v_84_16_msa(), ff_loop_filter_v_88_16_lsx(), ff_loop_filter_v_88_16_msa(), ff_loop_filter_v_8_8_lsx(), ff_loop_filter_v_8_8_msa(), ff_vc1_inv_trans_4x4_dc_lasx(), ff_vector_fmul_altivec(), ff_vector_fmul_reverse_altivec(), ff_vector_fmul_reverse_vsx(), ff_vector_fmul_vsx(), ff_vector_fmul_window_altivec(), ff_vector_fmul_window_vsx(), ff_vp3_h_loop_filter_msa(), ff_vp3_idct_dc_add_msa(), ff_vp3_v_loop_filter_msa(), ff_vp8_idct_add_msa(), ff_vp8_idct_dc_add_msa(), ff_weight_h264_pixels16_8_msa(), g723_1_encode_frame(), get_cabac_bypass_sign_loongarch(), get_cabac_bypass_sign_mips(), hadamard_diff_8x8_msa(), hadamard_intra_8x8_msa(), hevc_bi_copy_12w_msa(), hevc_bi_copy_16w_lsx(), hevc_bi_copy_16w_msa(), hevc_bi_copy_24w_msa(), hevc_bi_copy_32w_msa(), hevc_bi_copy_48w_msa(), hevc_bi_copy_4w_lsx(), hevc_bi_copy_4w_msa(), hevc_bi_copy_64w_msa(), hevc_bi_copy_6w_lsx(), hevc_bi_copy_6w_msa(), hevc_bi_copy_8w_lsx(), hevc_bi_copy_8w_msa(), hevc_biwgt_copy_12w_msa(), hevc_biwgt_copy_16w_msa(), hevc_biwgt_copy_24w_msa(), hevc_biwgt_copy_32w_msa(), hevc_biwgt_copy_48w_msa(), hevc_biwgt_copy_4w_msa(), hevc_biwgt_copy_64w_msa(), hevc_biwgt_copy_6w_msa(), hevc_biwgt_copy_8w_msa(), hevc_copy_12w_lsx(), hevc_copy_12w_msa(), hevc_copy_16w_lsx(), hevc_copy_16w_msa(), hevc_copy_24w_lsx(), hevc_copy_24w_msa(), hevc_copy_32w_lsx(), hevc_copy_32w_msa(), hevc_copy_48w_lsx(), hevc_copy_48w_msa(), hevc_copy_4w_msa(), hevc_copy_64w_lsx(), hevc_copy_64w_msa(), hevc_copy_6w_msa(), hevc_copy_8w_msa(), hevc_hv_uniwgt_4t_12w_msa(), hevc_hv_uniwgt_4t_4multx8mult_msa(), hevc_hv_uniwgt_4t_4x2_msa(), hevc_hv_uniwgt_4t_4x4_msa(), hevc_hv_uniwgt_4t_6w_msa(), hevc_hv_uniwgt_4t_8multx4_msa(), hevc_hv_uniwgt_4t_8multx4mult_msa(), hevc_hv_uniwgt_4t_8x2_msa(), hevc_hv_uniwgt_4t_8x6_msa(), hevc_hv_uniwgt_8t_12w_msa(), hevc_hv_uniwgt_8t_4w_msa(), hevc_hv_uniwgt_8t_8multx2mult_msa(), hevc_hz_uniwgt_4t_12w_msa(), hevc_hz_uniwgt_4t_16w_msa(), hevc_hz_uniwgt_4t_24w_msa(), hevc_hz_uniwgt_4t_32w_msa(), hevc_hz_uniwgt_4t_4x2_msa(), hevc_hz_uniwgt_4t_4x4_msa(), hevc_hz_uniwgt_4t_4x8multiple_msa(), hevc_hz_uniwgt_4t_6w_msa(), hevc_hz_uniwgt_4t_8x2_msa(), hevc_hz_uniwgt_4t_8x4_msa(), hevc_hz_uniwgt_4t_8x6_msa(), hevc_hz_uniwgt_4t_8x8multiple_msa(), hevc_hz_uniwgt_8t_12w_msa(), hevc_hz_uniwgt_8t_16w_msa(), hevc_hz_uniwgt_8t_24w_msa(), hevc_hz_uniwgt_8t_32w_msa(), hevc_hz_uniwgt_8t_48w_msa(), hevc_hz_uniwgt_8t_4w_msa(), hevc_hz_uniwgt_8t_64w_msa(), hevc_hz_uniwgt_8t_8w_msa(), hevc_intra_pred_angular_lower_4width_msa(), hevc_intra_pred_angular_upper_4width_msa(), hevc_intra_pred_dc_16x16_msa(), hevc_intra_pred_dc_4x4_msa(), hevc_intra_pred_dc_8x8_msa(), hevc_intra_pred_horiz_4x4_msa(), hevc_intra_pred_horiz_8x8_msa(), hevc_intra_pred_plane_4x4_msa(), hevc_intra_pred_plane_8x8_msa(), hevc_intra_pred_vert_4x4_msa(), hevc_intra_pred_vert_8x8_msa(), hevc_loopfilter_chroma_hor_msa(), hevc_loopfilter_chroma_ver_msa(), hevc_loopfilter_luma_hor_msa(), hevc_loopfilter_luma_ver_msa(), hevc_sao_band_filter_16multiple_msa(), hevc_sao_band_filter_4width_msa(), hevc_sao_band_filter_8width_msa(), hevc_sao_edge_filter_0degree_4width_lsx(), hevc_sao_edge_filter_0degree_4width_msa(), hevc_uniwgt_copy_12w_msa(), hevc_uniwgt_copy_16w_msa(), hevc_uniwgt_copy_24w_msa(), hevc_uniwgt_copy_32w_msa(), hevc_uniwgt_copy_48w_msa(), hevc_uniwgt_copy_4w_msa(), hevc_uniwgt_copy_64w_msa(), hevc_uniwgt_copy_6w_msa(), hevc_uniwgt_copy_8w_msa(), hevc_vt_uniwgt_4t_12w_msa(), hevc_vt_uniwgt_4t_16w_msa(), hevc_vt_uniwgt_4t_24w_msa(), hevc_vt_uniwgt_4t_32w_msa(), hevc_vt_uniwgt_4t_4x2_msa(), hevc_vt_uniwgt_4t_4x4_msa(), hevc_vt_uniwgt_4t_4x8multiple_msa(), hevc_vt_uniwgt_4t_6w_msa(), hevc_vt_uniwgt_4t_8x2_msa(), hevc_vt_uniwgt_4t_8x4_msa(), hevc_vt_uniwgt_4t_8x6_msa(), hevc_vt_uniwgt_4t_8x8mult_msa(), hevc_vt_uniwgt_8t_12w_msa(), hevc_vt_uniwgt_8t_16multx4mult_msa(), hevc_vt_uniwgt_8t_4w_msa(), hevc_vt_uniwgt_8t_8w_msa(), idct_msa(), lead_decode_frame(), memset_zero_16width_msa(), nlmeans_opencl_filter_frame(), nlmeans_plane(), pdv_get_fps(), ra144_encode_subblock(), reduce64(), sad_8width_msa(), sad_horiz_bilinear_filter_8width_msa(), sad_hv_bilinear_filter_8width_msa(), sad_vert_bilinear_filter_8width_msa(), simple_idct_add_msa(), simple_idct_msa(), simple_idct_put_msa(), sse_4width_msa(), task_run_stage(), tl_init(), vp9_hz_lpf_t16_16w(), vp9_hz_lpf_t16_16w(), vp9_hz_lpf_t4_and_t8_16w(), vp9_hz_lpf_t4_and_t8_16w(), vp9_iadst16_1d_columns_addblk_msa(), vp9_iadst16_1d_columns_msa(), vp9_iadst4x4_colcol_addblk_msa(), vp9_iadst8x8_colcol_addblk_msa(), vp9_iadst_idct_4x4_add_msa(), vp9_iadst_idct_8x8_add_msa(), vp9_idct16_1d_columns_addblk_lsx(), vp9_idct16_1d_columns_addblk_msa(), vp9_idct16_1d_columns_lsx(), vp9_idct16_1d_columns_msa(), vp9_idct16x16_10_colcol_addblk_lsx(), vp9_idct32x32_1_add_lsx(), vp9_idct32x32_34_colcol_addblk_lsx(), vp9_idct4x4_colcol_addblk_msa(), vp9_idct8x32_column_even_process_store(), vp9_idct8x32_column_even_process_store(), vp9_idct8x32_column_odd_process_store(), vp9_idct8x32_column_odd_process_store(), vp9_idct8x8_12_colcol_addblk_lsx(), vp9_idct8x8_12_colcol_addblk_msa(), vp9_idct8x8_colcol_addblk_lsx(), vp9_idct8x8_colcol_addblk_msa(), vp9_idct_iadst_4x4_add_msa(), vp9_idct_iadst_8x8_add_msa(), vp9_vt_lpf_t16_16w(), vp9_vt_lpf_t16_16w(), vp9_vt_lpf_t16_8w(), vp9_vt_lpf_t16_8w(), vp9_vt_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_8w(), vp9_vt_lpf_t4_and_t8_8w(), yuv2rgb_2_template_lsx(), yuv2rgb_full_1_template_lasx(), and yuv2rgb_full_1_template_lsx().

◆ bad()

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

Definition at line 130 of file interplayacm.c.

Referenced by amv_init(), and print_results().

◆ linear()

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

◆ k13()

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

Definition at line 148 of file interplayacm.c.

◆ k12()

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

Definition at line 173 of file interplayacm.c.

◆ k24()

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

Definition at line 191 of file interplayacm.c.

◆ k23()

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

Definition at line 217 of file interplayacm.c.

◆ k35()

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

Definition at line 235 of file interplayacm.c.

◆ k34()

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

Definition at line 269 of file interplayacm.c.

◆ k45()

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

Definition at line 294 of file interplayacm.c.

◆ k44()

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

Definition at line 321 of file interplayacm.c.

◆ t15()

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

◆ t27()

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

Definition at line 368 of file interplayacm.c.

Referenced by itxfm_wrap().

◆ t37()

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

Definition at line 397 of file interplayacm.c.

◆ fill_block()

static int fill_block ( InterplayACMContext * s)
static

Definition at line 434 of file interplayacm.c.

Referenced by decode_block().

◆ juggle()

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

Definition at line 452 of file interplayacm.c.

Referenced by juggle_block().

◆ juggle_block()

static void juggle_block ( InterplayACMContext * s)
static

Definition at line 479 of file interplayacm.c.

Referenced by decode_block().

◆ decode_block()

static int decode_block ( InterplayACMContext * s)
static

Definition at line 532 of file interplayacm.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
AVPacket * pkt )
static

Definition at line 561 of file interplayacm.c.

◆ decode_flush()

static void decode_flush ( AVCodecContext * avctx)
static

Definition at line 628 of file interplayacm.c.

◆ decode_close()

static av_cold int decode_close ( AVCodecContext * avctx)
static

Definition at line 636 of file interplayacm.c.

Variable Documentation

◆ map_1bit

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

Definition at line 31 of file interplayacm.c.

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

◆ map_2bit_near

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

Definition at line 32 of file interplayacm.c.

Referenced by k23(), and k24().

◆ map_2bit_far

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

Definition at line 33 of file interplayacm.c.

Referenced by k34(), and k35().

◆ map_3bit

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

Definition at line 34 of file interplayacm.c.

Referenced by k44(), and k45().

◆ mul_3x3

int mul_3x3[3 *3 *3]
static

Definition at line 36 of file interplayacm.c.

Referenced by decode_init_static(), and t15().

◆ mul_3x5

int mul_3x5[5 *5 *5]
static

Definition at line 37 of file interplayacm.c.

Referenced by decode_init_static(), and t27().

◆ mul_2x11

int mul_2x11[11 * 11]
static

Definition at line 38 of file interplayacm.c.

Referenced by decode_init_static(), and t37().

◆ filler_list

const filler filler_list[]
static
Initial value:
= {
k24, k23, t27, k35,
k34, bad, k45, k44,
bad, t37, bad, bad,
}
static int k44(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 t15(InterplayACMContext *s, unsigned ind, unsigned col)
static int k13(InterplayACMContext *s, unsigned ind, unsigned col)
static int linear(InterplayACMContext *s, unsigned ind, unsigned col)
static int k24(InterplayACMContext *s, unsigned ind, unsigned col)
static int k12(InterplayACMContext *s, unsigned ind, unsigned col)
static int k23(InterplayACMContext *s, unsigned ind, unsigned col)
static int k45(InterplayACMContext *s, unsigned ind, unsigned col)
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
static int k35(InterplayACMContext *s, unsigned ind, unsigned col)
static int bad(InterplayACMContext *s, unsigned ind, unsigned col)
static int k34(InterplayACMContext *s, unsigned ind, unsigned col)

Definition at line 423 of file interplayacm.c.

Referenced by fill_block().

◆ ff_interplay_acm_decoder

const FFCodec ff_interplay_acm_decoder
Initial value:
= {
.p.name = "interplayacm",
CODEC_LONG_NAME("Interplay ACM"),
.p.type = AVMEDIA_TYPE_AUDIO,
.init = decode_init,
.flush = decode_flush,
.close = decode_close,
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_data_size = sizeof(InterplayACMContext),
}
static av_cold void decode_flush(AVCodecContext *avctx)
Definition agm.c:1253
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#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 codec.h:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_INTERPLAY_ACM
Definition codec_id.h:531
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
static av_cold int decode_init(AVCodecContext *avctx)
Definition 4xm.c:998
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition 4xm.c:837
static av_cold int decode_close(AVCodecContext *avctx)
Definition aacdec.c:1220

Definition at line 649 of file interplayacm.c.