diff options
Diffstat (limited to 'apps/codecs/libcook/cook.c')
-rw-r--r-- | apps/codecs/libcook/cook.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/codecs/libcook/cook.c b/apps/codecs/libcook/cook.c index 8d9611c4d9..814250ea32 100644 --- a/apps/codecs/libcook/cook.c +++ b/apps/codecs/libcook/cook.c | |||
@@ -598,7 +598,7 @@ decode_bytes_and_gain(COOKContext *q, const uint8_t *inbuffer, | |||
598 | static void | 598 | static void |
599 | mlt_compensate_output(COOKContext *q, REAL_T *decode_buffer, | 599 | mlt_compensate_output(COOKContext *q, REAL_T *decode_buffer, |
600 | cook_gains *gains, REAL_T *previous_buffer, | 600 | cook_gains *gains, REAL_T *previous_buffer, |
601 | int16_t *out, int chan) | 601 | int32_t *out, int chan) |
602 | { | 602 | { |
603 | REAL_T *buffer = q->mono_mdct_output; | 603 | REAL_T *buffer = q->mono_mdct_output; |
604 | int i; | 604 | int i; |
@@ -618,7 +618,9 @@ mlt_compensate_output(COOKContext *q, REAL_T *decode_buffer, | |||
618 | memcpy(previous_buffer, buffer+q->samples_per_channel, | 618 | memcpy(previous_buffer, buffer+q->samples_per_channel, |
619 | sizeof(REAL_T)*q->samples_per_channel); | 619 | sizeof(REAL_T)*q->samples_per_channel); |
620 | 620 | ||
621 | output_math(q, out, chan); | 621 | /* Copy output to non-interleaved sample buffer */ |
622 | memcpy(out + (chan * q->samples_per_channel), buffer, | ||
623 | sizeof(REAL_T)*q->samples_per_channel); | ||
622 | } | 624 | } |
623 | 625 | ||
624 | 626 | ||
@@ -634,7 +636,7 @@ mlt_compensate_output(COOKContext *q, REAL_T *decode_buffer, | |||
634 | 636 | ||
635 | 637 | ||
636 | static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, | 638 | static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, |
637 | int sub_packet_size, int16_t *outbuffer) { | 639 | int sub_packet_size, int32_t *outbuffer) { |
638 | /* packet dump */ | 640 | /* packet dump */ |
639 | // for (i=0 ; i<sub_packet_size ; i++) { | 641 | // for (i=0 ; i<sub_packet_size ; i++) { |
640 | // DEBUGF("%02x", inbuffer[i]); | 642 | // DEBUGF("%02x", inbuffer[i]); |
@@ -666,7 +668,7 @@ static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, | |||
666 | q->mono_previous_buffer2, outbuffer, 1); | 668 | q->mono_previous_buffer2, outbuffer, 1); |
667 | } | 669 | } |
668 | } | 670 | } |
669 | return q->samples_per_frame * sizeof(int16_t); | 671 | return q->samples_per_frame * sizeof(int32_t); |
670 | } | 672 | } |
671 | 673 | ||
672 | 674 | ||
@@ -677,7 +679,7 @@ static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, | |||
677 | */ | 679 | */ |
678 | 680 | ||
679 | int cook_decode_frame(RMContext *rmctx,COOKContext *q, | 681 | int cook_decode_frame(RMContext *rmctx,COOKContext *q, |
680 | int16_t *outbuffer, int *data_size, | 682 | int32_t *outbuffer, int *data_size, |
681 | const uint8_t *inbuffer, int buf_size) { | 683 | const uint8_t *inbuffer, int buf_size) { |
682 | //COOKContext *q = avctx->priv_data; | 684 | //COOKContext *q = avctx->priv_data; |
683 | //COOKContext *q; | 685 | //COOKContext *q; |