1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
/*****************************************************************
* gavl - a general purpose audio/video processing library
*
* Copyright (c) 2001 - 2012 Members of the Gmerlin project
* gmerlin-general@lists.sourceforge.net
* http://gmerlin.sourceforge.net
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* *****************************************************************/
typedef struct
{
gavl_audio_func_t swap_sign_8;
gavl_audio_func_t swap_sign_16;
/* 8 -> 16 bits */
gavl_audio_func_t s_8_to_s_16;
gavl_audio_func_t u_8_to_s_16;
gavl_audio_func_t s_8_to_u_16;
gavl_audio_func_t u_8_to_u_16;
/* 8 -> 32 bits */
gavl_audio_func_t s_8_to_s_32;
gavl_audio_func_t u_8_to_s_32;
/* 16 -> 8 bits */
gavl_audio_func_t convert_16_to_8_swap;
gavl_audio_func_t convert_16_to_8;
/* 16 -> 32 bits */
gavl_audio_func_t s_16_to_s_32;
gavl_audio_func_t u_16_to_s_32;
/* 32 -> 8 bits */
gavl_audio_func_t convert_32_to_8_swap;
gavl_audio_func_t convert_32_to_8;
/* 32 -> 16 bits */
gavl_audio_func_t convert_32_to_16_swap;
gavl_audio_func_t convert_32_to_16;
/* Int to Float */
gavl_audio_func_t convert_s8_to_float;
gavl_audio_func_t convert_u8_to_float;
gavl_audio_func_t convert_s16_to_float;
gavl_audio_func_t convert_u16_to_float;
gavl_audio_func_t convert_s32_to_float;
/* Float to int */
gavl_audio_func_t convert_float_to_s8;
gavl_audio_func_t convert_float_to_u8;
gavl_audio_func_t convert_float_to_s16;
gavl_audio_func_t convert_float_to_u16;
gavl_audio_func_t convert_float_to_s32;
/* Int to Double */
gavl_audio_func_t convert_s8_to_double;
gavl_audio_func_t convert_u8_to_double;
gavl_audio_func_t convert_s16_to_double;
gavl_audio_func_t convert_u16_to_double;
gavl_audio_func_t convert_s32_to_double;
/* Double to int */
gavl_audio_func_t convert_double_to_s8;
gavl_audio_func_t convert_double_to_u8;
gavl_audio_func_t convert_double_to_s16;
gavl_audio_func_t convert_double_to_u16;
gavl_audio_func_t convert_double_to_s32;
gavl_audio_func_t convert_double_to_float;
gavl_audio_func_t convert_float_to_double;
} gavl_sampleformat_table_t;
gavl_sampleformat_table_t *
gavl_create_sampleformat_table(gavl_audio_options_t * opt,
gavl_interleave_mode_t interleave_mode);
void gavl_init_sampleformat_funcs_c(gavl_sampleformat_table_t * t, gavl_interleave_mode_t interleave_mode);
gavl_audio_func_t
gavl_find_sampleformat_converter(gavl_sampleformat_table_t * t,
gavl_audio_format_t * in,
gavl_audio_format_t * out);
void gavl_destroy_sampleformat_table(gavl_sampleformat_table_t * t);
|