FFmpeg
Macros | Functions | Variables
audioconvert.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/avassert.h"
#include "libavutil/libm.h"
#include "libavutil/samplefmt.h"
#include "audioconvert.h"

Go to the source code of this file.

Macros

#define CONV_FUNC_NAME(dst_fmt, src_fmt)   conv_ ## src_fmt ## _to_ ## dst_fmt
 
#define CONV_FUNC(ofmt, otype, ifmt, expr)
 
#define FMT_PAIR_FUNC(out, in)   [(out) + AV_SAMPLE_FMT_NB*(in)] = CONV_FUNC_NAME(out, in)
 

Functions

 CONV_FUNC (AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80U)<< 8) CONV_FUNC(AV_SAMPLE_FMT_S32
 
 if (off==len)
 

Variables

 int32_t
 
 AV_SAMPLE_FMT_U8
 
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi >>8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1<< 16)) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi >>24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi >>56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(UINT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out->ch+ch,(const uint8_t **) in->ch+ch, off *(out-> planar
 
 else
 
 return
 

Detailed Description

audio conversion

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file audioconvert.c.

Macro Definition Documentation

◆ CONV_FUNC_NAME

#define CONV_FUNC_NAME (   dst_fmt,
  src_fmt 
)    conv_ ## src_fmt ## _to_ ## dst_fmt

Definition at line 35 of file audioconvert.c.

◆ CONV_FUNC

#define CONV_FUNC (   ofmt,
  otype,
  ifmt,
  expr 
)
Value:
static void CONV_FUNC_NAME(ofmt, ifmt)(uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end)\
{\
uint8_t *end2 = end - 3*os;\
while(po < end2){\
*(otype*)po = expr; pi += is; po += os;\
*(otype*)po = expr; pi += is; po += os;\
*(otype*)po = expr; pi += is; po += os;\
*(otype*)po = expr; pi += is; po += os;\
}\
while(po < end){\
*(otype*)po = expr; pi += is; po += os;\
}\
}

Definition at line 38 of file audioconvert.c.

◆ FMT_PAIR_FUNC

#define FMT_PAIR_FUNC (   out,
  in 
)    [(out) + AV_SAMPLE_FMT_NB*(in)] = CONV_FUNC_NAME(out, in)

Function Documentation

◆ CONV_FUNC()

CONV_FUNC ( AV_SAMPLE_FMT_S16  ,
int16_t  ,
AV_SAMPLE_FMT_U8  ,
(*(const uint8_t *) pi - 0x80U)<<  8 
)

◆ if()

if ( off  = len)

Definition at line 236 of file audioconvert.c.

Variable Documentation

◆ int32_t

int32_t

Definition at line 56 of file audioconvert.c.

