New features:

-- Support for runtime cpu detection
-- Stand alone compile of libaf
-- Unlimited number of channels (compiletime switch)
-- Sample format defined by bit-fields
-- New formats: float, A-Law and mu-law
-- Format conversion set in human readable format
   i.e. format=4:us_be to set 32 bit unsigned big endian output
-- Format reporting in human readable format
-- Volume control has only one parameter for setting the volume
   i.e. volume=-10.0:1:0:1 to set atenuation = -10dB


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8168 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
anders 2002-11-12 12:33:56 +00:00
parent 54a8a603fb
commit 66f4e56389
17 changed files with 1800 additions and 353 deletions

View File

@ -2,7 +2,7 @@ include ../config.mak
LIBNAME = libaf.a
SRCS=af.c af_dummy.c af_delay.c af_channels.c af_format.c af_resample.c window.c filter.c af_volume.c af_equalizer.c
SRCS=af.c af_mp.c af_dummy.c af_delay.c af_channels.c af_format.c af_resample.c window.c filter.c af_volume.c af_equalizer.c
OBJS=$(SRCS:.c=.o)
@ -15,7 +15,7 @@ CFLAGS = $(OPTFLAGS) -I. -Wall
$(LIBNAME): $(OBJS) Makefile
$(AR) r $(LIBNAME) $(OBJS)
$(OBJS):af.h control.h dsp.h filter.h window.h
$(OBJS):af.h control.h dsp.h filter.h window.h af_mp.h
all: $(LIBNAME)

View File

