FFmpeg  4.0
Data Structures | Macros | Functions | Variables
dct.c File Reference

DCT test (c) 2001 Fabrice Bellard Started from sample code by Juan J. More...

#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "libavutil/cpu.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "libavutil/time.h"
#include "libavcodec/dct.h"
#include "libavcodec/idctdsp.h"
#include "libavcodec/simple_idct.h"
#include "libavcodec/xvididct.h"
#include "libavcodec/aandcttab.h"
#include "libavcodec/faandct.h"
#include "libavcodec/faanidct.h"
#include "libavcodec/dctref.h"
#include "compat/getopt.c"

Go to the source code of this file.

Data Structures

struct  algo
 

Macros

#define AANSCALE_BITS   12
 
#define NB_ITS   20000
 
#define NB_ITS_SPEED   50000
 

Functions

static void ff_prores_idct_wrap (int16_t *dst)
 
static void init_block (int16_t block[64], int test, int is_idct, AVLFG *prng, int vals)
 
static void permute (int16_t dst[64], const int16_t src[64], enum idct_permutation_type perm_type)
 
static int dct_error (const struct algo *dct, int test, int is_idct, int speed, const int bits)
 
static void idct248_ref (uint8_t *dest, ptrdiff_t linesize, int16_t *block)
 
static void idct248_error (const char *name, void(*idct248_put)(uint8_t *dest, ptrdiff_t line_size, int16_t *block), int speed)
 
static void help (void)
 
int main (int argc, char **argv)
 

Variables

static const struct algo fdct_tab []
 
static const struct algo idct_tab []
 
static const struct algo fdct_tab_arch [] = { { 0 } }
 
static const struct algo idct_tab_arch [] = { { 0 } }
 
static int16_t block [64]
 
static int16_t block1 [64]
 
static uint8_t img_dest [64]
 
static uint8_t img_dest1 [64]
 

Detailed Description

DCT test (c) 2001 Fabrice Bellard Started from sample code by Juan J.

Sierralta P.

Definition in file dct.c.

Macro Definition Documentation

◆ AANSCALE_BITS

#define AANSCALE_BITS   12

Definition at line 110 of file dct.c.

Referenced by dct_error().

◆ NB_ITS

#define NB_ITS   20000

Definition at line 112 of file dct.c.

Referenced by dct_error(), and idct248_error().

◆ NB_ITS_SPEED

#define NB_ITS_SPEED   50000

Definition at line 113 of file dct.c.

Referenced by dct_error(), and idct248_error().

Function Documentation

◆ ff_prores_idct_wrap()

static void ff_prores_idct_wrap ( int16_t *  dst)
static

Definition at line 69 of file dct.c.

◆ init_block()

static void init_block ( int16_t  block[64],
int  test,
int  is_idct,
AVLFG prng,
int  vals 
)
static

Definition at line 118 of file dct.c.

Referenced by dct_error().

◆ permute()

static void permute ( int16_t  dst[64],
const int16_t  src[64],
enum idct_permutation_type  perm_type 
)
static

Definition at line 148 of file dct.c.

Referenced by dct_error().

◆ dct_error()

static int dct_error ( const struct algo dct,
int  test,
int  is_idct,
int  speed,
const int  bits 
)
static

Definition at line 178 of file dct.c.

Referenced by main().

◆ idct248_ref()

static void idct248_ref ( uint8_t dest,
ptrdiff_t  linesize,
int16_t *  block 
)
static

Definition at line 293 of file dct.c.

Referenced by idct248_error().

◆ idct248_error()