Referenced by ac3_apply_rematrixing(), ac3_decode_transform_coeffs_ch(), ac3_fixed_mdct_init(), add_bell(), add_cb(), add_display_matrix(), add_display_matrix_to_stream(), adjust_jnd(), adpcm_analysis(), adpcm_decode_frame(), adpcm_zork_expand_nibble(), alac_entropy_coder(), alac_linear_predictor(), alac_stereo_decorrelation(), alloc_sample_buffer(), alloc_x96_sample_buffer(), allocate_buffers(), amv_init(), ape_decode_frame(), ape_read_header(), ape_unpack_stereo(), apply_channel_coupling(), apply_filter(), aptx_bin_search(), aptx_check_parity(), aptx_decode_channel(), aptx_decode_frame(), aptx_encode_channel(), aptx_encode_frame(), aptx_invert_quantization(), aptx_pack_codeword(), aptx_prediction_filtering(), aptx_process_subband(), aptx_qmf_convolution(), aptx_qmf_polyphase_analysis(), aptx_qmf_polyphase_synthesis(), aptx_qmf_tree_analysis(), aptx_qmf_tree_synthesis(), aptx_quantize_difference(), aptx_quantized_parity(), aptx_reconstructed_differences_update(), aptx_update_codeword_history(), aptxhd_pack_codeword(), asf_read_simple_index(), asf_write_markers(), audio_frame(), av1_frame_ref(), av_clipl_int32_c(), av_clipl_int32_rvi(), av_crc_init(), av_display_rotation_set(), av_div_sf_ieee754(), av_mul_sf(), av_mul_sf_ieee754(), av_normalize1_sf(), av_sincos_sf(), avc_h_loop_filter_chroma422_mbaff_msa(), avc_h_loop_filter_chroma422_msa(), avc_idct8_dc_addblk_msa(), avg_width16_lsx(), avg_width16_msa(), avg_width32_lsx(), avg_width32_msa(), avg_width4_msa(), avg_width64_lsx(), avg_width64_msa(), avg_width8_lsx(), avg_width8_msa(), bayer_to_yv12_wrapper(), bgr24ToUV_c(), bgr24ToUV_half_c(), bink_decode_plane(), binkb_decode_plane(), build_filter(), calc_masking(), calc_one_scale(), calc_power(), calc_prediction_gain(), calc_predictor_params(), calculate_sign_huff(), cbs_read_se_golomb(), cbs_vp8_bool_decoder_read_signed(), cbs_vp8_read_unsigned_le(), cbs_vp9_read_s(), channel_decorrelation(), check_append_extra_bits(), check_deblock_chroma(), check_deblock_luma(), check_decorrelate(), check_decorrelate_stereo(), check_float_to_fixed24(), check_hscale(), check_input_planar_rgb_to_a(), check_input_planar_rgb_to_uv(), check_input_planar_rgb_to_y(), check_lpc(), check_output_yuv2gbrp(), check_rct_int(), check_scalarproduct_and_madd_int16(), check_scalarproduct_and_madd_int32(), check_vector_fmul_window(), check_vector_fmul_window_scaled(), checkasm_check_audiodsp(), checkasm_check_fixed_dsp(), checkasm_check_fmtconvert(), chrRangeFromJpeg16_c(), chrRangeToJpeg16_c(), chs_alloc_lsb_band_data(), chs_alloc_msb_band_data(), chs_assemble_freq_bands(), chs_assemble_msbs_lsbs(), chs_clear_band_data(), chs_filter_band_data(), chs_parse_band_data(), code_filter_coeffs(), code_matrix_coeffs(), codeblock(), codebook_bits_offset(), combine_residual_frame(), common_hv_8ht_8vt_16w_lsx(), common_hv_8ht_8vt_16w_msa(), common_hv_8ht_8vt_32w_lsx(), common_hv_8ht_8vt_32w_msa(), common_hv_8ht_8vt_4w_lsx(), common_hv_8ht_8vt_64w_lsx(), common_hv_8ht_8vt_64w_msa(), common_hv_8ht_8vt_8w_lsx(), common_hv_8ht_8vt_and_aver_dst_16w_lsx(), common_hv_8ht_8vt_and_aver_dst_16w_msa(), common_hv_8ht_8vt_and_aver_dst_32w_lsx(), common_hv_8ht_8vt_and_aver_dst_32w_msa(), common_hv_8ht_8vt_and_aver_dst_4w_lsx(), common_hv_8ht_8vt_and_aver_dst_64w_lsx(), common_hv_8ht_8vt_and_aver_dst_64w_msa(), common_hv_8ht_8vt_and_aver_dst_8w_lsx(), common_hv_bil_16w_lasx(), common_hv_bil_8w_lasx(), common_hv_bil_no_rnd_16x16_lasx(), common_hv_bil_no_rnd_4x8_lasx(), common_hv_bil_no_rnd_8x16_lasx(), common_hv_bil_no_rnd_8x8_lasx(), common_hz_8t_16w_lsx(), common_hz_8t_4x8_lsx(), common_hz_8t_64w_lsx(), common_hz_8t_64w_msa(), common_hz_8t_8x8mult_lsx(), common_hz_8t_and_aver_dst_16w_lsx(), common_hz_8t_and_aver_dst_16w_msa(), common_hz_8t_and_aver_dst_64w_lsx(), common_hz_8t_and_aver_dst_8w_lsx(), common_hz_8t_and_aver_dst_8w_msa(), common_hz_bil_no_rnd_16x16_lasx(), common_hz_bil_no_rnd_4x8_lasx(), common_hz_bil_no_rnd_8x16_lasx(), common_hz_bil_no_rnd_8x8_lasx(), common_vt_4t_24w_lsx(), common_vt_4t_32w_lsx(), common_vt_8t_16w_lsx(), common_vt_8t_16w_mult_lsx(), common_vt_8t_4w_lsx(), common_vt_8t_8w_lsx(), common_vt_8t_and_aver_dst_16w_mult_lsx(), common_vt_8t_and_aver_dst_4w_lsx(), common_vt_8t_and_aver_dst_8w_lsx(), common_vt_bil_no_rnd_16x16_lasx(), common_vt_bil_no_rnd_4x8_lasx(), common_vt_bil_no_rnd_8x16_lasx(), common_vt_bil_no_rnd_8x8_lasx(), compute_imdct(), config_output(), configure_input_video_filter(), configure_video_filters(), convertmantissa(), copy_16multx8mult_msa(), copy_8bit_to_16bit_width8_msa(), copy_8bit_value_width16_msa(), copy_8bit_value_width8_msa(), copy_8x8_msa(), copy_tag(), copy_width16_lsx(), copy_width16_msa(), copy_width24_msa(), copy_width32_lsx(), copy_width32_msa(), copy_width48_msa(), copy_width64_lsx(), copy_width64_msa(), copy_width8_lsx(), copy_width8_msa(), create_chrominance_lut(), create_map(), cri_decode_frame(), dct4x4_impl(), dct8x8(), dctcoef_get(), dctcoef_set(), deblocking_filter_CTB(), decode_cabac_residual_internal(), decode_channel(), decode_const_block_data(), decode_delta_d(), decode_delta_j(), decode_element(), decode_frame(), decode_header(), decode_hf_c(), decode_joint_c(), decode_lt_rps(), decode_plane(), decode_residual(), decode_signed_subexp_with_ref(), decode_subband(), decode_subframe(), decode_var_block_data(), decorr_mono(), decorr_stereo(), decorr_stereo_pass2(), decorr_stereo_pass_id2(), decorr_stereo_quick(), decorrelate(), decorrelate_sf(), decorrelate_sm(), deinterlace_plane_slice(), dequantization_int(), dequantization_int_97(), determine_bits(), determine_output_shift(), determine_quant_step_size(), dmix_sub_xch_c(), do_decode(), do_plc(), dss_sp_sf_synthesis(), dump_sidedata(), dvdvideo_play_open(), dwt_decode53(), dwt_decode97_int(), dxa_read_header(), enc_open(), encode_frame(), encode_init(), encode_residual_ch(), entropy_decode_mono_3860(), entropy_decode_mono_3900(), entropy_decode_mono_3990(), entropy_decode_stereo_3860(), entropy_decode_stereo_3900(), entropy_decode_stereo_3930(), entropy_decode_stereo_3990(), estimate_coeff(), estimate_sid_gain(), estimate_stereo_mode(), ff_aptx_generate_dither(), ff_avg_bilin_32hv_msa(), ff_avg_bilin_64hv_msa(), ff_avg_h264_chroma_mc2_msa(), ff_avg_h264_qpel16_mc01_msa(), ff_avg_h264_qpel16_mc02_msa(), ff_avg_h264_qpel16_mc03_msa(), ff_avg_h264_qpel16_mc21_msa(), ff_avg_h264_qpel16_mc22_msa(), ff_avg_h264_qpel16_mc23_msa(), ff_avg_h264_qpel4_mc21_msa(), ff_avg_h264_qpel4_mc22_msa(), ff_avg_h264_qpel4_mc23_msa(), ff_avg_h264_qpel8_mc21_msa(), ff_avg_h264_qpel8_mc22_msa(), ff_avg_h264_qpel8_mc23_msa(), ff_cbs_read_signed(), ff_dca_core_filter_fixed(), ff_dca_core_flush(), ff_dca_xll_filter_frame(), ff_dcaadpcm_do_real(), ff_dcaadpcm_subband_analysis(), ff_dct_unquantize_h263_inter_msa(), ff_dct_unquantize_h263_intra_msa(), ff_dct_unquantize_mpeg2_inter_msa(), ff_dirac_golomb_read_32bit(), ff_eac3_apply_spectral_extension(), ff_generate_wave_table(), ff_get_bmp_header(), ff_h2645_sei_to_frame(), ff_h264_idct8_add4_8_lsx(), ff_h264_idct8_add4_msa(), ff_h264_idct_add16_8_lsx(), ff_h264_idct_add16_intra_8_lsx(), ff_h264_idct_add16_intra_msa(), ff_h264_idct_add16_msa(), ff_h264_idct_add8_422_8_lsx(), ff_h264_idct_add8_422_msa(), ff_h264_idct_add8_8_lsx(), ff_h264_idct_add8_msa(), ff_hevc_idct_32x32_lsx(), ff_hevc_loop_filter_luma_h_8_lsx(), ff_hevc_loop_filter_luma_v_8_lsx(), ff_hscale_16_to_19_lasx(), ff_hscale_8_to_19_lasx(), ff_ivi_inverse_haar_4x4(), ff_ivi_inverse_haar_8x8(), ff_ivi_inverse_slant_4x4(), ff_ivi_inverse_slant_8x8(), ff_ivi_recompose53(), ff_j_rev_dct(), ff_j_rev_dct4(), ff_jpeg2000_decode_htj2k(), ff_jpeg2000_tag_tree_init(), ff_linear_int_to_srgb_u8(), ff_mjpeg_decode_frame_from_buf(), ff_mlp_pack_output(), ff_mpeg1_decode_block_intra(), ff_oklab_int_to_srgb_u8(), ff_put_bilin_32hv_msa(), ff_put_bilin_64hv_msa(), ff_put_h264_chroma_mc2_msa(), ff_put_h264_qpel16_mc01_msa(), ff_put_h264_qpel16_mc02_msa(), ff_put_h264_qpel16_mc03_msa(), ff_put_h264_qpel16_mc21_msa(), ff_put_h264_qpel16_mc22_msa(), ff_put_h264_qpel16_mc23_msa(), ff_put_h264_qpel4_mc21_msa(), ff_put_h264_qpel4_mc22_msa(), ff_put_h264_qpel4_mc23_msa(), ff_put_h264_qpel8_mc21_msa(), ff_put_h264_qpel8_mc22_msa(), ff_put_h264_qpel8_mc23_msa(), ff_put_no_rnd_pixels_l2_msa(), ff_put_vp8_epel16_h4v4_msa(), ff_put_vp8_epel16_h4v6_lsx(), ff_put_vp8_epel16_h4v6_msa(), ff_put_vp8_epel16_h6v4_lsx(), ff_put_vp8_epel16_h6v4_msa(), ff_put_vp8_epel16_h6v6_lsx(), ff_put_vp8_epel16_h6v6_msa(), ff_put_vp8_pixels16_lsx(), ff_put_vp8_pixels16_msa(), ff_put_vp8_pixels8_lsx(), ff_put_vp8_pixels8_msa(), ff_rgb24toyv12_c(), ff_rtp_check_and_send_back_rr(), ff_simple_idct_add_lasx(), ff_simple_idct_lasx(), ff_simple_idct_put_lasx(), ff_srgb_u8_to_linear_int(), ff_srgb_u8_to_oklab_int(), ff_tadd_long_metadata(), ff_tadd_rational_metadata(), ff_vc1_inv_trans_8x8_lasx(), ff_vk_exec_get_query(), ff_vvc_deblock_horizontal(), ff_vvc_deblock_vertical(), ffat_copy_samples(), fft7(), fft9(), fill_buffer(), fill_data_min_max(), fill_in_adpcm_bufer(), fill_ones(), filter(), filter_3800(), filter_channel(), filter_fast_3320(), filter_frame(), filter_frame_fixed(), filter_slice(), finalize_packet(), find_peak(), find_sidx(), fits_decode_frame(), flv_read_packet(), ftx(), gbr24pToUV_half_c(), generate_2_noise_channels(), get(), get_image_format(), get_lsp_poly(), get_sample(), get_send_time(), get_shear_params_valid(), get_srice(), get_step_size(), get_xbits(), get_xbits_le(), h263_dct_unquantize_msa(), h263_h_loop_filter_msa(), h263_v_loop_filter_msa(), h264_metadata_handle_display_orientation(), hadamard_intra_8x8_msa(), hdcd_analyze(), hdcd_analyze_gen(), hdcd_analyze_prepare(), hdcd_envelope(), hdcd_process(), hdcd_process_stereo(), hevc_bi_copy_12w_lsx(), hevc_bi_copy_16w_lsx(), hevc_bi_copy_4w_lsx(), hevc_bi_copy_6w_lsx(), hevc_bi_copy_6w_msa(), hevc_bi_copy_8w_lsx(), 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_16w_lsx(), hevc_copy_24w_lsx(), hevc_copy_32w_lsx(), hevc_copy_4w_lsx(), hevc_copy_6w_lsx(), hevc_copy_8w_lsx(), hevc_hv_4t_12w_lsx(), hevc_hv_4t_6w_lsx(), hevc_hv_4t_8multx4_lsx(), hevc_hv_4t_8multx4_msa(), hevc_hv_4t_8multx4mult_lsx(), hevc_hv_4t_8x2_lsx(), hevc_hv_4t_8x6_lsx(), hevc_hv_8t_12w_lsx(), hevc_hv_8t_4w_lsx(), hevc_hv_8t_8multx1mult_lsx(), hevc_hv_8t_8x2_lsx(), hevc_hv_biwgt_4t_12w_msa(), hevc_hv_biwgt_4t_4multx8mult_msa(), hevc_hv_biwgt_4t_4x2_msa(), hevc_hv_biwgt_4t_4x4_msa(), hevc_hv_biwgt_4t_6w_msa(), hevc_hv_biwgt_4t_8multx4_msa(), hevc_hv_biwgt_4t_8multx4mult_msa(), hevc_hv_biwgt_4t_8x2_msa(), hevc_hv_biwgt_8t_12w_msa(), hevc_hv_biwgt_8t_4w_msa(), hevc_hv_biwgt_8t_8multx2mult_msa(), hevc_hz_4t_24w_lsx(), hevc_hz_8t_12w_lsx(), hevc_hz_8t_16w_lsx(), hevc_hz_8t_4w_lsx(), hevc_hz_8t_8w_lsx(), hevc_hz_bi_4t_6w_msa(), hevc_hz_bi_8t_12w_msa(), hevc_hz_bi_8t_4w_msa(), hevc_hz_biwgt_4t_12w_msa(), hevc_hz_biwgt_4t_16w_msa(), hevc_hz_biwgt_4t_24w_msa(), hevc_hz_biwgt_4t_32w_msa(), hevc_hz_biwgt_4t_4x2_msa(), hevc_hz_biwgt_4t_4x4_msa(), hevc_hz_biwgt_4t_4x8multiple_msa(), hevc_hz_biwgt_4t_6w_msa(), hevc_hz_biwgt_4t_8x2_msa(), hevc_hz_biwgt_4t_8x4multiple_msa(), hevc_hz_biwgt_4t_8x6_msa(), hevc_hz_biwgt_8t_12w_msa(), hevc_hz_biwgt_8t_16w_msa(), hevc_hz_biwgt_8t_24w_msa(), hevc_hz_biwgt_8t_32w_msa(), hevc_hz_biwgt_8t_48w_msa(), hevc_hz_biwgt_8t_4w_msa(), hevc_hz_biwgt_8t_64w_msa(), hevc_hz_biwgt_8t_8w_msa(), hevc_idct_8x32_column_lsx(), hevc_idct_8x32_column_msa(), hevc_idct_dc_16x16_msa(), hevc_idct_dc_32x32_msa(), hevc_idct_dc_4x4_msa(), hevc_idct_dc_8x8_msa(), hevc_intra_pred_angular_lower_16width_msa(), hevc_intra_pred_angular_lower_32width_msa(), hevc_intra_pred_angular_lower_4width_msa(), hevc_intra_pred_angular_lower_8width_msa(), hevc_intra_pred_angular_upper_16width_msa(), hevc_intra_pred_angular_upper_32width_msa(), hevc_intra_pred_angular_upper_4width_msa(), hevc_intra_pred_angular_upper_8width_msa(), hevc_intra_pred_vert_16x16_msa(), hevc_loopfilter_luma_hor_msa(), hevc_loopfilter_luma_ver_msa(), hevc_sao_band_filter_16multiple_msa(), hevc_sao_edge_filter_0degree_16multiple_lsx(), hevc_sao_edge_filter_0degree_16multiple_msa(), hevc_sao_edge_filter_0degree_4width_lsx(), hevc_sao_edge_filter_0degree_8width_lsx(), hevc_sao_edge_filter_135degree_16multiple_lsx(), hevc_sao_edge_filter_135degree_16multiple_msa(), hevc_sao_edge_filter_135degree_4width_lsx(), hevc_sao_edge_filter_135degree_8width_lsx(), hevc_sao_edge_filter_45degree_16multiple_lsx(), hevc_sao_edge_filter_45degree_16multiple_msa(), hevc_sao_edge_filter_45degree_4width_lsx(), hevc_sao_edge_filter_45degree_8width_lsx(), hevc_sao_edge_filter_90degree_16multiple_lsx(), hevc_sao_edge_filter_90degree_16multiple_msa(), hevc_sao_edge_filter_90degree_4width_lsx(), hevc_sao_edge_filter_90degree_8width_lsx(), hevc_uniwgt_copy_6w_msa(), hevc_vt_4t_12w_lsx(), hevc_vt_4t_12w_msa(), hevc_vt_4t_16w_lsx(), hevc_vt_4t_16w_msa(), hevc_vt_4t_24w_lsx(), hevc_vt_4t_24w_msa(), hevc_vt_4t_32w_lsx(), hevc_vt_4t_32w_msa(), hevc_vt_4t_6w_msa(), hevc_vt_4t_8x4multiple_msa(), hevc_vt_8t_12w_lsx(), hevc_vt_8t_12w_msa(), hevc_vt_8t_16multx2mult_lsx(), hevc_vt_8t_16multx4mult_lsx(), hevc_vt_8t_16multx4mult_msa(), hevc_vt_8t_4w_lsx(), hevc_vt_8t_4w_msa(), hevc_vt_8t_8w_lsx(), hevc_vt_8t_8w_msa(), hevc_vt_bi_4t_12w_msa(), hevc_vt_bi_4t_16w_msa(), hevc_vt_bi_4t_4x8multiple_msa(), hevc_vt_bi_4t_8x4multiple_msa(), hevc_vt_bi_8t_12w_msa(), hevc_vt_bi_8t_4w_msa(), hevc_vt_bi_8t_8w_msa(), hevc_vt_biwgt_4t_12w_msa(), hevc_vt_biwgt_4t_16w_msa(), hevc_vt_biwgt_4t_24w_msa(), hevc_vt_biwgt_4t_32w_msa(), hevc_vt_biwgt_4t_4x2_msa(), hevc_vt_biwgt_4t_4x4_msa(), hevc_vt_biwgt_4t_4x8multiple_msa(), hevc_vt_biwgt_4t_6w_msa(), hevc_vt_biwgt_4t_8x2_msa(), hevc_vt_biwgt_4t_8x4multiple_msa(), hevc_vt_biwgt_4t_8x6_msa(), hevc_vt_biwgt_8t_12w_msa(), hevc_vt_biwgt_8t_16multx2mult_msa(), hevc_vt_biwgt_8t_4w_msa(), hevc_vt_biwgt_8t_8w_msa(), hevc_vt_uniwgt_4t_12w_msa(), hevc_vt_uniwgt_4t_16w_msa(), hevc_vt_uniwgt_4t_4x8multiple_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(), hflip_b24_c(), hp_output(), hq_decode_block(), hScale16To19_c(), hScale8To19_c(), huf_uncompress(), ict_int(), image_available(), init_offset(), init_sample_buffers(), init_slice_c(), input_data_internal(), input_to_sample_buffer(), inter_predict_dc(), intra_predict_plane_16x16_msa(), intra_predict_plane_8x8_msa(), inverse_adpcm(), ivi_decode_blocks(), ivi_decode_coded_blocks(), jpeg2000_bitbuf_refill_backwards(), jpeg2000_decode_ht_cleanup_segment(), jpeg2000_decode_mag_sgn(), jpeg2000_decode_magref_segment(), jpeg2000_process_stripes_block(), lfe_downsample(), lfe_x96_fixed_c(), long_filter_ehigh_3830(), long_filter_high_3800(), lpc_analyze_remodulate(), lsf2lsp(), lsf2poly(), lumRangeFromJpeg16_c(), lumRangeToJpeg16_c(), main(), make_block_map(), make_horizontal_map(), make_vertical_map(), makelayer(), makelayers(), match_framerate(), match_video_size(), mclms_update(), mkv_handle_rotation(), mlp_filter_channel(), mov_metadata_loci(), mov_read_elst(), mov_read_header(), mov_read_stts(), mov_read_sv3d(), mov_read_tkhd(), mov_read_udta_string(), mov_write_loci_tag(), mov_write_tapt_tag(), mp3_parse_info_tag(), mp3_write_xing(), mp3lame_encode_frame(), mpeg1_decode_block_inter(), mpeg2_dct_unquantize_inter_msa(), mpeg2_decode_block_non_intra(), mpeg4_decode_studio_block(), msmpeg4_decode_dc(), multiply(), nist_read_header(), no_codebook_bits(), no_codebook_bits_offset(), norm__(), open_cpl_tracks(), osq_decode_block(), p01x_wrapper(), pack_float_sample(), parse_frame_data(), parse_frame_header(), parse_manifest_representation(), parse_subframe_audio(), parse_value(), parse_x96_frame_data(), parse_x96_subframe_audio(), parse_xbr_subframe(), pcm_bluray_decode_frame(), pcm_bluray_encode_frame(), pcm_decode_frame(), pcm_dvd_decode_samples(), pcm_dvd_encode_frame(), pcm_encode_frame(), pdv_read_header(), pdv_read_packet(), pink_fill(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_uv(), planar_rgb_to_uv_lasx(), planar_rgb_to_y(), planar_rgb_to_y_lasx(), planar_rgbf32_to_uv(), planar_rgbf32_to_y(), precalc(), prediction(), predictor_decode_mono_3800(), predictor_decode_mono_3930(), predictor_decode_mono_3950(), predictor_decode_stereo_3800(), predictor_decode_stereo_3930(), predictor_decode_stereo_3950(), predictor_update_3930(), predictor_update_filter(), print_frame_side_data(), print_pkt_side_data(), process_float(), ps_tableinit(), quant_band_template(), quantize_adpcm_subband(), quantize_lpc_coefs(), quantize_pcm(), quantize_value(), ra144_encode_frame(), rct_int(), rd_frame(), read_filter_params(), read_global_param(), read_highpass(), read_mfra(), read_moof_duration(), read_var_block_data(), read_xbits(), recover_mag_sgn(), recurse_mono(), recurse_stereo(), rematrix_channels(), remove_wasted_bits(), resolve_divisor(), reverse_decorr(), reverse_mono_decorr(), reverse_samples(), revert_channel_correlation(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb48ToY_c_template(), rgb64ToUV_c_template(), rgb64ToUV_half_c_template(), rgb64ToY_c_template(), rgb9plus_planar_funcs(), rgbaf16ToUV_endian(), rgbaf16ToY_endian(), rnd_table_init(), rpl_read_header(), rtcp_parse_packet(), rtcp_update_jitter(), sad_16width_msa(), sad_8width_msa(), sad_horiz_bilinear_filter_16width_msa(), sad_horiz_bilinear_filter_8width_msa(), sad_hv_bilinear_filter_16width_msa(), sad_hv_bilinear_filter_8width_msa(), sad_vert_bilinear_filter_16width_msa(), sad_vert_bilinear_filter_8width_msa(), sbc_analyze_simd(), sbc_calc_scalefactors(), sbc_calc_scalefactors_j(), sbc_synthesize_eight(), sbc_synthesize_four(), sbc_unpack_frame(), scalarproduct(), scale_samples_s32(), scaling_list_data(), scan_float(), scan_int23(), scan_int32(), set(), set_best_abits_code(), set_best_code(), set_filter(), shorten_decode_frame(), silk_decode_excitation(), silk_is_lpc_stable(), silk_lsf2lpc(), simple_idct_add_msa(), simple_idct_msa(), simple_idct_put_msa(), sin32(), skip_tag(), spectral_to_sample(), sse_16width_msa(), sse_4width_msa(), sse_8width_msa(), sub_qmf32_fixed_c(), sub_qmf64_fixed_c(), subband_bufer_alloc(), subband_bufer_free(), subband_transform(), svq1_encode_init(), svq3_decode_block(), svq3_mc_dir(), swri_get_dither(), swscale(), synth_filter_fixed(), synth_filter_fixed_64(), tag_tree_size(), tak_decode_frame(), test_decorrelate_ls(), test_decorrelate_sf(), test_decorrelate_sm(), test_decorrelate_sr(), test_window(), transpose_block_24_c(), tta_decode_frame(), tta_decode_init(), tta_encode_frame(), unpack_intraframe(), update_band_masking(), update_md5_sum(), vector_fmul_window_c(), vector_fmul_window_scaled_c(), vp9_iadst16x16_colcol_addblk_msa(), vp9_iadst_idct_16x16_add_msa(), vp9_idct16_1d_columns_addblk_lsx(), vp9_idct16x16_10_colcol_addblk_lsx(), vp9_idct16x16_10_colcol_addblk_msa(), vp9_idct16x16_1_add_lsx(), vp9_idct16x16_colcol_addblk_lsx(), vp9_idct16x16_colcol_addblk_msa(), vp9_idct32x32_1_add_lsx(), vp9_idct32x32_1_add_msa(), vp9_idct32x32_34_colcol_addblk_lsx(), vp9_idct32x32_34_colcol_addblk_msa(), vp9_idct32x32_colcol_addblk_lsx(), vp9_idct32x32_colcol_addblk_msa(), vp9_idct8x8_1_add_lsx(), vp9_idct8x8_1_add_msa(), vp9_idct_iadst_16x16_add_msa(), vp9_transpose_16x16(), wavesynth_decode(), wavesynth_parse_extradata(), wavesynth_synth_sample(), wavpack_encode_block(), wavpack_encode_frame(), wavpack_encode_sample(), write_block_data(), write_element(), write_filter_params(), write_hint_packets(), write_matrix_params(), write_subframes(), write_substr(), writer_open(), wv_mono(), wv_stereo(), wv_unpack_dsd_fast(), wv_unpack_dsd_high(), wv_unpack_mono(), wv_unpack_stereo(), x8_decode_intra_mb(), x8_loop_filter(), xcorr_coeff(), yuv2ayuv64le_X_c(), yuv2gbrp16_full_X_c(), yuv2gbrpf32_full_X_c(), yuv2nv12cX_16_c_template(), yuv2rgba64_1_c_template(), yuv2rgba64_2_c_template(), yuv2rgba64_full_1_c_template(), yuv2rgba64_full_2_c_template(), yuv2ya16_2_c_template(), yuvPlanartouyvy_c(), and yuvPlanartoyuy2_c().

◆ AV_SAMPLE_FMT_U8

AV_SAMPLE_FMT_U8

Definition at line 56 of file audioconvert.c.

◆ planar

uint8_t pi<<24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8 , (uint64_t)((*(const uint8_t*)pi - 0x80U))<<56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_U8 , (*(const uint8_t*)pi - 0x80)*(1.0f/ (1<<7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_U8 , (*(const uint8_t*)pi - 0x80)*(1.0 / (1<<7))) CONV_FUNC(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_S16, (*(const int16_t*)pi>>8) + 0x80) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, *(const int16_t*)pi * (1 << 16)) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16, (uint64_t)(*(const int16_t*)pi)<<48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_S16, *(const int16_t*)pi*(1.0f/ (1<<15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_S16, *(const int16_t*)pi*(1.0 / (1<<15))) CONV_FUNC(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_S32, (*(const int32_t*)pi>>24) + 0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32, (uint64_t)(*(const int32_t*)pi)<<32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0f/ (1U<<31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0 / (1U<<31))) CONV_FUNC(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_S64, (*(const int64_t*)pi>>56) + 0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_S64, *(const int64_t*)pi*(1.0f/ (UINT64_C(1)<<63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_S64, *(const int64_t*)pi*(1.0 / (UINT64_C(1)<<63))) CONV_FUNC(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8( lrintf(*(const float*)pi * (1<<7)) + 0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16( lrintf(*(const float*)pi * (1<<15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float*)pi * (1U<<31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float*)pi * (UINT64_C(1)<<63))) CONV_FUNC(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8( lrint(*(const double*)pi * (1<<7)) + 0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16( lrint(*(const double*)pi * (1<<15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double*)pi * (1U<<31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double*)pi * (UINT64_C(1)<<63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type * const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB*AV_SAMPLE_FMT_NB] = { FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8 ), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8 , AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), }; static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len); } static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2*len); } static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4*len); } static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8*len); } AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx; conv_func_type *f = fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt) + AV_SAMPLE_FMT_NB*av_get_packed_sample_fmt(in_fmt)]; if (!f) return NULL; ctx = av_mallocz(sizeof(*ctx)); if (!ctx) return NULL; if(channels == 1){ in_fmt = av_get_planar_sample_fmt( in_fmt); out_fmt = av_get_planar_sample_fmt(out_fmt); } ctx->channels = channels; ctx->conv_f = f; ctx->ch_map = ch_map; if (in_fmt == AV_SAMPLE_FMT_U8 || in_fmt == AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence)); if(out_fmt == in_fmt && !ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f = cpy1; break; case 2:ctx->simd_f = cpy2; break; case 4:ctx->simd_f = cpy4; break; case 8:ctx->simd_f = cpy8; break; } } return ctx; } void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx); } int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch; int off=0; const int os= (out->planar ? 1 :out->ch_count) *out->bps; unsigned misaligned = 0; av_assert0(ctx->channels == out->ch_count); if (ctx->in_simd_align_mask) { int planes = in->planar ? in->ch_count : 1; unsigned m = 0; for (ch = 0; ch < planes; ch++) m |= (intptr_t)in->ch[ch]; misaligned |= m & ctx->in_simd_align_mask; } if (ctx->out_simd_align_mask) { int planes = out->planar ? out->ch_count : 1; unsigned m = 0; for (ch = 0; ch < planes; ch++) m |= (intptr_t)out->ch[ch]; misaligned |= m & ctx->out_simd_align_mask; } if(ctx->simd_f && !ctx->ch_map && !misaligned){ off = len&~15; av_assert1(off>=0); av_assert1(off<=len); av_assert2(ctx->channels == SWR_CH_MAX || !in->ch[ctx->channels]); if(off>0){ if(out->planar == in->planar){ int planes = out->planar ? out->ch_count : 1; for(ch=0; ch<planes; ch++){ ctx->simd_f(out->ch+ch, (const uint8_t **)in->ch+ch, off * (out-> planar

◆ else

else
Initial value:
{
ctx->simd_f(out->ch, (const uint8_t **)in->ch, off)

Definition at line 232 of file audioconvert.c.

◆ return

return

Definition at line 250 of file audioconvert.c.

out
FILE * out
Definition: movenc.c:54
is
The official guide to swscale for confused that is
Definition: swscale.txt:28
CONV_FUNC_NAME
#define CONV_FUNC_NAME(dst_fmt, src_fmt)
Definition: audioconvert.c:35
ctx
AVFormatContext * ctx
Definition: movenc.c:48