Lines Matching refs:encoder
318 SBC_ENC_PARAMS encoder; member
1847 btif_media_cb.encoder.s16ChannelMode = pInitAudio->ChannelMode; in btif_media_task_enc_init()
1848 btif_media_cb.encoder.s16NumOfSubBands = pInitAudio->NumOfSubBands; in btif_media_task_enc_init()
1849 btif_media_cb.encoder.s16NumOfBlocks = pInitAudio->NumOfBlocks; in btif_media_task_enc_init()
1850 btif_media_cb.encoder.s16AllocationMethod = pInitAudio->AllocationMethod; in btif_media_task_enc_init()
1851 btif_media_cb.encoder.s16SamplingFreq = pInitAudio->SamplingFreq; in btif_media_task_enc_init()
1853 btif_media_cb.encoder.u16BitRate = btif_media_task_get_sbc_rate(); in btif_media_task_enc_init()
1864 btif_media_cb.encoder.s16ChannelMode, btif_media_cb.encoder.s16NumOfSubBands, in btif_media_task_enc_init()
1865 btif_media_cb.encoder.s16NumOfBlocks, in btif_media_task_enc_init()
1866 btif_media_cb.encoder.s16AllocationMethod, btif_media_cb.encoder.u16BitRate, in btif_media_task_enc_init()
1867 btif_media_cb.encoder.s16SamplingFreq); in btif_media_task_enc_init()
1870 SBC_Encoder_Init(&(btif_media_cb.encoder)); in btif_media_task_enc_init()
1874 APPL_TRACE_DEBUG("%s bit pool %d", __func__, btif_media_cb.encoder.s16BitPool); in btif_media_task_enc_init()
1890 SBC_ENC_PARAMS *pstrEncParams = &btif_media_cb.encoder; in btif_media_task_enc_update()
2002 btif_media_cb.encoder.u16BitRate -= BTIF_MEDIA_BITRATE_STEP; in btif_media_task_enc_update()
2010 UINT16 previous_u16BitRate = btif_media_cb.encoder.u16BitRate; in btif_media_task_enc_update()
2011 btif_media_cb.encoder.u16BitRate += BTIF_MEDIA_BITRATE_STEP; in btif_media_task_enc_update()
2015 if (btif_media_cb.encoder.u16BitRate < previous_u16BitRate) in btif_media_task_enc_update()
2031 btif_media_cb.encoder.u16BitRate, in btif_media_task_enc_update()
2032 btif_media_cb.encoder.s16BitPool); in btif_media_task_enc_update()
2035 SBC_Encoder_Init(&(btif_media_cb.encoder)); in btif_media_task_enc_update()
2068 if (btif_media_cb.encoder.s16SamplingFreq != SBC_sf48000) in btif_media_task_pcm2sbc_init()
2072 btif_media_cb.encoder.s16SamplingFreq = SBC_sf48000; in btif_media_task_pcm2sbc_init()
2081 if (btif_media_cb.encoder.s16SamplingFreq != SBC_sf44100) in btif_media_task_pcm2sbc_init()
2085 btif_media_cb.encoder.s16SamplingFreq = SBC_sf44100; in btif_media_task_pcm2sbc_init()
2095 if (btif_media_cb.encoder.s16ChannelMode == SBC_MONO) in btif_media_task_pcm2sbc_init()
2098 btif_media_cb.encoder.s16ChannelMode = SBC_JOINT_STEREO; in btif_media_task_pcm2sbc_init()
2106 btif_media_cb.encoder.s16ChannelMode, in btif_media_task_pcm2sbc_init()
2107 btif_media_cb.encoder.s16NumOfSubBands, btif_media_cb.encoder.s16NumOfBlocks, in btif_media_task_pcm2sbc_init()
2108 btif_media_cb.encoder.s16AllocationMethod, btif_media_cb.encoder.u16BitRate, in btif_media_task_pcm2sbc_init()
2109 btif_media_cb.encoder.s16SamplingFreq); in btif_media_task_pcm2sbc_init()
2111 SBC_Encoder_Init(&(btif_media_cb.encoder)); in btif_media_task_pcm2sbc_init()
2516 btif_media_cb.encoder.s16ChannelMode, in get_frame_length()
2517 btif_media_cb.encoder.s16NumOfSubBands, in get_frame_length()
2518 btif_media_cb.encoder.s16NumOfBlocks, in get_frame_length()
2519 btif_media_cb.encoder.s16BitPool, in get_frame_length()
2520 btif_media_cb.encoder.s16SamplingFreq, in get_frame_length()
2521 btif_media_cb.encoder.s16NumOfChannels); in get_frame_length()
2523 switch (btif_media_cb.encoder.s16ChannelMode) { in get_frame_length()
2528 ((UINT32)(SBC_SCALE_FACTOR_BITS * btif_media_cb.encoder.s16NumOfSubBands * in get_frame_length()
2529 btif_media_cb.encoder.s16NumOfChannels) / CHAR_BIT) + in get_frame_length()
2530 ((UINT32)(btif_media_cb.encoder.s16NumOfBlocks * in get_frame_length()
2531 btif_media_cb.encoder.s16NumOfChannels * in get_frame_length()
2532 btif_media_cb.encoder.s16BitPool) / CHAR_BIT); in get_frame_length()
2536 ((UINT32)(SBC_SCALE_FACTOR_BITS * btif_media_cb.encoder.s16NumOfSubBands * in get_frame_length()
2537 btif_media_cb.encoder.s16NumOfChannels) / CHAR_BIT) + in get_frame_length()
2538 ((UINT32)(btif_media_cb.encoder.s16NumOfBlocks * in get_frame_length()
2539 btif_media_cb.encoder.s16BitPool) / CHAR_BIT); in get_frame_length()
2543 ((UINT32)(SBC_SCALE_FACTOR_BITS * btif_media_cb.encoder.s16NumOfSubBands * in get_frame_length()
2544 btif_media_cb.encoder.s16NumOfChannels) / CHAR_BIT) + in get_frame_length()
2545 ((UINT32)(btif_media_cb.encoder.s16NumOfSubBands + in get_frame_length()
2546 (btif_media_cb.encoder.s16NumOfBlocks * in get_frame_length()
2547 btif_media_cb.encoder.s16BitPool)) / CHAR_BIT); in get_frame_length()
2551 __func__, btif_media_cb.encoder.s16ChannelMode); in get_frame_length()
2579 if (!btif_media_cb.encoder.s16NumOfSubBands) { in calculate_max_frames_per_packet()
2582 btif_media_cb.encoder.s16NumOfSubBands = SBC_MAX_NUM_OF_SUBBANDS; in calculate_max_frames_per_packet()
2584 if (!btif_media_cb.encoder.s16NumOfBlocks) { in calculate_max_frames_per_packet()
2587 btif_media_cb.encoder.s16NumOfBlocks = SBC_MAX_NUM_OF_BLOCKS; in calculate_max_frames_per_packet()
2589 if (!btif_media_cb.encoder.s16NumOfChannels) { in calculate_max_frames_per_packet()
2592 btif_media_cb.encoder.s16NumOfChannels = SBC_MAX_NUM_OF_CHANNELS; in calculate_max_frames_per_packet()
2600 switch (btif_media_cb.encoder.s16SamplingFreq) { in calculate_max_frames_per_packet()
2650 UINT32 pcm_bytes_per_frame = btif_media_cb.encoder.s16NumOfSubBands * in btif_get_num_aa_frame_iteration()
2651 btif_media_cb.encoder.s16NumOfBlocks * in btif_get_num_aa_frame_iteration()
2828 UINT16 blocm_x_subband = btif_media_cb.encoder.s16NumOfSubBands * \ in btif_media_aa_read_feeding()
2829 btif_media_cb.encoder.s16NumOfBlocks; in btif_media_aa_read_feeding()
2833 UINT16 bytes_needed = blocm_x_subband * btif_media_cb.encoder.s16NumOfChannels * \ in btif_media_aa_read_feeding()
2847 switch (btif_media_cb.encoder.s16SamplingFreq) in btif_media_aa_read_feeding()
2866 ((UINT8 *)btif_media_cb.encoder.as16PcmBuffer) + in btif_media_aa_read_feeding()
2972 memcpy((UINT8 *)btif_media_cb.encoder.as16PcmBuffer, in btif_media_aa_read_feeding()
3003 UINT16 blocm_x_subband = btif_media_cb.encoder.s16NumOfSubBands * in btif_media_aa_prep_sbc_2_send()
3004 btif_media_cb.encoder.s16NumOfBlocks; in btif_media_aa_prep_sbc_2_send()
3017 btif_media_cb.encoder.pu8Packet = (UINT8 *) (p_buf + 1) + p_buf->offset + p_buf->len; in btif_media_aa_prep_sbc_2_send()
3019 memset(btif_media_cb.encoder.as16PcmBuffer, 0, blocm_x_subband in btif_media_aa_prep_sbc_2_send()
3020 * btif_media_cb.encoder.s16NumOfChannels); in btif_media_aa_prep_sbc_2_send()
3025 SBC_Encoder(&(btif_media_cb.encoder)); in btif_media_aa_prep_sbc_2_send()
3028 p_buf->len += btif_media_cb.encoder.u16PacketLength; in btif_media_aa_prep_sbc_2_send()
3037 btif_media_cb.encoder.s16NumOfSubBands * in btif_media_aa_prep_sbc_2_send()
3038 btif_media_cb.encoder.s16NumOfBlocks * in btif_media_aa_prep_sbc_2_send()
3052 } while (((p_buf->len + btif_media_cb.encoder.u16PacketLength) < btif_media_cb.TxAaMtuSize) in btif_media_aa_prep_sbc_2_send()