@ -6,9 +6,6 @@
#include <malloc.h>
#endif
#include "../config.h"
#include "../mp_msg.h"
#include "af.h"
// Static list of filters
@ -31,6 +28,12 @@ static af_info_t* filter_list[]={ \
NULL \
};
// Message printing
af_msg_cfg_t af_msg_cfg={0,NULL,NULL};
// CPU speed
int* af_cpu_speed = NULL;
/* Find a filter in the static list of filters using it's name. This
function is used internally */
af_info_t* af_find(char*name)
@ -41,7 +44,7 @@ af_info_t* af_find(char*name)
return filter_list[i];
i++;
}
mp_msg(MSGT_AFILTER,MSGL_ERR,"Couldn't find audio filter '%s'\n",name);
af_msg(AF_MSG_ERROR,"Couldn't find audio filter '%s'\n",name);
return NULL;
}
@ -69,7 +72,7 @@ af_instance_t* af_create(af_stream_t* s, char* name)
// Allocate space for the new filter and reset all pointers
af_instance_t* new=malloc(sizeof(af_instance_t));
if(!new){
mp_msg(MSGT_AFILTER,MSGL_ERR,"Could not allocate memory\n");
af_msg(AF_MSG_ERROR,"Could not allocate memory\n");
return NULL;
}
memset(new,0,sizeof(af_instance_t));
@ -85,13 +88,13 @@ af_instance_t* af_create(af_stream_t* s, char* name)
non-reentrant */
if(new->info->flags & AF_FLAGS_NOT_REENTRANT){
if(af_get(s,name)){
mp_msg(MSGT_AFILTER,MSGL_ERR,"There can only be one instance of the filter '%s' in each stream\n",name);
af_msg(AF_MSG_ERROR,"There can only be one instance of the filter '%s' in each stream\n",name);
free(new);
return NULL;
}
}
mp_msg(MSGT_AFILTER,MSGL_V,"Adding filter %s \n",name);
af_msg(AF_MSG_VERBOSE,"Adding filter %s \n",name);
// Initialize the new filter
if(AF_OK == new->info->open(new) &&
@ -105,7 +108,7 @@ af_instance_t* af_create(af_stream_t* s, char* name)
}
free(new);
mp_msg(MSGT_AFILTER,MSGL_ERR,"Couldn't create or open audio filter '%s'\n",name);
af_msg(AF_MSG_ERROR,"Couldn't create or open audio filter '%s'\n",name);
return NULL;
}
@ -206,56 +209,62 @@ int af_reinit(af_stream_t* s, af_instance_t* af)
case AF_OK:
break;
case AF_FALSE:{ // Configuration filter is needed
af_instance_t* new = NULL;
// Insert channels filter
if((af->prev?af->prev->data->nch:s->input.nch) != in.nch){
// Create channels filter
if(NULL == (new = af_prepend(s,af,"channels")))
// Do auto insertion only if force is not specified
if((AF_INIT_TYPE_MASK & s->cfg.force) != AF_INIT_FORCE){
af_instance_t* new = NULL;
// Insert channels filter
if((af->prev?af->prev->data->nch:s->input.nch) != in.nch){
// Create channels filter
if(NULL == (new = af_prepend(s,af,"channels")))
return AF_ERROR;
// Set number of output channels
if(AF_OK != (rv = new->control(new,AF_CONTROL_CHANNELS,&in.nch)))
return rv;
// Initialize channels filter
if(!new->prev)
memcpy(&in,&(s->input),sizeof(af_data_t));
else
memcpy(&in,new->prev->data,sizeof(af_data_t));
if(AF_OK != (rv = new->control(new,AF_CONTROL_REINIT,&in)))
return rv;
}
// Insert format filter
if(((af->prev?af->prev->data->format:s->input.format) != in.format) ||
((af->prev?af->prev->data->bps:s->input.bps) != in.bps)){
// Create format filter
if(NULL == (new = af_prepend(s,af,"format")))
return AF_ERROR;
// Set output format
if(AF_OK != (rv = new->control(new,AF_CONTROL_FORMAT,&in)))
return rv;
// Initialize format filter
if(!new->prev)
memcpy(&in,&(s->input),sizeof(af_data_t));
else
memcpy(&in,new->prev->data,sizeof(af_data_t));
if(AF_OK != (rv = new->control(new,AF_CONTROL_REINIT,&in)))
return rv;
}
if(!new) // Should _never_ happen
return AF_ERROR;
// Set number of output channels
if(AF_OK != (rv = new->control(new,AF_CONTROL_CHANNELS,&in.nch)))
return rv;
// Initialize channels filter
if(!new->prev)
memcpy(&in,&(s->input),sizeof(af_data_t));
else
memcpy(&in,new->prev->data,sizeof(af_data_t));
if(AF_OK != (rv = new->control(new,AF_CONTROL_REINIT,&in)))
return rv;
af=new;
}
// Insert format filter
if(((af->prev?af->prev->data->format:s->input.format) != in.format) ||
((af->prev?af->prev->data->bps:s->input.bps) != in.bps)){
// Create format filter
if(NULL == (new = af_prepend(s,af,"format")))
return AF_ERROR;
// Set output format
if(AF_OK != (rv = new->control(new,AF_CONTROL_FORMAT,&in)))
return rv;
// Initialize format filter
if(!new->prev)
memcpy(&in,&(s->input),sizeof(af_data_t));
else
memcpy(&in,new->prev->data,sizeof(af_data_t));
if(AF_OK != (rv = new->control(new,AF_CONTROL_REINIT,&in)))
return rv;
}
if(!new) // Should _never_ happen
return AF_ERROR;
af=new;
break;
}
case AF_DETACH:{ // Filter is redundant and wants to be unloaded
af_instance_t* aft=af->prev;
af_remove(s,af);
if(aft)
af=aft;
else
af=s->first; // Restart configuration
// Do auto remove only if force is not specified
if((AF_INIT_TYPE_MASK & s->cfg.force) != AF_INIT_FORCE){
af_instance_t* aft=af->prev;
af_remove(s,af);
if(aft)
af=aft;
else
af=s->first; // Restart configuration
}
break;
}
default:
mp_msg(MSGT_AFILTER,MSGL_ERR,"Reinitialization did not work, audio filter '%s' returned error code %i\n",af->info->name,rv);
af_msg(AF_MSG_ERROR,"Reinitialization did not work, audio filter '%s' returned error code %i\n",af->info->name,rv);
return AF_ERROR;
}
af=af->next;
@ -289,13 +298,8 @@ int af_init(af_stream_t* s)
s->input.len = s->output.len = 0;
// Figure out how fast the machine is
if(AF_INIT_AUTO == (AF_INIT_TYPE_MASK & s->cfg.force)){
# if defined(HAVE_SSE) || defined(HAVE_3DNOWEX)
s->cfg.force = (s->cfg.force & ~AF_INIT_TYPE_MASK) | AF_INIT_FAST;
# else
s->cfg.force = (s->cfg.force & ~AF_INIT_TYPE_MASK) | AF_INIT_SLOW;
# endif
}
if(AF_INIT_AUTO == (AF_INIT_TYPE_MASK & s->cfg.force))
s->cfg.force = (s->cfg.force & ~AF_INIT_TYPE_MASK) | AF_INIT_TYPE;
// Check if this is the first call
if(!s->first){
@ -379,7 +383,7 @@ int af_init(af_stream_t* s)
(s->last->data->nch != s->output.nch) ||
(s->last->data->rate != s->output.rate)) {
// Something is stuffed audio out will not work
mp_msg(MSGT_AFILTER,MSGL_ERR,"Unable to setup filter system can not meet sound-card demands, please report this error on MPlayer development mailing list. \n");
af_msg(AF_MSG_ERROR,"Unable to setup filter system can not meet sound-card demands, please report this error on MPlayer development mailing list. \n");
af_uninit(s);
return -1;
}
@ -527,14 +531,14 @@ inline int af_resize_local_buffer(af_instance_t* af, af_data_t* data)
{
// Calculate new length
register int len = af_lencalc(af->mul,data);
mp_msg(MSGT_AFILTER,MSGL_V,"Reallocating memory in module %s, old len = %i, new len = %i\n",af->info->name,af->data->len,len);
af_msg(AF_MSG_VERBOSE,"Reallocating memory in module %s, old len = %i, new len = %i\n",af->info->name,af->data->len,len);
// If there is a buffer free it
if(af->data->audio)
free(af->data->audio);
// Create new buffer and check that it is OK
af->data->audio = malloc(len);
if(!af->data->audio){
mp_msg(MSGT_AFILTER,MSGL_ERR,"Could not allocate memory \n");
af_msg(AF_MSG_FATAL,"Could not allocate memory \n");
return AF_ERROR;
}
af->data->len=len;

View File

@ -1,4 +1,9 @@
#include <stdio.h>
#include "config.h"
#include "control.h"
#include "af_format.h"
#include "af_mp.h"
#ifndef __aop_h__
#define __aop_h__
@ -23,7 +28,7 @@ typedef struct frac_s
int d; // Denominator
} frac_t;
// Flags used for defining the behavour of an audio filter
// Flags used for defining the behavior of an audio filter
#define AF_FLAGS_REENTRANT 0x00000000
#define AF_FLAGS_NOT_REENTRANT 0x00000001
@ -56,16 +61,27 @@ typedef struct af_instance_s
}af_instance_t;
// Initialization flags
extern int* af_cpu_speed;
#define AF_INIT_AUTO 0x00000000
#define AF_INIT_SLOW 0x00000001
#define AF_INIT_FAST 0x00000002
#define AF_INIT_FORCE 0x00000003
#define AF_INIT_TYPE_MASK 0x00000003
// Default init type
#ifndef AF_INIT_TYPE
#if defined(HAVE_SSE) || defined(HAVE_3DNOW)
#define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_FAST)
#else
#define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_SLOW)
#endif
#endif
// Configuration switches
typedef struct af_cfg_s{
int force; // Initialization type
char** list; /* list of names of plugins that are added to filter
char** list; /* list of names of filters that are added to filter
list during first initialization of stream */
}af_cfg_t;
@ -78,7 +94,7 @@ typedef struct af_stream_s
// Storage for input and output data formats
af_data_t input;
af_data_t output;
// Cofiguration for this stream
// Configuration for this stream
af_cfg_t cfg;
}af_stream_t;
@ -92,7 +108,7 @@ typedef struct af_stream_s
#define AF_FALSE 0
#define AF_UNKNOWN -1
#define AF_ERROR -2
#define AF_NA -3
#define AF_FATAL -3
@ -100,12 +116,12 @@ typedef struct af_stream_s
// Export functions
*/
/* Initialize the stream "s". This function creates a new fileterlist
if nessesary according to the values set in input and output. Input
/* Initialize the stream "s". This function creates a new filter list
if necessary according to the values set in input and output. Input
and output should contain the format of the current movie and the
formate of the preferred output respectively. The function is
reentreant i.e. if called wit an already initialized stream the
stream will be reinitialized. The return value is 0 if sucess and
reentrant i.e. if called wit an already initialized stream the
stream will be reinitialized. The return value is 0 if success and
-1 if failure */
int af_init(af_stream_t* s);
@ -187,8 +203,37 @@ int af_lencalc(frac_t mul, af_data_t* data);
#define sign(a) (((a)>0)?(1):(-1))
#endif
#ifndef lround
#define lround(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5))
#ifndef lrnd
#define lrnd(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5))
#endif
/* Error messages */
typedef struct af_msg_cfg_s
{
int level; /* Message level for debug and error messages max = 2
min = -2 default = 0 */
FILE* err; // Stream to print error messages to
FILE* msg; // Stream to print information messages to
}af_msg_cfg_t;
extern af_msg_cfg_t af_msg_cfg; // Message
#define AF_MSG_FATAL -3 // Fatal error exit immediately
#define AF_MSG_ERROR -2 // Error return gracefully
#define AF_MSG_WARN -1 // Print warning but do not exit (can be suppressed)
#define AF_MSG_INFO 0 // Important information
#define AF_MSG_VERBOSE 1 // Print this if verbose is enabled
#define AF_MSG_DEBUG0 2 // Print if very verbose
#define AF_MSG_DEBUG1 3 // Print if very very verbose
/* Macro for printing error messages */
#ifndef af_msg
#define af_msg(lev, args... ) \
((lev<AF_MSG_WARN)?(fprintf(af_msg_cfg.err?af_msg_cfg.err:stderr, ## args )): \
((lev<=af_msg_cfg.level)?(fprintf(af_msg_cfg.msg?af_msg_cfg.msg:stdout, ## args )):0))
#endif
#endif /* __aop_h__ */

View File

@ -8,9 +8,6 @@
#include <unistd.h>
#include <inttypes.h>
#include "../config.h"
#include "../mp_msg.h"
#include "af.h"
// Local function for copying data
@ -70,7 +67,7 @@ void copy(void* in, void* out, int ins, int inos,int outs, int outos, int len, i
break;
}
default:
mp_msg(MSGT_AFILTER,MSGL_ERR,"[channels] Unsupported number of bytes/sample: %i please report this error on the MPlayer mailing list. \n",bps);
af_msg(AF_MSG_ERROR,"[channels] Unsupported number of bytes/sample: %i please report this error on the MPlayer mailing list. \n",bps);
}
}
@ -99,12 +96,12 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Sanity check
if(((int*)arg)[0] <= 0 || ((int*)arg)[0] > 6){
mp_msg(MSGT_AFILTER,MSGL_ERR,"[channels] The number of output channels must be between 1 and 6. Current value is%i \n",((int*)arg)[0]);
af_msg(AF_MSG_ERROR,"[channels] The number of output channels must be between 1 and 6. Current value is%i \n",((int*)arg)[0]);
return AF_ERROR;
}
af->data->nch=((int*)arg)[0];
mp_msg(MSGT_AFILTER,MSGL_V,"[channels] Changing number of channels to %i\n",af->data->nch);
af_msg(AF_MSG_VERBOSE,"[channels] Changing number of channels to %i\n",af->data->nch);
return AF_OK;
}
return AF_UNKNOWN;

View File

@ -7,9 +7,6 @@
#include <stdlib.h>
#include <string.h>
#include "../config.h"
#include "../mp_msg.h"
#include "af.h"
// Data for specific instances of this filter
@ -43,7 +40,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
int lt = s->len; // Old len
if(*((float*)arg) > 30 || *((float*)arg) < 0){
mp_msg(MSGT_AFILTER,MSGL_ERR,"Error setting delay length in af_delay. Delay must be between 0s and 30s\n");
af_msg(AF_MSG_ERROR,"Error setting delay length in af_delay. Delay must be between 0s and 30s\n");
s->len=0;
s->tlen=0.0;
af->delay=0.0;
@ -55,8 +52,8 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
af->delay = s->tlen * 1000.0;
s->len = af->data->rate*af->data->bps*af->data->nch*(int)s->tlen;
s->buf = malloc(s->len);
mp_msg(MSGT_AFILTER,MSGL_DBG2,"[delay] Delaying audio output by %0.2fs\n",s->tlen);
mp_msg(MSGT_AFILTER,MSGL_DBG3,"[delay] Delaying audio output by %i bytes\n",s->len);
af_msg(AF_MSG_DEBUG0,"[delay] Delaying audio output by %0.2fs\n",s->tlen);
af_msg(AF_MSG_DEBUG1,"[delay] Delaying audio output by %i bytes\n",s->len);
// Out of memory error
if(!s->buf){

View File

@ -4,9 +4,6 @@
#include <stdlib.h>
#include <string.h>
#include "../config.h"
#include "../mp_msg.h"
#include "af.h"
// Initialization and runtime control
@ -15,7 +12,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
switch(cmd){
case AF_CONTROL_REINIT:
memcpy(af->data,(af_data_t*)arg,sizeof(af_data_t));
mp_msg(MSGT_AFILTER,MSGL_V,"[dummy] Was reinitialized, rate=%iHz, nch = %i, format = 0x%08X and bps = %i\n",af->data->rate,af->data->nch,af->data->format,af->data->bps);
af_msg(AF_MSG_VERBOSE,"[dummy] Was reinitialized, rate=%iHz, nch = %i, format = 0x%08X and bps = %i\n",af->data->rate,af->data->nch,af->data->format,af->data->bps);
return AF_OK;
}
return AF_UNKNOWN;
@ -33,7 +30,7 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
{
// Do something necessary to get rid of annoying warning during compile
if(!af)
printf("EEEK: Argument af == NULL in af_dummy.c play().");
af_msg(AF_MSG_ERROR,"EEEK: Argument af == NULL in af_dummy.c play().");
return data;
}

View File

@ -21,16 +21,12 @@
#include <inttypes.h>
#include <math.h>
#include "../config.h"
#include "../mp_msg.h"
#include "../libao2/afmt.h"
#include "af.h"
#include "equalizer.h"
#define NCH 6 // Max number of channels
#define L 2 // Storage for filter taps
#define KM 10 // Max number of bands
#define NCH AF_NCH // Number of channels
#define L 2 // Storage for filter taps
#define KM 10 // Max number of bands
#define Q 1.2247449 /* Q value for band-pass filters 1.2247=(3/2)^(1/2)
gives 4dB suppression @ Fc*2 and Fc/2 */
@ -80,13 +76,16 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
af->data->rate = ((af_data_t*)arg)->rate;
af->data->nch = ((af_data_t*)arg)->nch;
af->data->format = AFMT_S16_LE;
af->data->format = AF_FORMAT_NE | AF_FORMAT_SI;
af->data->bps = 2;
// Calculate number of active filters
s->K=KM;
while(F[s->K-1] > (float)af->data->rate/2.0)
while(F[s->K-1] > (float)af->data->rate/2.2)
s->K--;
if(s->K != KM)
af_msg(AF_MSG_INFO,"Limiting the number of filters to %i due to low sample rate.\n",s->K);
// Generate filter taps
for(k=0;k<s->K;k++)
@ -95,7 +94,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Calculate how much this plugin adds to the overall time delay
af->delay += 2000.0/((float)af->data->rate);
// Only AFMT_S16_LE is supported
// Only signed 16 bit little endian is supported
if(af->data->format != ((af_data_t*)arg)->format ||
af->data->bps != ((af_data_t*)arg)->bps)
return AF_FALSE;

View File

@ -10,105 +10,184 @@
#include <inttypes.h>
#include <limits.h>
#include "../config.h"
#include "../mp_msg.h"
#include "../libao2/afmt.h"
#include "af.h"
// Number of bits
#define B08 (0<<0)
#define B16 (1<<0)
#define B32 (2<<0)
#define NBITS_MASK (3<<0)
// Endianess
#define BE (0<<2) // Big Endian
#define LE (1<<2) // Little Endian
#define END_MASK (1<<2)
/* Functions used by play to convert the input audio to the correct
format */
#if WORDS_BIGENDIAN // native endian of cpu
#define NE BE
#else
#define NE LE
#endif
/* The below includes retrives functions for converting to and from
ulaw and alaw */
#include "af_format_ulaw.c"
#include "af_format_alaw.c"
// Signed
#define US (0<<3) // Un Signed
#define SI (1<<3) // SIgned
#define SIGN_MASK (1<<3)
// Switch endianess
static void endian(void* in, void* out, int len, int bps);
// From singed to unsigned
static void si2us(void* in, void* out, int len, int bps);
// From unsinged to signed
static void us2si(void* in, void* out, int len, int bps);
// Change the number of bits per sample
static void change_bps(void* in, void* out, int len, int inbps, int outbps);
// From float to int signed
static void float2int(void* in, void* out, int len, int bps);
// From signed int to float
static void int2float(void* in, void* out, int len, int bps);
int decode(int format)
// Convert from string to format
static int str2fmt(char* str)
{
// Check input format
switch(format){
case(AFMT_U8):
return LE|B08|US;
case(AFMT_S8):
return LE|B08|SI; break;
case(AFMT_S16_LE):
return LE|B16|SI; break;
case(AFMT_S16_BE):
return BE|B16|SI; break;
case(AFMT_U16_LE):
return LE|B16|US; break;
case(AFMT_U16_BE):
return BE|B16|US; break;
case(AFMT_S32_LE):
return LE|B32|SI; break;
case(AFMT_S32_BE):
return BE|B32|SI; break;
case(AFMT_IMA_ADPCM):
case(AFMT_MU_LAW):
case(AFMT_A_LAW):
case(AFMT_MPEG):
case(AFMT_AC3):
mp_msg(MSGT_AFILTER,MSGL_ERR,"[af_format] Input audio format not yet supported \n");
return 0;
default:
//This can not happen ....
mp_msg(MSGT_AFILTER,MSGL_ERR,"Unrecognized input audio format\n");
return 0;
}
int format=0;
// Scan for endianess
if(strstr(str,"be") || strstr(str,"BE"))
format |= AF_FORMAT_BE;
else if(strstr(str,"le") || strstr(str,"LE"))
format |= AF_FORMAT_LE;
else
format |= AF_FORMAT_NE;
// Scan for special formats
if(strstr(str,"mulaw") || strstr(str,"MULAW")){
format |= AF_FORMAT_MU_LAW; return format;
}
if(strstr(str,"alaw") || strstr(str,"ALAW")){
format |= AF_FORMAT_A_LAW; return format;
}
if(strstr(str,"ac3") || strstr(str,"AC3")){
format |= AF_FORMAT_AC3; return format;
}
if(strstr(str,"mpeg2") || strstr(str,"MPEG2")){
format |= AF_FORMAT_MPEG2; return format;
}
if(strstr(str,"imaadpcm") || strstr(str,"IMAADPCM")){
format |= AF_FORMAT_IMA_ADPCM; return format;
}
// Scan for int/float
if(strstr(str,"float") || strstr(str,"FLOAT")){
format |= AF_FORMAT_F; return format;
}
else
format |= AF_FORMAT_I;
// Scan for signed/unsigned
if(strstr(str,"unsigned") || strstr(str,"UNSIGNED"))
format |= AF_FORMAT_US;
else
format |= AF_FORMAT_SI;
return format;
}
/* Convert format to str input str is a buffer for the
converted string, size is the size of the buffer */
static char* fmt2str(int format, char* str, size_t size)
{
int i=0;
// Print endinaness
if(AF_FORMAT_LE == (format & AF_FORMAT_END_MASK))
i+=snprintf(str,size,"little endian ");
else
i+=snprintf(str,size,"big endian ");
if(format & AF_FORMAT_SPECIAL_MASK){
switch(format & AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_MU_LAW):
i+=snprintf(&str[i],size-i,"mu law "); break;
case(AF_FORMAT_A_LAW):
i+=snprintf(&str[i],size-i,"A law "); break;
case(AF_FORMAT_MPEG2):
i+=snprintf(&str[i],size-i,"MPEG 2 "); break;
case(AF_FORMAT_AC3):
i+=snprintf(&str[i],size-i,"AC3 "); break;
}
}
else{
// Point
if(AF_FORMAT_F == (format & AF_FORMAT_POINT_MASK))
i+=snprintf(&str[i],size,"float ");
else{
// Sign
if(AF_FORMAT_US == (format & AF_FORMAT_SIGN_MASK))
i+=snprintf(&str[i],size-i,"unsigned ");
else
i+=snprintf(&str[i],size-i,"signed ");
i+=snprintf(&str[i],size,"int ");
}
}
return str;
}
// Initialization and runtime control
static int control(struct af_instance_s* af, int cmd, void* arg)
{
switch(cmd){
case AF_CONTROL_REINIT:
case AF_CONTROL_REINIT:{
char buf1[256];
char buf2[256];
// Make sure this filter isn't redundant
if(af->data->format == ((af_data_t*)arg)->format && af->data->bps == ((af_data_t*)arg)->bps)
if(af->data->format == ((af_data_t*)arg)->format &&
af->data->bps == ((af_data_t*)arg)->bps)
return AF_DETACH;
// Sanity check for bytes per sample
if(((af_data_t*)arg)->bps != 4 && ((af_data_t*)arg)->bps != 2 &&
((af_data_t*)arg)->bps != 1){
af_msg(AF_MSG_ERROR,"[format] The number of output bytes per sample must be 1, 2 or 4. Current value is %i \n",((af_data_t*)arg)->bps);
return AF_ERROR;
}
// Check for unsupported formats
switch(((af_data_t*)arg)->format & AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_MPEG2):
case(AF_FORMAT_AC3):
af_msg(AF_MSG_ERROR,"[format] Sample format not yet supported \n");
return AF_ERROR;
}
af_msg(AF_MSG_VERBOSE,"[format] Changing sample format from %ibit %sto %ibit %s \n",
((af_data_t*)arg)->bps*8,fmt2str(((af_data_t*)arg)->format,buf1,256),
af->data->bps*8,fmt2str(af->data->format,buf2,256));
af->data->rate = ((af_data_t*)arg)->rate;
af->data->nch = ((af_data_t*)arg)->nch;
af->mul.n = af->data->bps;
af->mul.d = ((af_data_t*)arg)->bps;
return AF_OK;
}
case AF_CONTROL_COMMAND_LINE:{
af_data_t d;
sscanf((char*)arg,"%i:%i",&(d.format),&(d.bps));
af_data_t d={NULL,0,0,0,0,2};
char str[256];
sscanf((char*)arg,"%i:%s",&(d.bps),str);
// Convert string to format
d.format = str2fmt(str);
// Automatic correction of errors
switch(d.format & AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_A_LAW):
case(AF_FORMAT_MU_LAW):
d.bps=1; break;
case(AF_FORMAT_AC3):
d.bps=4; break; // I think
}
if(AF_FORMAT_F == (d.format & AF_FORMAT_POINT_MASK))
d.bps=4;
return af->control(af,AF_CONTROL_FORMAT,&d);
}
}
case AF_CONTROL_FORMAT:
// Reinit must be called after this function has been called
// Sanity check for sample format
if(0 == ((int)af->setup=decode(((af_data_t*)arg)->format)))
return AF_ERROR;
af->data->format = ((af_data_t*)arg)->format;
// Sanity check for bytes per sample
if(((af_data_t*)arg)->bps != 4 && ((af_data_t*)arg)->bps != 2 && ((af_data_t*)arg)->bps != 1){
mp_msg(MSGT_AFILTER,MSGL_ERR,"[format] The number of output bytes per sample must be 1, 2 or 4. Current value is%i \n",((af_data_t*)arg)->bps);
// Check for unsupported formats
switch(((af_data_t*)arg)->format & AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_MPEG2):
case(AF_FORMAT_AC3):
af_msg(AF_MSG_ERROR,"[format] Sample format not yet supported \n");
return AF_ERROR;
}
af->data->bps=((af_data_t*)arg)->bps;
mp_msg(MSGT_AFILTER,MSGL_V,"[format] Changing number sample format to 0x%08X and/or bytes per sample to %i \n",af->data->format,af->data->bps);
af->data->format = ((af_data_t*)arg)->format;
af->data->bps=((af_data_t*)arg)->bps;
return AF_OK;
}
return AF_UNKNOWN;
@ -125,156 +204,86 @@ static void uninit(struct af_instance_s* af)
// Filter data through filter
static af_data_t* play(struct af_instance_s* af, af_data_t* data)
{
af_data_t* l = af->data; // Local data
void* la = NULL; // Local audio
int lf = (int)af->setup; // Local format
af_data_t* c = data; // Current working data
void* ca = c->audio; // Current audio
int cf = decode(c->format); // Current format
register int i = 0; // Counter
int len = c->len>>(cf&NBITS_MASK); // Loop end
af_data_t* l = af->data; // Local data
af_data_t* c = data; // Current working data
int len = c->len/c->bps; // Lenght in samples of current audio block
if(AF_OK != RESIZE_LOCAL_BUFFER(af,data))
return NULL;
la = l->audio;
// Change to cpu native endian format
if((c->format&AF_FORMAT_END_MASK)!=AF_FORMAT_NE)
endian(c->audio,c->audio,len,c->bps);
// Change to cpu native endian
if((cf&END_MASK)!=NE){
switch(cf&NBITS_MASK){
case(B16):{
register uint16_t s;
for(i=0;i<len;i++){
s=((uint16_t*)ca)[i];
((uint16_t*)ca)[i]=(uint16_t)(((s&0x00FF)<<8) | (s&0xFF00)>>8);
}
}
// Conversion table
switch(c->format & ~AF_FORMAT_END_MASK){
case(AF_FORMAT_MU_LAW):
from_ulaw(c->audio, l->audio, len, l->bps, l->format&AF_FORMAT_POINT_MASK);
if(AF_FORMAT_A_LAW == (l->format&AF_FORMAT_SPECIAL_MASK))
to_ulaw(l->audio, l->audio, len, 1, AF_FORMAT_SI);
if((l->format&AF_FORMAT_SIGN_MASK) == AF_FORMAT_US)
si2us(l->audio,l->audio,len,l->bps);
break;
case(B32):{
register uint32_t s;
for(i=0;i<len;i++){
s=((uint32_t*)ca)[i];
((uint32_t*)ca)[i]=(uint32_t)(((s&0x000000FF)<<24) | ((s&0x0000FF00)<<8) |
((s&0x00FF0000)>>8) | ((s&0xFF000000)>>24));
}
}
case(AF_FORMAT_A_LAW):
from_alaw(c->audio, l->audio, len, l->bps, l->format&AF_FORMAT_POINT_MASK);
if(AF_FORMAT_A_LAW == (l->format&AF_FORMAT_SPECIAL_MASK))
to_alaw(l->audio, l->audio, len, 1, AF_FORMAT_SI);
if((l->format&AF_FORMAT_SIGN_MASK) == AF_FORMAT_US)
si2us(l->audio,l->audio,len,l->bps);
break;
case(AF_FORMAT_F):
float2int(c->audio, l->audio, len, l->bps);
switch(l->format&AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_MU_LAW):
to_ulaw(c->audio, l->audio, len, c->bps, c->format&AF_FORMAT_POINT_MASK);
break;
case(AF_FORMAT_A_LAW):
to_alaw(c->audio, l->audio, len, c->bps, c->format&AF_FORMAT_POINT_MASK);
break;
}
}
// Change signed/unsigned
if((cf&SIGN_MASK) != (lf&SIGN_MASK)){
switch((cf&NBITS_MASK)){
case(B08):
switch(cf&SIGN_MASK){
case(US):
for(i=0;i<len;i++)
((int8_t*)ca)[i]=(int8_t)(SCHAR_MIN+((int)((uint8_t*)ca)[i]));
break;
case(SI):
for(i=0;i<len;i++)
((uint8_t*)ca)[i]=(uint8_t)(SCHAR_MAX+((int)((int8_t*)ca)[i]));
break;
if((l->format&AF_FORMAT_SIGN_MASK) == AF_FORMAT_US)
si2us(l->audio,l->audio,len,l->bps);
break;
default:
// Input must be int
// Change signed/unsigned
if((c->format&AF_FORMAT_SIGN_MASK) != (l->format&AF_FORMAT_SIGN_MASK)){
if((c->format&AF_FORMAT_SIGN_MASK) == AF_FORMAT_US)
us2si(c->audio,c->audio,len,c->bps);
else
si2us(c->audio,c->audio,len,c->bps);
}
// Convert to special formats
switch(l->format&AF_FORMAT_SPECIAL_MASK){
case(AF_FORMAT_MU_LAW):
to_ulaw(c->audio, l->audio, len, c->bps, c->format&AF_FORMAT_POINT_MASK);
break;
case(AF_FORMAT_A_LAW):
to_alaw(c->audio, l->audio, len, c->bps, c->format&AF_FORMAT_POINT_MASK);
break;
default:
// Change to float
if(AF_FORMAT_F == (l->format&AF_FORMAT_POINT_MASK))
int2float(c->audio, l->audio, len, c->bps);
else{
// Change the number of bits
if(c->bps != l->bps)
change_bps(c->audio,l->audio,len,c->bps,l->bps);
else
c->audio = l->audio;
}
break;
case(B16):
switch(cf&SIGN_MASK){
case(US):
for(i=0;i<len;i++)
((int16_t*)ca)[i]=(int16_t)(SHRT_MIN+((int)((uint16_t*)ca)[i]));
break;
case(SI):
for(i=0;i<len;i++)
((uint16_t*)ca)[i]=(uint16_t)(SHRT_MAX+((int)((int16_t*)ca)[i]));
break;
}
break;
case(B32):
switch(cf&SIGN_MASK){
case(US):
for(i=0;i<len;i++)
((int32_t*)ca)[i]=(int32_t)(INT_MIN+((uint32_t*)ca)[i]);
break;
case(SI):
for(i=0;i<len;i++)
((uint32_t*)ca)[i]=(uint32_t)(INT_MAX+((int32_t*)ca)[i]);
break;
}
break;
}
}
// Change the number of bits
if((cf&NBITS_MASK) == (lf&NBITS_MASK)){
memcpy(la,ca,c->len);
} else {
switch(cf&NBITS_MASK){
case(B08):
switch(lf&NBITS_MASK){
case(B16):
for(i=0;i<len;i++)
((uint16_t*)la)[i]=((uint16_t)((uint8_t*)ca)[i])<<8;
break;
case(B32):
for(i=0;i<len;i++)
((uint32_t*)la)[i]=((uint32_t)((uint8_t*)ca)[i])<<24;
break;
}
break;
case(B16):
switch(lf&NBITS_MASK){
case(B08):
for(i=0;i<len;i++)
((uint8_t*)la)[i]=(uint8_t)((((uint16_t*)ca)[i])>>8);
break;
case(B32):
for(i=0;i<len;i++)
((uint32_t*)la)[i]=((uint32_t)((uint16_t*)ca)[i])<<16;
break;
}
break;
case(B32):
switch(lf&NBITS_MASK){
case(B08):
for(i=0;i<len;i++)
((uint8_t*)la)[i]=(uint8_t)((((uint32_t*)ca)[i])>>24);
break;
case(B16):
for(i=0;i<len;i++)
((uint16_t*)la)[i]=(uint16_t)((((uint32_t*)ca)[i])>>16);
break;
}
break;
}
}
// Switch from cpu native endian to the correct endianess
if((lf&END_MASK)!=NE){
switch(lf&NBITS_MASK){
case(B16):{
register uint16_t s;
for(i=0;i<len;i++){
s=((uint16_t*)la)[i];
((uint16_t*)la)[i]=(uint16_t)(((s&0x00FF)<<8) | (s&0xFF00)>>8);
}
}
break;
case(B32):{
register uint32_t s;
for(i=0;i<len;i++){
s=((uint32_t*)la)[i];
((uint32_t*)la)[i]=(uint32_t)(((s&0x000000FF)<<24) | ((s&0x0000FF00)<<8) |
((s&0x00FF0000)>>8) | ((s&0xFF000000)>>24));
}
}
break;
}
}
if((l->format&AF_FORMAT_END_MASK)!=AF_FORMAT_NE)
endian(l->audio,l->audio,len,l->bps);
// Set output data
// Make sure no samples are lost
c->len = (c->len*l->bps)/c->bps;
c->audio = l->audio;
c->len = len*l->bps;
c->bps = l->bps;
c->format = l->format;
return c;
@ -303,3 +312,149 @@ af_info_t af_info_format = {
AF_FLAGS_REENTRANT,
open
};
// Function implementations used by play
static void endian(void* in, void* out, int len, int bps)
{
register int i;
switch(bps){
case(2):{
register uint16_t s;
for(i=0;i<len;i++){
s=((uint16_t*)in)[i];
((uint16_t*)out)[i]=(uint16_t)(((s&0x00FF)<<8) | (s&0xFF00)>>8);
}
break;
}
case(4):{
register uint32_t s;
for(i=0;i<len;i++){
s=((uint32_t*)in)[i];
((uint32_t*)out)[i]=(uint32_t)(((s&0x000000FF)<<24) |
((s&0x0000FF00)<<8) |
((s&0x00FF0000)>>8) |
((s&0xFF000000)>>24));
}
break;
}
}
}
static void si2us(void* in, void* out, int len, int bps)
{
register int i;
switch(bps){
case(1):
for(i=0;i<len;i++)
((uint8_t*)out)[i]=(uint8_t)(SCHAR_MAX+((int)((int8_t*)in)[i]));
break;
case(2):
for(i=0;i<len;i++)
((uint16_t*)out)[i]=(uint16_t)(SHRT_MAX+((int)((int16_t*)in)[i]));
break;
case(4):
for(i=0;i<len;i++)
((uint32_t*)out)[i]=(uint32_t)(INT_MAX+((int32_t*)in)[i]);
break;
}
}
static void us2si(void* in, void* out, int len, int bps)
{
register int i;
switch(bps){
case(1):
for(i=0;i<len;i++)
((int8_t*)out)[i]=(int8_t)(SCHAR_MIN+((int)((uint8_t*)in)[i]));
break;
case(2):
for(i=0;i<len;i++)
((int16_t*)out)[i]=(int16_t)(SHRT_MIN+((int)((uint16_t*)in)[i]));
break;
case(4):
for(i=0;i<len;i++)
((int32_t*)out)[i]=(int32_t)(INT_MIN+((uint32_t*)in)[i]);
break;
}
}
static void change_bps(void* in, void* out, int len, int inbps, int outbps)
{
register int i;
switch(inbps){
case(1):
switch(outbps){
case(2):
for(i=0;i<len;i++)
((uint16_t*)out)[i]=((uint16_t)((uint8_t*)in)[i])<<8;
break;
case(4):
for(i=0;i<len;i++)
((uint32_t*)out)[i]=((uint32_t)((uint8_t*)in)[i])<<24;
break;
}
break;
case(2):
switch(outbps){
case(1):
for(i=0;i<len;i++)
((uint8_t*)out)[i]=(uint8_t)((((uint16_t*)in)[i])>>8);
break;
case(4):
for(i=0;i<len;i++)
((uint32_t*)out)[i]=((uint32_t)((uint16_t*)in)[i])<<16;
break;
}
break;
case(4):
switch(outbps){
case(1):
for(i=0;i<len;i++)
((uint8_t*)out)[i]=(uint8_t)((((uint32_t*)in)[i])>>24);
break;
case(2):
for(i=0;i<len;i++)
((uint16_t*)out)[i]=(uint16_t)((((uint32_t*)in)[i])>>16);
break;
}
break;
}
}
static void float2int(void* in, void* out, int len, int bps)
{
register int i;
switch(bps){
case(1):
for(i=0;i<len;i++)
((int8_t*)out)[i]=(int8_t)(SCHAR_MAX*((float*)in)[i]);
break;
case(2):
for(i=0;i<len;i++)
((int16_t*)out)[i]=(int16_t)(SHRT_MAX*((float*)in)[i]);
break;
case(4):
for(i=0;i<len;i++)
((int32_t*)out)[i]=(int32_t)(INT_MAX*((float*)in)[i]);
break;
}
}
static void int2float(void* in, void* out, int len, int bps)
{
register int i;
switch(bps){
case(1):
for(i=0;i<len;i++)
((float*)out)[i]=(1.0/SCHAR_MAX)*((float)((int8_t*)in)[i]);
break;
case(2):
for(i=0;i<len;i++)
((float*)out)[i]=(1.0/SHRT_MAX)*((float)((int16_t*)in)[i]);
break;
case(4):
for(i=0;i<len;i++)
((float*)out)[i]=(1.0/INT_MAX)*((float)((int32_t*)in)[i]);
break;
}
}

32
libaf/af_format.h Normal file
View File

@ -0,0 +1,32 @@
/* The sample format system used lin libaf is based on bitmasks. The
format definition only refers to the storage format not the
resolution. */
// Endianess
#define AF_FORMAT_BE (0<<0) // Big Endian
#define AF_FORMAT_LE (1<<0) // Little Endian
#define AF_FORMAT_END_MASK (1<<0)
#if WORDS_BIGENDIAN // Native endian of cpu
#define AF_FORMAT_NE AF_FORMAT_BE
#else
#define AF_FORMAT_NE AF_FORMAT_LE
#endif
// Signed/unsigned
#define AF_FORMAT_SI (0<<1) // SIgned
#define AF_FORMAT_US (1<<1) // Un Signed
#define AF_FORMAT_SIGN_MASK (1<<1)
// Fixed of floating point
#define AF_FORMAT_I (0<<2) // Int
#define AF_FORMAT_F (1<<2) // Foating point
#define AF_FORMAT_POINT_MASK (1<<2)
// Special flags refering to non pcm data
#define AF_FORMAT_MU_LAW (1<<3) //
#define AF_FORMAT_A_LAW (2<<3) //
#define AF_FORMAT_MPEG2 (3<<3) // MPEG(2) audio
#define AF_FORMAT_AC3 (4<<3) // Dolby Digital AC3
#define AF_FORMAT_IMA_ADPCM AF_FORMAT_LE|AF_FORMAT_SI // Same as 16 bit signed int
#define AF_FORMAT_SPECIAL_MASK (7<<3)

315
libaf/af_format_alaw.c Normal file
View File

@ -0,0 +1,315 @@
/*=============================================================================
//
// This software has been released under the terms of the GNU Public
// license. See http://www.gnu.org/copyleft/gpl.html for details.
//
// Copyright 2002 Anders Johansson ajh@watri.uwa.edu.au
//
// This file is based on a part of libsndfile, the work of
// Erik de Castro Lopo <erikd@zip.com.au>
//
//=============================================================================
*/
#ifndef __af_format_alaw_c
#define __af_format_alaw_c
#include <unistd.h>
#include <inttypes.h>
#include "af.h"
// Conversion tables (the function are below)
static short alaw_decode [128] =
{ -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
-7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
-2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
-3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392,
-22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944,
-30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136,
-11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472,
-15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568,
-344, -328, -376, -360, -280, -264, -312, -296,
-472, -456, -504, -488, -408, -392, -440, -424,
-88, -72, -120, -104, -24, -8, -56, -40,
-216, -200, -248, -232, -152, -136, -184, -168,
-1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184,
-1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696,
-688, -656, -752, -720, -560, -528, -624, -592,
-944, -912, -1008, -976, -816, -784, -880, -848
} ; /* alaw_decode */
static unsigned char alaw_encode [2049] =
{ 0xD5, 0xD4, 0xD7, 0xD6, 0xD1, 0xD0, 0xD3, 0xD2, 0xDD, 0xDC, 0xDF, 0xDE,
0xD9, 0xD8, 0xDB, 0xDA, 0xC5, 0xC4, 0xC7, 0xC6, 0xC1, 0xC0, 0xC3, 0xC2,
0xCD, 0xCC, 0xCF, 0xCE, 0xC9, 0xC8, 0xCB, 0xCA, 0xF5, 0xF5, 0xF4, 0xF4,
0xF7, 0xF7, 0xF6, 0xF6, 0xF1, 0xF1, 0xF0, 0xF0, 0xF3, 0xF3, 0xF2, 0xF2,
0xFD, 0xFD, 0xFC, 0xFC, 0xFF, 0xFF, 0xFE, 0xFE, 0xF9, 0xF9, 0xF8, 0xF8,
0xFB, 0xFB, 0xFA, 0xFA, 0xE5, 0xE5, 0xE5, 0xE5, 0xE4, 0xE4, 0xE4, 0xE4,
0xE7, 0xE7, 0xE7, 0xE7, 0xE6, 0xE6, 0xE6, 0xE6, 0xE1, 0xE1, 0xE1, 0xE1,
0xE0, 0xE0, 0xE0, 0xE0, 0xE3, 0xE3, 0xE3, 0xE3, 0xE2, 0xE2, 0xE2, 0xE2,
0xED, 0xED, 0xED, 0xED, 0xEC, 0xEC, 0xEC, 0xEC, 0xEF, 0xEF, 0xEF, 0xEF,
0xEE, 0xEE, 0xEE, 0xEE, 0xE9, 0xE9, 0xE9, 0xE9, 0xE8, 0xE8, 0xE8, 0xE8,
0xEB, 0xEB, 0xEB, 0xEB, 0xEA, 0xEA, 0xEA, 0xEA, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9C, 0x9C, 0x9C, 0x9C,
0x9C, 0x9C, 0x9C, 0x9C, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F,
0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x9E, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9B, 0x9A, 0x9A, 0x9A, 0x9A,
0x9A, 0x9A, 0x9A, 0x9A, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0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0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x2A
} ; /* alaw_encode */
/* Convert from alaw to signd int8 to signed int32 or float */
static int from_alaw(void* in, void* out, int len, int bps, int format)
{
register int i;
// Make sure the input parametrs are OK
if(format & (AF_FORMAT_SPECIAL_MASK | AF_FORMAT_US))
return AF_ERROR;
// Convert to int or to float
if((format & AF_FORMAT_POINT_MASK) == AF_FORMAT_I){
switch(bps){
case(1):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int8_t*)out)[i] = (-1 * alaw_decode[(((int8_t*)in)[i]) & 0x7F]) >> 8;
else
((int8_t*)out)[i] = (alaw_decode[(((int8_t*)in)[i]) & 0x7F]) >> 8;
}
break;
case(2):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int16_t*)out)[i] = -1 * alaw_decode[(((int8_t*)in)[i]) & 0x7F];
else
((int16_t*)out)[i] = alaw_decode[(((int8_t*)in)[i]) & 0x7F];
}
break;
case(4):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int32_t*)out)[i] = (-1 * alaw_decode[(((int8_t*)in)[i]) & 0x7F]) << 16;
else
((int32_t*)out)[i] = (alaw_decode[(((int8_t*)in)[i]) & 0x7F]) << 16;
}
break;
default:
return AF_ERROR;
}
}
else{
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((float*)out)[i] = -1.0/32768.0 * (float)alaw_decode[(((int8_t*)in)[i]) & 0x7F];
else
((float*)out)[i] = +1.0/32768.0 * (float)alaw_decode[(((int8_t*)in)[i]) & 0x7F];
}
}
return AF_OK;
}
/* Convert from singed int8 to singned int32 or float to alaw */
static int to_alaw(void* in, void* out, int len, int bps, int format)
{
register int i;
// Make sure the input parametrs are OK
if(format & (AF_FORMAT_SPECIAL_MASK | AF_FORMAT_US))
return AF_ERROR;
// Convert from int or to float
if((format & AF_FORMAT_POINT_MASK) == AF_FORMAT_I){
switch(bps){
case(1):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] >= 0)
((int8_t*)out)[i] = alaw_encode[((int8_t*)in)[i] << 4];
else
((int8_t*)out)[i] = 0x7F & alaw_encode[-((int8_t*)in)[i] << 4];
}
break;
case(2):
for(i=0;i<len;i++){
if(((int16_t*)in)[i] >= 0)
((int8_t*)out)[i] = alaw_encode[((int16_t*)in)[i] / 16];
else
((int8_t*)out)[i] = 0x7F & alaw_encode[((int16_t*)in)[i] / -16];
}
break;
case(4):
for(i=0;i<len;i++){
if(((int32_t*)in)[i] >= 0)
((int8_t*)out)[i] = alaw_encode[((int32_t*)in)[i] >> (16 + 4)];
else
((int8_t*)out)[i] = 0x7F & alaw_encode[-((int32_t*)in)[i] >> (16 + 4)];
}
break;
default:
return AF_ERROR;
}
}
else{
for(i=0;i<len;i++){
if(((float*)in)[i] >= 0)
((int8_t*)out)[i] = alaw_encode[(int)(32767.0/16.0 * ((float*)in)[i])];
else
((int8_t*)out)[i] = 0x7F & alaw_encode[(int)(-32767.0/16.0 * ((float*)in)[i])];
}
}
return AF_OK;
}
#endif /* __af_format_alaw_c */

