summaryrefslogtreecommitdiff
path: root/apps/codecs/libmusepack/synth_filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libmusepack/synth_filter.c')
-rw-r--r--apps/codecs/libmusepack/synth_filter.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c
index 587b88dada..b6caf4a3d7 100644
--- a/apps/codecs/libmusepack/synth_filter.c
+++ b/apps/codecs/libmusepack/synth_filter.c
@@ -35,9 +35,10 @@
35/// \file synth_filter.c 35/// \file synth_filter.c
36/// Synthesis functions. 36/// Synthesis functions.
37/// \todo document me 37/// \todo document me
38 38#include <string.h>
39#include "musepack.h" 39#include "mpcdec.h"
40#include "internal.h" 40#include "decoder.h"
41#include "mpcdec_math.h"
41 42
42/* C O N S T A N T S */ 43/* C O N S T A N T S */
43#undef _ 44#undef _
@@ -127,7 +128,7 @@ static const MPC_SAMPLE_FORMAT Di_opt [512] ICONST_ATTR = {
127 *****************************************************************************/ 128 *****************************************************************************/
128void 129void
129mpc_dct32(const MPC_SAMPLE_FORMAT *in, MPC_SAMPLE_FORMAT *v) 130mpc_dct32(const MPC_SAMPLE_FORMAT *in, MPC_SAMPLE_FORMAT *v)
130ICODE_ATTR_MPC_LARGE_IRAM; 131ICODE_ATTR_MPC_LARGE_IRAM;
131 132
132void 133void
133mpc_dct32(const MPC_SAMPLE_FORMAT *in, MPC_SAMPLE_FORMAT *v) 134mpc_dct32(const MPC_SAMPLE_FORMAT *in, MPC_SAMPLE_FORMAT *v)
@@ -548,27 +549,26 @@ mpc_full_synthesis_filter(MPC_SAMPLE_FORMAT *OutData, MPC_SAMPLE_FORMAT *V, cons
548 mpc_dct32(Y, V); 549 mpc_dct32(Y, V);
549 mpc_decoder_windowing_D( OutData, V, Di_opt ); 550 mpc_decoder_windowing_D( OutData, V, Di_opt );
550 } 551 }
551 } 552 }
552} 553}
553 554
554void 555void
555mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT *OutData) 556mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT *OutData,
557 int num_channels)
556{ 558{
559 (void)num_channels;
560
557 /********* left channel ********/ 561 /********* left channel ********/
558 memmove(d->V_L + MPC_V_MEM, d->V_L, 960 * sizeof(MPC_SAMPLE_FORMAT) ); 562 memmove(d->V_L + MPC_V_MEM, d->V_L, 960 * sizeof(MPC_SAMPLE_FORMAT) );
559 563 mpc_full_synthesis_filter(OutData,
560 mpc_full_synthesis_filter( 564 (MPC_SAMPLE_FORMAT *)(d->V_L + MPC_V_MEM),
561 OutData, 565 (MPC_SAMPLE_FORMAT *)(d->Y_L));
562 (MPC_SAMPLE_FORMAT *)(d->V_L + MPC_V_MEM),
563 (MPC_SAMPLE_FORMAT *)(d->Y_L [0]));
564 566
565 /******** right channel ********/ 567 /******** right channel ********/
566 memmove(d->V_R + MPC_V_MEM, d->V_R, 960 * sizeof(MPC_SAMPLE_FORMAT) ); 568 memmove(d->V_R + MPC_V_MEM, d->V_R, 960 * sizeof(MPC_SAMPLE_FORMAT) );
567 569 mpc_full_synthesis_filter((OutData == NULL ? NULL : OutData + MPC_FRAME_LENGTH),
568 mpc_full_synthesis_filter( 570 (MPC_SAMPLE_FORMAT *)(d->V_R + MPC_V_MEM),
569 (OutData == NULL ? NULL : OutData + MPC_FRAME_LENGTH), 571 (MPC_SAMPLE_FORMAT *)(d->Y_R));
570 (MPC_SAMPLE_FORMAT *)(d->V_R + MPC_V_MEM),
571 (MPC_SAMPLE_FORMAT *)(d->Y_R [0]));
572} 572}
573 573
574/*******************************************/ 574/*******************************************/
@@ -577,7 +577,7 @@ mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT *OutData)
577/* */ 577/* */
578/*******************************************/ 578/*******************************************/
579 579
580static const unsigned char Parity [256] ICONST_ATTR = { // parity 580static const unsigned char Parity [256] = { // parity
581 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, 581 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
582 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, 582 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
583 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0, 583 1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,