Libav
Data Structures | Macros | Functions | Variables
mace.c File Reference

MACE decoder. More...

#include "avcodec.h"
#include "internal.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct  ChannelData
 
struct  MACEContext
 

Macros

#define QT_8S_2_16S(x)   (((x) & 0xFF00) | (((x) >> 8) & 0xFF))
 

Functions

static int16_t mace_broken_clip_int16 (int n)
 MACE version of av_clip_int16(). More...
 
static int16_t read_table (ChannelData *chd, uint8_t val, int tab_idx)
 
static void chomp3 (ChannelData *chd, int16_t *output, uint8_t val, int tab_idx)
 
static void chomp6 (ChannelData *chd, int16_t *output, uint8_t val, int tab_idx)
 
static av_cold int mace_decode_init (AVCodecContext *avctx)
 
static int mace_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

static const int16_t MACEtab1 [] = {-13, 8, 76, 222, 222, 76, 8, -13}
 
static const int16_t MACEtab3 [] = {-18, 140, 140, -18}
 
static const int16_t MACEtab2 [][4]
 
static const int16_t MACEtab4 [][2]
 
struct {
   const int16_t *   tab1
 
   const int16_t *   tab2
 
   int   stride
 
tabs []
 
AVCodec ff_mace3_decoder
 
AVCodec ff_mace6_decoder
 

Detailed Description

MACE decoder.

Definition in file mace.c.

Macro Definition Documentation

§ QT_8S_2_16S

#define QT_8S_2_16S (   x)    (((x) & 0xFF00) | (((x) >> 8) & 0xFF))

Definition at line 151 of file mace.c.

Referenced by chomp3(), and chomp6().

Function Documentation

§ mace_broken_clip_int16()

static int16_t mace_broken_clip_int16 ( int  n)
inlinestatic

MACE version of av_clip_int16().

We have to do this to keep binary identical output to the binary decoder.

Definition at line 165 of file mace.c.

Referenced by chomp3(), and chomp6().

§ read_table()

static int16_t read_table ( ChannelData chd,
uint8_t  val,
int  tab_idx 
)
static

Definition at line 175 of file mace.c.

Referenced by chomp3(), and chomp6().

§ chomp3()

static void chomp3 ( ChannelData chd,
int16_t *  output,
uint8_t  val,
int  tab_idx 
)
static

Definition at line 190 of file mace.c.

Referenced by mace_decode_frame().

§ chomp6()

static void chomp6 ( ChannelData chd,
int16_t *  output,
uint8_t  val,
int  tab_idx 
)
static

Definition at line 201 of file mace.c.

Referenced by mace_decode_frame().

§ mace_decode_init()

static av_cold int mace_decode_init ( AVCodecContext avctx)
static

Definition at line 227 of file mace.c.

§ mace_decode_frame()

static int mace_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 236 of file mace.c.

Variable Documentation

§ MACEtab1

const int16_t MACEtab1[] = {-13, 8, 76, 222, 222, 76, 8, -13}
static

Definition at line 37 of file mace.c.

§ MACEtab3

const int16_t MACEtab3[] = {-18, 140, 140, -18}
static

Definition at line 39 of file mace.c.

§ MACEtab2

const int16_t MACEtab2[][4]
static

Definition at line 41 of file mace.c.

§ MACEtab4

const int16_t MACEtab4[][2]
static

Definition at line 108 of file mace.c.

§ tab1

const int16_t* tab1

Definition at line 144 of file mace.c.

Referenced by compute_stereo(), dequant(), and main().

§ tab2

const int16_t* tab2

Definition at line 144 of file mace.c.

Referenced by main().

§ stride

int stride

Definition at line 144 of file mace.c.

Referenced by aasc_decode_frame(), adpcm_compress_trellis(), apply_loop_filter(), avg_no_rnd_vc1_chroma_mc4_c(), avg_no_rnd_vc1_chroma_mc8_c(), avg_tpel_pixels_mc01_c(), avg_tpel_pixels_mc02_c(), avg_tpel_pixels_mc10_c(), avg_tpel_pixels_mc11_c(), avg_tpel_pixels_mc12_c(), avg_tpel_pixels_mc20_c(), avg_tpel_pixels_mc21_c(), avg_tpel_pixels_mc22_c(), avs_decode_frame(), bink_decode_plane(), bink_put_pixels(), binkb_decode_plane(), bitplane_decoding(), block_cmp(), cavs_idct8_add_c(), cdg_copy_rect_buf(), cdg_scroll(), cdg_tile_block(), celt_deinterleave_hadamard(), celt_exp_rotation(), celt_exp_rotation1(), celt_haar1(), celt_imdct_half(), celt_interleave_hadamard(), check_bidir_mv(), check_intra_mode(), checkline(), cmp_direct_inline(), cmp_inline(), codec37_mv(), copy_block(), copy_CTB(), dc_127_16x16_c(), dc_127_32x32_c(), dc_127_8x8_c(), dc_128_16x16_c(), dc_128_32x32_c(), dc_128_8x8_c(), dc_129_16x16_c(), dc_129_32x32_c(), dc_129_8x8_c(), dc_16x16_c(), dc_32x32_c(), dc_8x8_c(), dc_left_16x16_c(), dc_left_32x32_c(), dc_left_8x8_c(), dc_top_16x16_c(), dc_top_32x32_c(), dc_top_8x8_c(), dct_sad8x8_c(), decode(), decode_13(), decode_555(), decode_dct_block(), decode_fill_block(), decode_frame(), decode_haar_block(), decode_hybrid(), decode_image_block(), decode_init(), decode_p_block(), decode_pixel_in_context(), decode_plane(), decode_region(), decode_region_intra(), decode_region_masked(), decode_rowskip(), dequant(), diff_pixels_c(), draw_n_color(), dx2_decode_slice_565(), dx2_decode_slice_rgb(), encode_block(), encode_frame(), ff_apply_vector_2x2(), ff_apply_vector_4x4(), ff_ccitt_unpack(), ff_celt_imdct_uninit(), ff_gmc_c(), ff_h263_decode_mb(), ff_h264_add_pixels4(), ff_h264_add_pixels8(), ff_init_me(), ff_jpegls_decode_picture(), ff_mss34_dct_put(), ff_vp6_filter_diag4_c(), fft5(), fic_decode_slice(), fic_idct_put(), fillPlane(), filter181(), filter_common(), filter_mbedge(), for(), fraps2_decode_plane(), g2m_paint_cursor(), get_dc(), get_frame_mb(), get_intra_count(), get_visual_weight(), gmc1_c(), guess_dc(), h261_loop_filter(), h263_mv4_search(), h263_v_loop_filter_c(), h264_v_loop_filter_chroma(), h264_v_loop_filter_chroma_intra(), h264_v_loop_filter_luma(), h264_v_loop_filter_luma_intra(), h_block_filter(), hevc_h_loop_filter_chroma(), hevc_h_loop_filter_luma(), hevc_v_loop_filter_chroma(), hevc_v_loop_filter_luma(), hl_decode_mb(), hl_decode_mb_idct_luma(), hl_decode_mb_predict_luma(), hls_residual_coding(), hor_16x16_c(), hor_32x32_c(), hor_8x8_c(), idct(), idct_put(), init_mv4_ref(), init_ref(), interlaced_search(), intra_pred(), kempf_restore_buf(), lag_decode_arith_plane(), lag_pred_line(), lag_pred_line_yuy2(), left_predict(), loco_decode_plane(), loco_predict(), ls_decode_line(), ls_encode_line(), main(), mangle_rgb_planes(), mcdc(), median_predict(), mpeg4_decode_partition_a(), msvideo1_decode_16bit(), msvideo1_decode_8bit(), nsse16_c(), nsse8_c(), old_codec37(), old_codec47(), paint_raw(), paint_rect(), pcx_decode_frame(), pred16x16_dc(), pred16x16_horizontal(), pred16x16_left_dc(), pred16x16_plane(), pred16x16_tm_vp8_c(), pred16x16_top_dc(), pred16x16_vertical(), pred4x4_127_dc(), pred4x4_128_dc(), pred4x4_129_dc(), pred4x4_dc(), pred4x4_down_left(), pred4x4_down_left_rv40_c(), pred4x4_down_left_rv40_nodown_c(), pred4x4_down_left_svq3_c(), pred4x4_down_right(), pred4x4_horizontal(), pred4x4_horizontal_add(), pred4x4_horizontal_down(), pred4x4_horizontal_up(), pred4x4_horizontal_up_rv40_c(), pred4x4_horizontal_up_rv40_nodown_c(), pred4x4_horizontal_vp8_c(), pred4x4_left_dc(), pred4x4_tm_vp8_c(), pred4x4_top_dc(), pred4x4_vertical(), pred4x4_vertical_add(), pred4x4_vertical_left(), pred4x4_vertical_left_rv40(), pred4x4_vertical_left_vp8_c(), pred4x4_vertical_right(), pred4x4_vertical_vp8_c(), pred8x16_dc(), pred8x16_left_dc(), pred8x16_mad_cow_dc_0l0(), pred8x16_mad_cow_dc_0lt(), pred8x16_mad_cow_dc_l00(), pred8x16_mad_cow_dc_l0t(), pred8x16_plane(), pred8x16_top_dc(), pred8x8_dc(), pred8x8_dc_rv40_c(), pred8x8_left_dc_rv40_c(), pred8x8_mad_cow_dc_0l0(), pred8x8_mad_cow_dc_0lt(), pred8x8_mad_cow_dc_l00(), pred8x8_mad_cow_dc_l0t(), pred8x8_plane(), pred8x8_tm_vp8_c(), pred8x8_top_dc(), pred8x8_top_dc_rv40_c(), pred8x8l_horizontal_add(), pred8x8l_vertical_add(), pred_angular_0(), pred_angular_1(), pred_angular_2(), pred_angular_3(), prefetch_ppc(), preview_obmc(), process_block(), ps_hybrid_analysis_c(), ptx_decode_frame(), put_cursor(), put_no_rnd_vc1_chroma_mc4_c(), put_no_rnd_vc1_chroma_mc8_c(), put_obmc(), put_pcm(), put_pixels(), put_tpel_pixels_mc01_c(), put_tpel_pixels_mc02_c(), put_tpel_pixels_mc10_c(), put_tpel_pixels_mc11_c(), put_tpel_pixels_mc12_c(), put_tpel_pixels_mc20_c(), put_tpel_pixels_mc21_c(), put_tpel_pixels_mc22_c(), qpeg_decode_inter(), qpeg_decode_intra(), read_table(), render_slice(), restore_median(), restore_median_il(), restore_rgb_planes(), restore_tqb_pixels(), rl2_rle_decode(), rpza_decode_stream(), rv30_weak_loop_filter(), rv34_idct_add_c(), rv34_idct_dc_add_c(), rv34_pred_4x4_block(), rv40_adaptive_loop_filter(), rv40_loop_filter_strength(), rv40_strong_loop_filter(), rv40_weak_loop_filter(), sad_hpel_motion_search(), sao_band_filter(), sao_band_filter_0(), sao_band_filter_1(), sao_band_filter_2(), sao_band_filter_3(), sao_edge_filter_0(), sao_edge_filter_1(), sao_edge_filter_2(), sao_edge_filter_3(), sao_filter_CTB(), skip_check(), smc_decode_stream(), sse(), sunrast_decode_frame(), svq1_encode_plane(), tget(), tiff_unpack_strip(), tm2_apply_deltas(), tm2_high_chroma(), tm_16x16_c(), tm_32x32_c(), tm_4x4_c(), tm_8x8_c(), transform_16x16_add(), transform_32x32_add(), transform_4x4_add(), transform_4x4_luma_add(), transform_8x8_add(), transform_skip(), transquant_bypass16x16(), transquant_bypass32x32(), transquant_bypass4x4(), transquant_bypass8x8(), tscc2_decode_mb(), tscc2_idct4_put(), txd_decode_frame(), v_block_filter(), vble_restore_plane(), vc1_filter_line(), vc1_h_overlap_c(), vc1_v_overlap_c(), vert_16x16_c(), vert_32x32_c(), vert_8x8_c(), vp3_h_loop_filter_c(), vp3_v_loop_filter_c(), vp56_mc(), vp56_size_changed(), vp6_block_variance(), vp6_filter(), vp6_filter_diag2(), vp6_filter_hv4(), vsad16_c(), vsse16_c(), xan_wc3_copy_pixel_run(), xan_wc3_output_pixel_run(), and zmbv_decode_xor_16().

§ tabs

const { ... } tabs[]
Initial value:
= {
{MACEtab1, &MACEtab2[0][0], 4},
{MACEtab3, &MACEtab4[0][0], 2},
{MACEtab1, &MACEtab2[0][0], 4}
}
static const int16_t MACEtab1[]
Definition: mace.c:37
static const int16_t MACEtab3[]
Definition: mace.c:39
static const int16_t MACEtab2[][4]
Definition: mace.c:41
static const int16_t MACEtab4[][2]
Definition: mace.c:108

Referenced by read_table(), and very_broken_op().

§ ff_mace3_decoder

AVCodec ff_mace3_decoder
Initial value:
= {
.name = "mace3",
.long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"),
.priv_data_size = sizeof(MACEContext),
.capabilities = CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
static int mace_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: mace.c:236
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
static av_cold int mace_decode_init(AVCodecContext *avctx)
Definition: mace.c:227
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
signed 16 bits, planar
Definition: samplefmt.h:70

Definition at line 282 of file mace.c.

§ ff_mace6_decoder

AVCodec ff_mace6_decoder
Initial value:
= {
.name = "mace6",
.long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"),
.priv_data_size = sizeof(MACEContext),
.capabilities = CODEC_CAP_DR1,
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:275
static int mace_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: mace.c:236
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:684
sample_fmts
Definition: avconv_filter.c:68
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:145
static av_cold int mace_decode_init(AVCodecContext *avctx)
Definition: mace.c:227
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:61
AV_SAMPLE_FMT_NONE
Definition: avconv_filter.c:68
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:499
signed 16 bits, planar
Definition: samplefmt.h:70

Definition at line 295 of file mace.c.