828
libaf/af_format_ulaw.c Normal file
View File

@ -0,0 +1,828 @@
/*=============================================================================
//
// This software has been released under the terms of the GNU Public
// license. See http://www.gnu.org/copyleft/gpl.html for details.
//
// Copyright 2002 Anders Johansson ajh@watri.uwa.edu.au
//
// This file is based on a part of libsndfile, the work of
// Erik de Castro Lopo <erikd@zip.com.au>
//
//=============================================================================
*/
#ifndef __af_format_ulaw_c
#define __af_format_ulaw_c
#include <unistd.h>
#include <inttypes.h>
#include "af.h"
// Conversion tables (the function are below)
static short ulaw_decode[128] =
{ -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956,
-23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764,
-15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412,
-11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316,
-7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140,
-5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
-3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004,
-2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980,
-1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436,
-1372, -1308, -1244, -1180, -1116, -1052, -988, -924,
-876, -844, -812, -780, -748, -716, -684, -652,
-620, -588, -556, -524, -492, -460, -428, -396,
-372, -356, -340, -324, -308, -292, -276, -260,
-244, -228, -212, -196, -180, -164, -148, -132,
-120, -112, -104, -96, -88, -80, -72, -64,
-56, -48, -40, -32, -24, -16, -8, 0,
} ;
static unsigned char ulaw_encode[8193] =
{ 0xFF, 0xFE, 0xFE, 0xFD, 0xFD, 0xFC, 0xFC, 0xFB, 0xFB, 0xFA, 0xFA, 0xF9,
0xF9, 0xF8, 0xF8, 0xF7, 0xF7, 0xF6, 0xF6, 0xF5, 0xF5, 0xF4, 0xF4, 0xF3,
0xF3, 0xF2, 0xF2, 0xF1, 0xF1, 0xF0, 0xF0, 0xEF, 0xEF, 0xEF, 0xEF, 0xEE,
0xEE, 0xEE, 0xEE, 0xED, 0xED, 0xED, 0xED, 0xEC, 0xEC, 0xEC, 0xEC, 0xEB,
0xEB, 0xEB, 0xEB, 0xEA, 0xEA, 0xEA, 0xEA, 0xE9, 0xE9, 0xE9, 0xE9, 0xE8,
0xE8, 0xE8, 0xE8, 0xE7, 0xE7, 0xE7, 0xE7, 0xE6, 0xE6, 0xE6, 0xE6, 0xE5,
0xE5, 0xE5, 0xE5, 0xE4, 0xE4, 0xE4, 0xE4, 0xE3, 0xE3, 0xE3, 0xE3, 0xE2,
0xE2, 0xE2, 0xE2, 0xE1, 0xE1, 0xE1, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xDF,
0xDF, 0xDF, 0xDF, 0xDF, 0xDF, 0xDF, 0xDF, 0xDE, 0xDE, 0xDE, 0xDE, 0xDE,
0xDE, 0xDE, 0xDE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD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, 0x99, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99,
0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98,
0x98, 0x98, 0x98, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97,
0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x97, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96,
0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
0x95, 0x95, 0x95, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94,
0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x94, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92,
0x92, 0x92, 0x92, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91,
0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x91, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F,
0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F,
0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F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89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89,
0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x89, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87,
0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86,
0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x86, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85, 0x85,
0x85, 0x85, 0x85, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84,
0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83,
0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82,
0x82, 0x82, 0x82, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00
} ;
/* Convert from ulaw to signd int8 to signed int32 or float */
static int from_ulaw(void* in, void* out, int len, int bps, int format)
{
register int i;
// Make sure the input parametrs are OK
if(format & (AF_FORMAT_SPECIAL_MASK | AF_FORMAT_US))
return AF_ERROR;
// Convert to int or to float
if((format & AF_FORMAT_POINT_MASK) == AF_FORMAT_I){
switch(bps){
case(1):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int8_t*)out)[i] = (-1 * ulaw_decode[(((int8_t*)in)[i]) & 0x7F]) >> 8;
else
((int8_t*)out)[i] = (ulaw_decode[(((int8_t*)in)[i]) & 0x7F]) >> 8;
}
break;
case(2):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int16_t*)out)[i] = -1 * ulaw_decode[(((int8_t*)in)[i]) & 0x7F];
else
((int16_t*)out)[i] = ulaw_decode[(((int8_t*)in)[i]) & 0x7F];
}
break;
case(4):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((int32_t*)out)[i] = (-1 * ulaw_decode[(((int8_t*)in)[i]) & 0x7F]) << 16;
else
((int32_t*)out)[i] = (ulaw_decode[(((int8_t*)in)[i]) & 0x7F]) << 16;
}
break;
default:
return AF_ERROR;
}
}
else{
for(i=0;i<len;i++){
if(((int8_t*)in)[i] & 0x80)
((float*)out)[i] = -1.0/32768.0 * (float)ulaw_decode[(((int8_t*)in)[i]) & 0x7F];
else
((float*)out)[i] = +1.0/32768.0 * (float)ulaw_decode[(((int8_t*)in)[i]) & 0x7F];
}
}
return AF_OK;
}
/* Convert from singed int8 to singned int32 or float to ulaw */
static int to_ulaw(void* in, void* out, int len, int bps, int format)
{
register int i;
// Make sure the input parametrs are OK
if(format & (AF_FORMAT_SPECIAL_MASK | AF_FORMAT_US))
return AF_ERROR;
// Convert from int or to float
if((format & AF_FORMAT_POINT_MASK) == AF_FORMAT_I){
switch(bps){
case(1):
for(i=0;i<len;i++){
if(((int8_t*)in)[i] >= 0)
((int8_t*)out)[i] = ulaw_encode[((int8_t*)in)[i] << 6];
else
((int8_t*)out)[i] = 0x7F & ulaw_encode[-((int8_t*)in)[i] << 6];
}
break;
case(2):
for(i=0;i<len;i++){
if(((int16_t*)in)[i] >= 0)
((int8_t*)out)[i] = ulaw_encode[((int16_t*)in)[i] / 4];
else
((int8_t*)out)[i] = 0x7F & ulaw_encode[((int16_t*)in)[i] / -4];
}
break;
case(4):
for(i=0;i<len;i++){
if(((int32_t*)in)[i] >= 0)
((int8_t*)out)[i] = ulaw_encode[((int32_t*)in)[i] >> (16 + 2)];
else
((int8_t*)out)[i] = 0x7F & ulaw_encode[-((int32_t*)in)[i] >> (16 + 2)];
}
break;
default:
return AF_ERROR;
}
}
else{
for(i=0;i<len;i++){
if(((float*)in)[i] >= 0)
((int8_t*)out)[i] = ulaw_encode[(int)(32767.0/4.0 * ((float*)in)[i])];
else
((int8_t*)out)[i] = 0x7F & ulaw_encode[(int)(-32767.0/4.0 * ((float*)in)[i])];
}
}
return AF_OK;
}
#endif /* __af_format_ulaw_c */

