Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
int cook_decode_init(RMContext *rmctx, COOKContext *q); int cook_decode_frame(RMContext *rmctx,COOKContext *q, - int16_t *outbuffer, int *data_size, + int32_t *outbuffer, int *data_size, const uint8_t *inbuffer, int buf_size); #endif /*_COOK_H */ * @param out pointer to the output buffer * @param chan 0: left or single channel, 1: right channel */ -static inline void output_math(COOKContext *q, int16_t *out, int chan) +static inline void output_math(COOKContext *q, int32_t *out, int chan) { int j; for (j = 0; j < q->samples_per_channel; j++) { - out[chan + q->nb_channels * j] = - av_clip(fixp_pow2(q->mono_mdct_output[j], -11), -32768, 32767); + out[chan + q->nb_channels * j] = q->mono_mdct_output[j]; } } static inline void mlt_compensate_output(COOKContext *q, REAL_T *decode_buffer, cook_gains *gains, REAL_T *previous_buffer, - int16_t *out, int chan) + int32_t *out, int chan) { REAL_T *buffer = q->mono_mdct_output; int i; static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, - int sub_packet_size, int16_t *outbuffer) { + int sub_packet_size, int32_t *outbuffer) { /* packet dump */ // for (i=0 ; i<sub_packet_size ; i++) { // DEBUGF("%02x", inbuffer[i]); q->mono_previous_buffer2, outbuffer, 1); } } - return q->samples_per_frame * sizeof(int16_t); + return q->samples_per_frame * sizeof(int32_t); } */ int cook_decode_frame(RMContext *rmctx,COOKContext *q, - int16_t *outbuffer, int *data_size, + int32_t *outbuffer, int *data_size, const uint8_t *inbuffer, int buf_size) { //COOKContext *q = avctx->priv_data; //COOKContext *q; RMContext rmctx; RMPacket pkt; COOKContext q IBSS_ATTR; +int32_t outbuf[2048]; static void init_rm(RMContext *rmctx) { static size_t buff_size; int datasize, res, consumed, i, time_offset; uint8_t *bit_buffer; - int16_t outbuf[2048] __attribute__((aligned(32))); uint16_t fs,sps,h; uint32_t packet_count; int scrambling_unit_size, num_units; init_rm(&rmctx); ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); - ci->configure(DSP_SET_SAMPLE_DEPTH, 16); + ci->configure(DSP_SET_SAMPLE_DEPTH, 27); ci->configure(DSP_SET_STEREO_MODE, rmctx.nb_channels == 1 ? STEREO_MONO : STEREO_INTERLEAVED); |