FreeRDP
|
#include <freerdp/config.h>
#include <winpr/assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <freerdp/types.h>
#include <freerdp/log.h>
#include <freerdp/codec/dsp.h>
#include "dsp.h"
Macros | |
#define | TAG FREERDP_TAG("dsp") |
Functions | |
static INT16 | read_int16 (const BYTE *WINPR_RESTRICT src) |
static BOOL | freerdp_dsp_channel_mix (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE **WINPR_RESTRICT data, size_t *WINPR_RESTRICT length) |
static BOOL | freerdp_dsp_resample (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE **WINPR_RESTRICT data, size_t *WINPR_RESTRICT length) |
static UINT16 | dsp_decode_ima_adpcm_sample (ADPCM *WINPR_RESTRICT adpcm, unsigned int channel, BYTE sample) |
static BOOL | freerdp_dsp_decode_ima_adpcm (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, wStream *WINPR_RESTRICT out) |
static BYTE | dsp_encode_ima_adpcm_sample (ADPCM *WINPR_RESTRICT adpcm, int channel, INT16 sample) |
static BOOL | freerdp_dsp_encode_ima_adpcm (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, wStream *WINPR_RESTRICT out) |
static INLINE INT16 | freerdp_dsp_decode_ms_adpcm_sample (ADPCM *WINPR_RESTRICT adpcm, BYTE sample, int channel) |
static BOOL | freerdp_dsp_decode_ms_adpcm (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, wStream *WINPR_RESTRICT out) |
static BYTE | freerdp_dsp_encode_ms_adpcm_sample (ADPCM *WINPR_RESTRICT adpcm, INT32 sample, int channel) |
static BOOL | freerdp_dsp_encode_ms_adpcm (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT src, size_t size, wStream *WINPR_RESTRICT out) |
FREERDP_DSP_CONTEXT * | freerdp_dsp_context_new (BOOL encoder) |
void | freerdp_dsp_context_free (FREERDP_DSP_CONTEXT *context) |
BOOL | freerdp_dsp_encode (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE *WINPR_RESTRICT pdata, size_t length, wStream *WINPR_RESTRICT out) |
BOOL | freerdp_dsp_decode (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT srcFormat, const BYTE *WINPR_RESTRICT data, size_t length, wStream *WINPR_RESTRICT out) |
BOOL | freerdp_dsp_supports_format (const AUDIO_FORMAT *WINPR_RESTRICT format, BOOL encode) |
BOOL | freerdp_dsp_context_reset (FREERDP_DSP_CONTEXT *WINPR_RESTRICT context, const AUDIO_FORMAT *WINPR_RESTRICT targetFormat, UINT32 FramesPerPacket) |
BOOL | freerdp_dsp_common_context_init (FREERDP_DSP_COMMON_CONTEXT *context, BOOL encode) |
void | freerdp_dsp_common_context_uninit (FREERDP_DSP_COMMON_CONTEXT *context) |
Variables | |
static const INT16 | ima_step_index_table [] |
static const INT16 | ima_step_size_table [] |
struct { | |
BYTE byte_num | |
BYTE byte_shift | |
} | ima_stereo_encode_map [] |
static const INT32 | ms_adpcm_adaptation_table [] |
static const INT32 | ms_adpcm_coeffs1 [7] = { 256, 512, 0, 192, 240, 460, 392 } |
static const INT32 | ms_adpcm_coeffs2 [7] = { 0, -256, 0, 64, 0, -208, -232 } |
#define TAG FREERDP_TAG("dsp") |
FreeRDP: A Remote Desktop Protocol Implementation Digital Sound Processing
Copyright 2010-2011 Vic Lee
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
static |
|
static |
|
static |
BOOL freerdp_dsp_common_context_init | ( | FREERDP_DSP_COMMON_CONTEXT * | context, |
BOOL | encode | ||
) |
void freerdp_dsp_common_context_uninit | ( | FREERDP_DSP_COMMON_CONTEXT * | context | ) |
void freerdp_dsp_context_free | ( | FREERDP_DSP_CONTEXT * | context | ) |
FREERDP_DSP_CONTEXT* freerdp_dsp_context_new | ( | BOOL | encoder | ) |
BOOL freerdp_dsp_context_reset | ( | FREERDP_DSP_CONTEXT *WINPR_RESTRICT | context, |
const AUDIO_FORMAT *WINPR_RESTRICT | targetFormat, | ||
UINT32 | FramesPerPacket | ||
) |
BOOL freerdp_dsp_decode | ( | FREERDP_DSP_CONTEXT *WINPR_RESTRICT | context, |
const AUDIO_FORMAT *WINPR_RESTRICT | srcFormat, | ||
const BYTE *WINPR_RESTRICT | data, | ||
size_t | length, | ||
wStream *WINPR_RESTRICT | out | ||
) |
|
static |
|
static |
|
static |
BOOL freerdp_dsp_encode | ( | FREERDP_DSP_CONTEXT *WINPR_RESTRICT | context, |
const AUDIO_FORMAT *WINPR_RESTRICT | srcFormat, | ||
const BYTE *WINPR_RESTRICT | pdata, | ||
size_t | length, | ||
wStream *WINPR_RESTRICT | out | ||
) |
|
static |
|
static |
|
static |
|
static |
Microsoft Multimedia Standards Update http://download.microsoft.com/download/9/8/6/9863C72A-A3AA-4DDB-B1BA-CA8D17EFD2D4/RIFFNEW.pdf
BOOL freerdp_dsp_supports_format | ( | const AUDIO_FORMAT *WINPR_RESTRICT | format, |
BOOL | encode | ||
) |
|
static |
BYTE byte_num |
BYTE byte_shift |
|
static |
Microsoft IMA ADPCM specification:
http://wiki.multimedia.cx/index.php?title=Microsoft_IMA_ADPCM http://wiki.multimedia.cx/index.php?title=IMA_ADPCM
|
static |
const { ... } ima_stereo_encode_map[] |
0 1 2 3 2 0 6 4 10 8 14 12 <left>
4 5 6 7 3 1 7 5 11 9 15 13 <right>
|
static |
Microsoft ADPCM Specification:
|
static |
|
static |