41
libaf/af_mp.c Normal file
View File

@ -0,0 +1,41 @@
#include "af.h"
/* Decodes the format from mplayer format to libaf format */
int af_format_decode(int ifmt)
{
int ofmt = ~0;
// Check input ifmt
switch(ifmt){
case(AFMT_U8):
ofmt = AF_FORMAT_LE|AF_FORMAT_US; break;
case(AFMT_S8):
ofmt = AF_FORMAT_LE|AF_FORMAT_SI; break;
case(AFMT_S16_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_SI; break;
case(AFMT_S16_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_SI; break;
case(AFMT_U16_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_US; break;
case(AFMT_U16_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_US; break;
case(AFMT_S32_LE):
ofmt = AF_FORMAT_LE|AF_FORMAT_SI; break;
case(AFMT_S32_BE):
ofmt = AF_FORMAT_BE|AF_FORMAT_SI; break;
case(AFMT_IMA_ADPCM):
ofmt = AF_FORMAT_IMA_ADPCM; break;
case(AFMT_MU_LAW):
ofmt = AF_FORMAT_MU_LAW; break;
case(AFMT_A_LAW):
ofmt = AF_FORMAT_A_LAW; break;
case(AFMT_MPEG):
ofmt = AF_FORMAT_MPEG2; break;
case(AFMT_AC3):
ofmt = AF_FORMAT_AC3; break;
default:
//This can not happen ....
af_msg(AF_MSG_FATAL,"Unrecognized input audio format %i\n",ifmt);
break;
}
return ofmt;
}

26
libaf/af_mp.h Normal file
View File

@ -0,0 +1,26 @@
/* Include file for mplayer specific defines and includes */
#ifndef __af_mp_h__
#define __af_mp_h__
#include "../config.h"
#include "../mp_msg.h"
#include "../cpudetect.h"
#include "../libao2/afmt.h"
/* Set the initialization type from mplayers cpudetect */
#ifdef AF_INIT_TYPE
#undef AF_INIT_TYPE
#define AF_INIT_TYPE \
((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW)
#endif
#ifdef af_msg
#undef af_msg
#endif
#define af_msg(lev, args... ) \
mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), args ## )
/* Decodes the format from mplayer format to libaf format */
extern int af_format_decode(int format);
#endif /* __af_mp_h__ */

View File

@ -9,18 +9,11 @@
*/
/* This audio filter changes the sample rate. */
#define PLUGIN
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include "../config.h"
#include "../mp_msg.h"
#include "../libao2/afmt.h"
#include "af.h"
#include "dsp.h"
@ -214,11 +207,11 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Set parameters
af->data->nch = n->nch;
af->data->format = AFMT_S16_NE;
af->data->format = AF_FORMAT_NE | AF_FORMAT_SI;
af->data->bps = 2;
if(af->data->format != n->format || af->data->bps != n->bps)
rv = AF_FALSE;
n->format = AFMT_S16_NE;
n->format = AF_FORMAT_NE | AF_FORMAT_SI;
n->bps = 2;
// Calculate up and down sampling factors
@ -256,7 +249,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Design prototype filter type using Kaiser window with beta = 10
if(NULL == w || NULL == s->w ||
-1 == design_fir(s->up*L, w, &fc, LP|KAISER , 10.0)){
mp_msg(MSGT_AFILTER,MSGL_ERR,"[resample] Unable to design prototype filter.\n");
af_msg(AF_MSG_ERROR,"[resample] Unable to design prototype filter.\n");
return AF_ERROR;
}
// Copy data from prototype to polyphase filter
@ -269,7 +262,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
}
}
free(w);
mp_msg(MSGT_AFILTER,MSGL_V,"[resample] New filter designed up: %i down: %i\n", s->up, s->dn);
af_msg(AF_MSG_VERBOSE,"[resample] New filter designed up: %i down: %i\n", s->up, s->dn);
}
// Set multiplier and delay
@ -289,12 +282,12 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
// Sanity check
if(((int*)arg)[0] < 8000 || ((int*)arg)[0] > 192000){
mp_msg(MSGT_AFILTER,MSGL_ERR,"[resample] The output sample frequency must be between 8kHz and 192kHz. Current value is %i \n",((int*)arg)[0]);
af_msg(AF_MSG_ERROR,"[resample] The output sample frequency must be between 8kHz and 192kHz. Current value is %i \n",((int*)arg)[0]);
return AF_ERROR;
}
af->data->rate=((int*)arg)[0];
mp_msg(MSGT_AFILTER,MSGL_V,"[resample] Changing sample rate to %iHz\n",af->data->rate);
af_msg(AF_MSG_VERBOSE,"[resample] Changing sample rate to %iHz\n",af->data->rate);
return AF_OK;
}
return AF_UNKNOWN;