static void idct248_error ( const char *  name,
void(*)(uint8_t *dest, ptrdiff_t line_size, int16_t *block idct248_put,
int  speed 
)
static

Definition at line 373 of file dct.c.

Referenced by main().

◆ help()

static void help ( void  )
static

Definition at line 450 of file dct.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 466 of file dct.c.

Variable Documentation

◆ fdct_tab

const struct algo fdct_tab[]
static
Initial value:
= {
{ "REF-DBL", ff_ref_fdct, FF_IDCT_PERM_NONE },
{ "IJG-AAN-INT", ff_fdct_ifast, FF_IDCT_PERM_NONE },
{ "IJG-LLM-INT", ff_jpeg_fdct_islow_8, FF_IDCT_PERM_NONE },
}
void ff_fdct_ifast(int16_t *data)
Definition: jfdctfst.c:208
void ff_jpeg_fdct_islow_8(int16_t *data)
void ff_ref_fdct(short *block)
Transform 8x8 block of data with a double precision forward DCT This is a reference implementation...
Definition: dctref.c:59

Definition at line 60 of file dct.c.

◆ idct_tab

const struct algo idct_tab[]
static
Initial value:
= {
{ "REF-DBL", ff_ref_idct, FF_IDCT_PERM_NONE },
{ "SIMPLE-C", ff_simple_idct_int16_8bit, FF_IDCT_PERM_NONE },
{ "SIMPLE-C10", ff_simple_idct_int16_10bit, FF_IDCT_PERM_NONE },
}
void ff_simple_idct_int16_8bit(int16_t *block)
static void ff_prores_idct_wrap(int16_t *dst)
Definition: dct.c:69
void ff_simple_idct_int16_12bit(int16_t *block)
void ff_j_rev_dct(int16_t *data)
void ff_simple_idct_int16_10bit(int16_t *block)
void ff_ref_idct(short *block)
Transform 8x8 block of data with a double precision inverse DCT This is a reference implementation...
Definition: dctref.c:95

Definition at line 82 of file dct.c.

◆ fdct_tab_arch

const struct algo fdct_tab_arch[] = { { 0 } }
static

Definition at line 106 of file dct.c.

◆ idct_tab_arch

const struct algo idct_tab_arch[] = { { 0 } }
static

Definition at line 107 of file dct.c.

◆ block

int16_t block[64]
static

Definition at line 115 of file dct.c.

Referenced by allocate_buffers(), apply_channel_coupling(), apply_mdct(), av_hmac_final(), av_hmac_init(), backup_duplicate_context(), bilateral_me(), bink_decode_plane(), binkb_decode_plane(), bit_alloc(), bit_alloc_masking(), celt_decode_coarse_energy(), celt_decode_fine_energy(), celt_enc_quant_pfilter(), celt_encode_frame(), celt_frame_mdct(), celt_quant_final(), celt_quant_fine(), check_4block_inter(), check_block(), check_dcbzl_effect(), check_idct(), check_idct_dc4(), check_idct_multiple(), check_itxfm(), check_luma_dc_wht(), cluster_mvs(), clv_dct(), cocg_block(), compute_rematrixing_strategy(), convert_coeffs(), copy_replace_length_codes(), count_exponent_bits(), count_frame_bits(), count_mantissa_bits_update_ch(), count_nalus(), crypto_seek(), dct_error(), dct_get(), dct_quantize(), dct_single_coeff_elimination(), decode(), decode_alpha_block(), decode_cell(), decode_cell_data(), decode_dc(), decode_dct_block(), decode_frame(), decode_init(), decode_mb_b(), decode_mb_i(), decode_residual_block(), decode_residual_inter(), decode_slice_alpha(), decode_slice_chroma(), decode_slice_luma(), decode_yuv_frame(), decompress_indices(), DEF(), dirac_unpack_block_motion_data(), dnxhd_calc_bits_thread(), dnxhd_decode_dct_block(), dnxhd_encode_thread(), dv_decode_video_segment(), dvbsub_parse_object_segment(), dxt5_block_internal(), encode_block(), encode_exponents(), encode_slice_plane(), exp_quant_coarse(), extract_exponents(), fdct_get(), ff_ac3_apply_rematrixing(), ff_ac3_compute_coupling_strategy(), ff_ac3_encode_close(), ff_ac3_group_exponents(), ff_ac3_quantize_mantissas(), ff_celt_decode_frame(), ff_celt_flush(), ff_clear_block_mmi(), ff_clear_blocks_mmi(), ff_dct_unquantize_mpeg1_inter_mmi(), ff_dct_unquantize_mpeg1_intra_mmi(), ff_dct_unquantize_mpeg2_intra_mmi(), ff_diff_pixels_mmi(), ff_eac3_output_frame_header(), ff_eac3_set_cpl_states(), ff_fix_long_p_mvs(), ff_get_pixels_8_mmi(), ff_h263_pred_motion(), ff_h264_chroma422_dc_dequant_idct(), ff_h264_chroma_dc_dequant_idct(), ff_h264_idct8_add(), ff_h264_idct8_add4(), ff_h264_idct8_dc_add(), ff_h264_idct_add(), ff_h264_idct_add16(), ff_h264_idct_add16intra(), ff_h264_idct_add8(), ff_h264_idct_add8_422(), ff_h264_idct_add_8_mmi(), ff_h264_idct_dc_add(), ff_h264_weight_pixels16_8_mmi(), ff_h264_weight_pixels8_8_mmi(), ff_intrax8_common_init(), ff_mss34_dct_put(), ff_put_pixels16_8_mmi(), ff_put_pixels4_8_mmi(), ff_put_pixels8_xy2_8_mmi(), ff_put_signed_pixels_clamped_mmi(), ff_rtjpeg_decode_frame_yuv420(), ff_simple_idct248_put(), ff_simple_idct_mmi(), ff_simple_idct_put(), ff_subblock_synthesis(), ff_vc1_inv_trans_4x4_mmi(), ff_vc1_inv_trans_4x8_dc_mmi(), ff_vc1_inv_trans_8x4_dc_mmi(), ff_vc1_inv_trans_8x8_dc_mmi(), ff_vp56_decode_mbs(), ff_wmv2_idct_put_mmi(), ff_xvid_idct_mmi(), filter(), fir_channel(), get(), h263_dct_unquantize_msa(), h263_mv4_search(), hl_decode_mb(), hl_decode_mb_idct_luma(), hl_decode_mb_predict_luma(), idct_put(), inject_frame(), interlaced_search(), interpolate(), iterative_me(), m101_decode_frame(), mjpeg_decode_scan(), mjpeg_decode_scan_progressive_ac(), mjpeg_idct_scan_progressive_ac(), nelly_decode_block(), optimize_colors(), output_audio_block(), parse_postfilter(), pred4x4_horizontal_add(), pred4x4_vertical_add(), pred8x8l_horizontal_add(), pred8x8l_horizontal_filter_add(), pred8x8l_vertical_add(), pred8x8l_vertical_filter_add(), propagate_block_data(), put_marker(), render_slice(), ripemd128_transform(), ripemd160_transform(), ripemd256_transform(), ripemd320_transform(), scale_coefficients(), search_mv(), seq_decode_op1(), set_blocks(), set_mvs(), sha1_transform(), sha256_transform(), sha512_transform(), snow_horizontal_compose_liftS_lead_out(), vc1_decode_i_blocks_adv(), vc1_inv_trans_4x4_c(), vc1_inv_trans_4x8_c(), vc1_inv_trans_8x4_c(), vc1_inv_trans_8x8_c(), vlc_decode_block(), yao_subblock(), zmbv_decode_xor_16(), zmbv_decode_xor_32(), and zmbv_decode_xor_8().

◆ block1

int16_t block1[64]
static

◆ img_dest

uint8_t img_dest[64]
static

Definition at line 290 of file dct.c.

Referenced by idct248_error().

◆ img_dest1

uint8_t img_dest1[64]
static

Definition at line 291 of file dct.c.

Referenced by idct248_error().