| FFmpeg
    | 
DSP utils. More...
Go to the source code of this file.
| Data Structures | |
| struct | ScanTable | 
| Scantable.  More... | |
| struct | DSPContext | 
| DSPContext.  More... | |
| Macros | |
| #define | H264_IDCT(depth) | 
| #define | MAX_NEG_CROP 1024 | 
| #define | PUTAVG_PIXELS(depth) | 
| #define | ff_put_pixels8x8_c ff_put_pixels8x8_8_c | 
| #define | ff_avg_pixels8x8_c ff_avg_pixels8x8_8_c | 
| #define | ff_put_pixels16x16_c ff_put_pixels16x16_8_c | 
| #define | ff_avg_pixels16x16_c ff_avg_pixels16x16_8_c | 
| #define | DEF_OLD_QPEL(name) | 
| #define | CALL_2X_PIXELS(a, b, n) | 
| #define | EMULATED_EDGE(depth) | 
| #define | FF_NO_IDCT_PERM 1 | 
| #define | FF_LIBMPEG2_IDCT_PERM 2 | 
| #define | FF_SIMPLE_IDCT_PERM 3 | 
| #define | FF_TRANSPOSE_IDCT_PERM 4 | 
| #define | FF_PARTTRANS_IDCT_PERM 5 | 
| #define | FF_SSE2_IDCT_PERM 6 | 
| #define | BASIS_SHIFT 16 | 
| #define | RECON_SHIFT 6 | 
| #define | EDGE_WIDTH 16 | 
| #define | EDGE_TOP 1 | 
| #define | EDGE_BOTTOM 2 | 
| #define | BYTE_VEC32(c) ((c)*0x01010101UL) | 
| #define | BYTE_VEC64(c) ((c)*0x0001000100010001UL) | 
| #define | STRIDE_ALIGN 16 | 
| #define | E(x) x | 
| #define | LOCAL_ALIGNED_A(a, t, v, s, o,...) | 
| #define | LOCAL_ALIGNED_D(a, t, v, s, o,...) | 
| #define | LOCAL_ALIGNED(a, t, v,...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)) | 
| #define | LOCAL_ALIGNED_8(t, v,...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__) | 
| #define | LOCAL_ALIGNED_16(t, v,...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__) | 
| #define | WRAPPER8_16_SQ(name8, name16) | 
| Typedefs | |
| typedef short | DCTELEM | 
| typedef void(* | op_pixels_func )(uint8_t *block, const uint8_t *pixels, int line_size, int h) | 
| typedef void(* | tpel_mc_func )(uint8_t *block, const uint8_t *pixels, int line_size, int w, int h) | 
| typedef void(* | qpel_mc_func )(uint8_t *dst, uint8_t *src, int stride) | 
| typedef void(* | h264_chroma_mc_func )(uint8_t *dst, uint8_t *src, int srcStride, int h, int x, int y) | 
| typedef void(* | op_fill_func )(uint8_t *block, uint8_t value, int line_size, int h) | 
| typedef int(* | me_cmp_func )(void *s, uint8_t *blk1, uint8_t *blk2, int line_size, int h) | 
| Variables | |
| const uint8_t | ff_alternate_horizontal_scan [64] | 
| const uint8_t | ff_alternate_vertical_scan [64] | 
| const uint8_t | ff_zigzag_direct [64] | 
| const uint8_t | ff_zigzag248_direct [64] | 
| uint32_t | ff_squareTbl [512] | 
| uint8_t | ff_cropTbl [256+2 *MAX_NEG_CROP] | 
DSP utils.
note, many functions in here may use MMX which trashes the FPU state, it is absolutely necessary to call emms_c() between dsp & float/double code
Definition in file dsputil.h.
| #define H264_IDCT | ( | depth | ) | 
| #define MAX_NEG_CROP 1024 | 
Definition at line 88 of file dsputil.h.
Referenced by cavs_idct8_add_c(), deinterlace_line_c(), deinterlace_line_inplace_c(), ff_bfin_vp3_idct_put(), ff_dsputil_static_init(), filter_common(), filter_mbedge(), h_block_filter(), idct_add(), idct_put(), intra_pred_plane(), mp_yuv_to_rgb(), parse_palette_segment(), pred16x16_tm_vp8_c(), pred4x4_tm_vp8_c(), pred8x8_tm_vp8_c(), rv30_weak_loop_filter(), rv40_weak_loop_filter(), v_block_filter(), wmv2_mspel8_h_lowpass(), wmv2_mspel8_v_lowpass(), and yuv_a_to_rgba().
| #define PUTAVG_PIXELS | ( | depth | ) | 
| #define ff_put_pixels8x8_c ff_put_pixels8x8_8_c | 
Definition at line 106 of file dsputil.h.
Referenced by ff_dsputil_init().
| #define DEF_OLD_QPEL | ( | name | ) | 
| #define EMULATED_EDGE | ( | depth | ) | 
| #define FF_NO_IDCT_PERM 1 | 
Definition at line 443 of file dsputil.h.
Referenced by dct_quantize_bfin(), decode_init(), ff_cavsdsp_init(), ff_dct_quantize_c(), ff_dsputil_init(), ff_dsputil_init_arm(), ff_dsputil_init_armv5te(), ff_dsputil_init_bfin(), ff_dsputil_init_sh4(), ff_init_scantable_permutation(), ff_proresdsp_init(), ff_vp3dsp_init(), tgq_decode_init(), and tqi_decode_init().
| #define FF_LIBMPEG2_IDCT_PERM 2 | 
Definition at line 444 of file dsputil.h.
Referenced by dct_quantize_TMPL(), ff_dsputil_init(), ff_dsputil_init_arm(), ff_dsputil_init_armv6(), ff_dsputil_init_mmx(), and ff_init_scantable_permutation().
| #define FF_SIMPLE_IDCT_PERM 3 | 
Definition at line 445 of file dsputil.h.
Referenced by dct_quantize_TMPL(), ff_dsputil_init_mmx(), and ff_init_scantable_permutation().
| #define FF_TRANSPOSE_IDCT_PERM 4 | 
Definition at line 446 of file dsputil.h.
Referenced by ff_dsputil_init_ppc(), ff_dsputil_init_vis(), ff_init_scantable_permutation(), ff_proresdsp_x86_init(), ff_vp3dsp_init_arm(), ff_vp3dsp_init_ppc(), and ff_vp3dsp_init_x86().
| #define FF_PARTTRANS_IDCT_PERM 5 | 
Definition at line 447 of file dsputil.h.
Referenced by ff_dsputil_init_neon(), ff_init_scantable_permutation(), and ff_vp3dsp_init_x86().
| #define FF_SSE2_IDCT_PERM 6 | 
Definition at line 448 of file dsputil.h.
Referenced by dsputil_init_sse2(), ff_dsputil_init_mmx(), and ff_init_scantable_permutation().
| #define BASIS_SHIFT 16 | 
Definition at line 452 of file dsputil.h.
Referenced by add_8x8basis_c(), add_8x8basis_TMPL(), build_basis(), try_8x8basis_c(), and try_8x8basis_TMPL().
| #define RECON_SHIFT 6 | 
Definition at line 453 of file dsputil.h.
Referenced by add_8x8basis_c(), add_8x8basis_TMPL(), dct_quantize_refine(), try_8x8basis_c(), and try_8x8basis_TMPL().
| #define EDGE_WIDTH 16 | 
Definition at line 456 of file dsputil.h.
Referenced by avcodec_get_edge_width(), ff_draw_horiz_band(), ff_MPV_frame_end(), ff_snow_frame_start(), ff_snow_release_buffer(), halfpel_interpol(), interpolate_refplane(), mc_subpel(), and video_get_buffer().
| #define EDGE_TOP 1 | 
Definition at line 457 of file dsputil.h.
Referenced by draw_edges(), ff_draw_horiz_band(), ff_MPV_frame_end(), ff_snow_frame_start(), and interpolate_refplane().
| #define EDGE_BOTTOM 2 | 
Definition at line 458 of file dsputil.h.
Referenced by draw_edges(), ff_draw_horiz_band(), ff_MPV_frame_end(), ff_snow_frame_start(), and interpolate_refplane().
Definition at line 533 of file dsputil.h.
Referenced by no_rnd_avg32(), and rnd_avg32().
Definition at line 534 of file dsputil.h.
Referenced by no_rnd_avg64(), and rnd_avg64().
| #define STRIDE_ALIGN 16 | 
Definition at line 592 of file dsputil.h.
Referenced by avcodec_align_dimensions2(), and fill_rectangle().
| #define E | ( | x | ) | x | 
Definition at line 599 of file dsputil.h.
Referenced by config_props(), evolve(), idct(), and init_convert_timestamp().
Definition at line 609 of file dsputil.h.
Referenced by do_hybrid_window().
| #define LOCAL_ALIGNED_8 | ( | t, | |
| v, | |||
| ... | |||
| ) | LOCAL_ALIGNED(8, t, v, __VA_ARGS__) | 
Definition at line 614 of file dsputil.h.
Referenced by dv_encode_video_segment(), h264_filter_mb_fast_internal(), and MPV_motion_internal().
| #define LOCAL_ALIGNED_16 | ( | t, | |
| v, | |||
| ... | |||
| ) | LOCAL_ALIGNED(16, t, v, __VA_ARGS__) | 
Definition at line 620 of file dsputil.h.
Referenced by apply_channel_coupling(), apply_window_mp3(), bink_decode_plane(), binkb_decode_plane(), bit8x8_c(), count_mantissa_bits(), dca_subsubframe(), dct_max8x8_c(), dct_quantize_refine(), dct_quantize_TMPL(), dct_sad8x8_c(), decode_slice_chroma(), decode_slice_luma(), dnxhd_calc_bits_thread(), dv_decode_video_segment(), dv_init_enc_block(), ff_check_alignment(), h263_skip_b_part(), imc_decode_frame(), mpc7_decode_init(), quant_psnr8x8_c(), rd8x8_c(), render_slice(), rv34_decode_inter_macroblock(), rv34_output_i16x16(), sbr_hf_assemble(), and sbr_hf_inverse_filter().
| #define WRAPPER8_16_SQ | ( | name8, | |
| name16 | |||
| ) | 
Definition at line 208 of file jfdctfst.c.
Referenced by dct_quantize_trellis_c(), ff_convert_matrix(), and ff_dsputil_init().
Definition at line 274 of file jfdctfst.c.
Referenced by ff_dsputil_init().
Referenced by ff_convert_matrix(), and ff_dsputil_init().
Referenced by fdct_get(), ff_convert_matrix(), and ff_dsputil_init().
Referenced by ff_dsputil_init().
Referenced by ff_dsputil_init().
Referenced by ff_dsputil_init(), ff_jref_idct_add(), and ff_jref_idct_put().
Referenced by ff_dsputil_init(), ff_jref_idct4_add(), and ff_jref_idct4_put().
Referenced by ff_dsputil_init(), ff_jref_idct2_add(), and ff_jref_idct2_put().
Referenced by ff_dsputil_init().
Definition at line 2707 of file dsputil.c.
Referenced by ff_dsputil_init(), ff_wmv2_idct_add_c(), and ff_wmv2_idct_put_c().
Referenced by hadamard_func().
Referenced by hadamard_func().
Referenced by hadamard_func().
Definition at line 142 of file svq3.c.
Referenced by hl_decode_mb_predict_luma().
Definition at line 177 of file svq3.c.
Referenced by hl_decode_mb(), hl_decode_mb_idct_luma(), and hl_decode_mb_predict_luma().
Referenced by ff_rv40dsp_init().
Referenced by ff_rv40dsp_init().
Referenced by ff_rv40dsp_init().
Referenced by ff_rv40dsp_init().
| void ff_shrink22 | ( | uint8_t * | dst, | 
| int | dst_wrap, | ||
| const uint8_t * | src, | ||
| int | src_wrap, | ||
| int | width, | ||
| int | height | ||
| ) | 
Definition at line 275 of file imgconvert.c.
Referenced by ff_dsputil_init().
| void ff_shrink44 | ( | uint8_t * | dst, | 
| int | dst_wrap, | ||
| const uint8_t * | src, | ||
| int | src_wrap, | ||
| int | width, | ||
| int | height | ||
| ) | 
Definition at line 308 of file imgconvert.c.
Referenced by ff_dsputil_init().
| void ff_shrink88 | ( | uint8_t * | dst, | 
| int | dst_wrap, | ||
| const uint8_t * | src, | ||
| int | src_wrap, | ||
| int | width, | ||
| int | height | ||
| ) | 
Definition at line 339 of file imgconvert.c.
Referenced by ff_dsputil_init().
| void ff_gmc_c | ( | uint8_t * | dst, | 
| uint8_t * | src, | ||
| int | stride, | ||
| int | h, | ||
| int | ox, | ||
| int | oy, | ||
| int | dxx, | ||
| int | dxy, | ||
| int | dyx, | ||
| int | dyy, | ||
| int | shift, | ||
| int | r, | ||
| int | width, | ||
| int | height | ||
| ) | 
Definition at line 554 of file dsputil.c.
Referenced by ff_dsputil_init().
Definition at line 137 of file dsputil.c.
Referenced by decode_frame_header(), decode_init(), decode_vop_header(), dnxhd_init_vlc(), encode_init(), ff_cavs_init(), ff_dct_common_init(), ff_intrax8_common_init(), ff_mjpeg_decode_init(), ff_msmpeg4_common_init(), ff_vp56_init_context(), ff_wmv2_common_init(), mimic_decode_init(), mpeg_decode_picture_coding_extension(), tgq_decode_init(), tqi_decode_init(), and vp3_decode_init().
Definition at line 158 of file dsputil.c.
Referenced by decode_init(), ff_cavs_init(), ff_dsputil_init(), ff_proresdsp_init(), ff_vp56_init_context(), tgq_decode_init(), tqi_decode_init(), and vp3_decode_init().
Definition at line 2772 of file dsputil.c.
Referenced by avcodec_init().
| void ff_dsputil_init | ( | DSPContext * | p, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 2809 of file dsputil.c.
Referenced by aac_decode_init(), ac3_decode_init(), ape_decode_init(), atrac1_decode_init(), cllc_decode_init(), common_init(), cook_decode_init(), decode_init(), decoder_init(), dirac_decode_init(), dnxhd_decode_header(), dsp_init(), dsputil_init(), encode_init(), ff_ac3_encode_init(), ff_asv_common_init(), ff_cavs_init(), ff_dct_common_init(), ff_dvvideo_init(), ff_huffyuv_common_init(), ff_mjpeg_decode_init(), ff_vp56_init_context(), ff_wma_init(), ffv1_common_init(), flac_encode_init(), h264_set_parameter_from_sps(), imc_decode_init(), ipvideo_decode_init(), lag_decode_init(), main(), mca(), mdec_common_init(), mimic_decode_init(), mp_decode_init(), mpc7_decode_init(), mpc8_decode_init(), png_enc_init(), svq1_decode_init(), svq1_encode_init(), tak_decode_init(), tqi_decode_init(), truespeech_decode_init(), twin_decode_init(), utvideo_encode_init(), vble_decode_init(), vorbis_decode_init(), and vp3_decode_init().
| attribute_deprecated void dsputil_init | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 3170 of file dsputil.c.
Referenced by config_input(), config_props(), init(), and vf_open().
| int ff_check_alignment | ( | void | ) | 
Definition at line 2789 of file dsputil.c.
Referenced by encode_thread(), estimate_motion_thread(), ff_dsputil_init(), and mb_var_thread().
| float ff_scalarproduct_float_c | ( | const float * | v1, | 
| const float * | v2, | ||
| int | len | ||
| ) | 
Return the scalar product of two vectors.
| v1 | first input vector | 
| v2 | first input vector | 
| len | number of elements | 
Definition at line 2540 of file dsputil.c.
Referenced by acelp_decode_gain_codef(), apply_gain_ctrl(), calc_input_response(), convolve(), decode(), decode_frame(), ff_adaptive_gain_control(), ff_amr_set_fixed_gain(), ff_dsputil_init(), ff_scale_vector_to_given_sum_of_squares(), kalman_smoothen(), postfilter(), synth_block_fcb_acb(), and tilt_factor().
| void ff_block_permute | ( | DCTELEM * | block, | 
| uint8_t * | permutation, | ||
| const uint8_t * | scantable, | ||
| int | last | ||
| ) | 
permute block according to permuatation.
| last | last non zero element in scantable order | 
permute block according to permuatation.
| block | the block which will be permuted according to the given permutation vector | 
| permutation | the permutation vector | 
| last | the last non zero coefficient in scantable order, used to speed the permutation up | 
| scantable | the used scantable, this is only used to speed the permutation up, the block is not (inverse) permutated to scantable order! | 
Definition at line 1838 of file dsputil.c.
Referenced by dct_quantize_bfin(), and ff_dct_quantize_c().
| void ff_set_cmp | ( | DSPContext * | c, | 
| me_cmp_func * | cmp, | ||
| int | type | ||
| ) | 
Definition at line 1863 of file dsputil.c.
Referenced by encode_init(), ff_dvvideo_init(), ff_init_me(), and ff_MPV_encode_init().
| 
 | inlinestatic | 
| 
 | inlinestatic | 
| 
 | inlinestatic | 
| 
 | inlinestatic | 
| 
 | inlinestatic | 
Definition at line 556 of file dsputil.h.
Referenced by encode_q_branch(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), get_4block_rd(), and get_block_rd().
| void ff_dsputil_init_alpha | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 271 of file dsputil_alpha.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_arm | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 77 of file dsputil_init_arm.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_bfin | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 198 of file dsputil_bfin.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_mmx | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 2682 of file dsputil_mmx.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_ppc | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 140 of file dsputil_ppc.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_sh4 | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 92 of file dsputil_sh4.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_vis | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 3953 of file dsputil_vis.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_mips | ( | DSPContext * | c, | 
| AVCodecContext * | avctx | ||
| ) | 
Definition at line 163 of file dsputil_mips.c.
Referenced by ff_dsputil_init().
| void ff_dsputil_init_dwt | ( | DSPContext * | c | ) | 
Definition at line 848 of file dwt.c.
Referenced by ff_dsputil_init().
| 
 | inlinestatic | 
Definition at line 638 of file dsputil.h.
Referenced by mjpeg_copy_block().
| 
 | inlinestatic | 
Definition at line 649 of file dsputil.h.
Referenced by copy_block(), copy_cell(), decode_0(), mjpeg_copy_block(), and old_codec37().
| 
 | inlinestatic | 
Definition at line 660 of file dsputil.h.
Referenced by copy_block(), mjpeg_copy_block(), and rd8x8_c().
| 
 | inlinestatic | 
Definition at line 683 of file dsputil.h.
Referenced by copy_block().
| const uint8_t ff_alternate_horizontal_scan[64] | 
Definition at line 101 of file dsputil.c.
Referenced by decode_vop_header(), and ff_dct_common_init().
| const uint8_t ff_alternate_vertical_scan[64] | 
Definition at line 112 of file dsputil.c.
Referenced by decode_vop_header(), ff_dct_common_init(), and mpeg_decode_picture_coding_extension().
| const uint8_t ff_zigzag_direct[64] | 
Definition at line 74 of file dsputil.c.
Referenced by decode_dct(), decode_gop_header(), decode_i_block(), decode_init(), decode_scaling_list(), decode_vol_header(), decode_vop_header(), dnxhd_init_qmat(), dnxhd_init_vlc(), dv_init_enc_block(), encode_picture(), ff_cavs_init(), ff_dct_common_init(), ff_dsputil_static_init(), ff_dvvideo_init(), ff_mjpeg_decode_init(), ff_rtjpeg_decode_init(), ff_vp56_init_context(), ff_write_quant_matrix(), fill_quantization_matrices(), fill_scaling_lists(), init_scan_tables(), load_matrix(), mpeg_decode_picture_coding_extension(), mss4_decode_dct(), tgq_decode_init(), tqi_decode_init(), vaapi_mpeg2_start_frame(), vaapi_mpeg4_start_frame(), and vp3_decode_init().
| const uint8_t ff_zigzag248_direct[64] | 
Definition at line 87 of file dsputil.c.
Referenced by dv_init_enc_block(), and ff_dvvideo_init().
| uint32_t ff_squareTbl[512] | 
Definition at line 43 of file dsputil.c.
Referenced by ff_dsputil_static_init(), pix_norm1(), pix_norm1_c(), sse(), sse16_c(), sse4_c(), and sse8_c().
| uint8_t ff_cropTbl[256+2 *MAX_NEG_CROP] | 
 1.8.2
 1.8.2