View File

@ -23,31 +23,24 @@
#include <inttypes.h>
#include <math.h>
#include "../config.h"
#include "../mp_msg.h"
#include "af.h"
// Some limits
#define NCH AF_NCH // Number of channels
#define MIN_S16 -32650
#define MAX_S16 32650
#define MAX_VOL +20.0
#define MIN_VOL -60.0
// Number of channels
#define NCH 6
#include "../libao2/afmt.h"
#define MAX_VOL +40.0
#define MIN_VOL -200.0
// Data for specific instances of this filter
typedef struct af_volume_s
{
double volume[NCH]; // Volume for each channel
double power[NCH]; // Instantaneous power in each channel
double maxpower[NCH]; // Maximum power in each channel
double alpha; // Forgetting factor for power estimate
float volume[NCH]; // Volume for each channel
float power[NCH]; // Instantaneous power in each channel
float maxpower[NCH]; // Maximum power in each channel
float alpha; // Forgetting factor for power estimate
int softclip; // Soft clippng on/off
int probe; // Probing on/off
int onoff; // Volume control on/off
@ -55,29 +48,37 @@ typedef struct af_volume_s
/* Convert to gain value from dB. Returns AF_OK if of and AF_ERROR if
fail */
inline int from_dB(double* in, double* out, double k)
inline int from_dB(float* in, float* out, float k)
{
int i = 0;
// Sanity check
if(!in || !out)
return AF_ERROR;
for(i=0;i<NCH;i++)
out[i]=pow(10.0,clamp(in[i],MIN_VOL,MAX_VOL)/k);
for(i=0;i<NCH;i++){
if(in[i]<MIN_VOL)
out[i]=0.0;
else
out[i]=pow(10.0,clamp(in[i],MIN_VOL,MAX_VOL)/k);
}
return AF_OK;
}
/* Convert from gain value to dB. Returns AF_OK if of and AF_ERROR if
fail */
inline int to_dB(double* in, double* out, double k)
inline int to_dB(float* in, float* out, float k)
{
int i = 0;
// Sanity check
if(!in || !out)
return AF_ERROR;
for(i=0;i<NCH;i++)
out[i]=k*log10(clamp(in[i],MIN_VOL,MAX_VOL));
for(i=0;i<NCH;i++){
if(in[i] == 0.0)
out[i]=MIN_VOL;
else
out[i]=k*log10(clamp(in[i],MIN_VOL,MAX_VOL));
}
return AF_OK;
}
@ -93,11 +94,11 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
af->data->rate = ((af_data_t*)arg)->rate;
af->data->nch = ((af_data_t*)arg)->nch;
af->data->format = AFMT_S16_LE;
af->data->format = AF_FORMAT_SI | AF_FORMAT_LE;
af->data->bps = 2;
// Time constant set to 0.1s
s->alpha = (1.0/0.2)/(2.0*M_PI*(double)((af_data_t*)arg)->rate);
s->alpha = (1.0/0.2)/(2.0*M_PI*(float)((af_data_t*)arg)->rate);
// Only AFMT_S16_LE is supported for now
if(af->data->format != ((af_data_t*)arg)->format ||
@ -105,20 +106,22 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
return AF_FALSE;
return AF_OK;
case AF_CONTROL_COMMAND_LINE:{
double vol[6]={-10.0,-10.0,-10.0,-10.0,-10.0,-10.0};
sscanf((char*)arg,"%lf:%lf:%lf:%lf:%lf:%lf:%i:%i:%i",
&vol[0], &vol[1], &vol[2], &vol[3], &vol[4], &vol[5],
float v=-10.0;
float vol[6];
int i;
sscanf((char*)arg,"%f:%i:%i:%i", &v,
&(s->softclip), &(s->probe), &(s->onoff));
for(i=0;i<NCH;i++) vol[i]=v;
return from_dB(vol,s->volume,20.0);
}
case AF_CONTROL_VOLUME_SET:
return from_dB((double*)arg,s->volume,20.0);
return from_dB((float*)arg,s->volume,20.0);
case AF_CONTROL_VOLUME_GET:
return to_dB(s->volume,(double*)arg,20.0);
return to_dB(s->volume,(float*)arg,20.0);
case AF_CONTROL_VOLUME_PROBE_GET:
return to_dB(s->power,(double*)arg,10.0);
return to_dB(s->power,(float*)arg,10.0);
case AF_CONTROL_VOLUME_PROBE_GET_MAX:
return to_dB(s->maxpower,(double*)arg,10.0);
return to_dB(s->maxpower,(float*)arg,10.0);
case AF_CONTROL_VOLUME_SOFTCLIP:
s->softclip = (int)arg;
return AF_OK;
@ -155,13 +158,13 @@ static af_data_t* play(struct af_instance_s* af, af_data_t* data)
// Probe the data stream
if(s->probe){
for(ch = 0; ch < nch ; ch++){
double alpha = s->alpha;
double beta = 1 - alpha;
double pow = s->power[ch];
double maxpow = s->maxpower[ch];
register double t = 0;
float alpha = s->alpha;
float beta = 1 - alpha;
float pow = s->power[ch];
float maxpow = s->maxpower[ch];
register float t = 0;
for(i=ch;i<len;i+=nch){
t = ((double)a[i])/32768.0;
t = ((float)a[i])/32768.0;
t *= t;
// Check maximum power value
if(t>maxpow)

15
libaf/config.h Normal file
View File

@ -0,0 +1,15 @@
/*=============================================================================
//
// This software has been released under the terms of the GNU Public
// license. See http://www.gnu.org/copyleft/gpl.html for details.
//
// Copyright 2002 Anders Johansson ajh@watri.uwa.edu.au
//
//=============================================================================
*/
// Number of channels
#ifndef AF_NCH
#define AF_NCH 6
#endif

View File

@ -287,13 +287,13 @@ int init_audio_filters(sh_audio_t *sh_audio,
// input format: same as codec's output format:
afs->input.rate = in_samplerate;
afs->input.nch = in_channels;
afs->input.format = in_format;
afs->input.format = af_format_decode(in_format);
afs->input.bps = in_bps;
// output format: same as ao driver's input format (if missing, fallback to input)
afs->output.rate = out_samplerate ? out_samplerate : afs->input.rate;
afs->output.nch = out_channels ? out_channels : afs->input.nch;
afs->output.format = out_format ? out_format : afs->input.format;
afs->output.format = af_format_decode(out_format ? out_format : afs->input.format);
afs->output.bps = out_bps ? out_bps : afs->input.bps;
// filter config:
@ -375,7 +375,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)
afd.len=declen;
afd.rate=sh_audio->samplerate;
afd.nch=sh_audio->channels;
afd.format=sh_audio->sample_format;
afd.format=af_format_decode(sh_audio->sample_format);
afd.bps=sh_audio->samplesize;
//pafd=&afd;
// printf("\nAF: %d --> ",declen);