~ft/faad2

6dfe72f142947c22f7f9f7c8e4894c3f35657656 — menno 17 years ago b823b1e
small fixes for DRM
3 files changed, 13 insertions(+), 6 deletions(-)

M libfaad/bits.h
M libfaad/decoder.c
M libfaad/sbr_dec.h
M libfaad/bits.h => libfaad/bits.h +2 -2
@@ 22,7 22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
** $Id: bits.h,v 1.35 2004/01/28 19:17:25 menno Exp $
** $Id: bits.h,v 1.36 2004/02/04 20:07:24 menno Exp $
**/

#ifndef __BITS_H__


@@ 271,7 271,7 @@ static uint8_t faad_check_CRC(bitfile *ld, uint16_t len)

    faad_rewindbits(ld);

    CRC = ~faad_getbits(ld, 8
    CRC = (uint8_t) ~faad_getbits(ld, 8
        DEBUGVAR(1,999,"faad_check_CRC(): CRC"));          /* CRC is stored inverted */

    for (; len>0; len--)

M libfaad/decoder.c => libfaad/decoder.c +8 -3
@@ 22,7 22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
** $Id: decoder.c,v 1.93 2004/01/28 19:17:25 menno Exp $
** $Id: decoder.c,v 1.94 2004/02/04 20:07:24 menno Exp $
**/

#include "common.h"


@@ 414,6 414,7 @@ int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
    /* Take care of buffers */
    if (hDecoder->sample_buffer) faad_free(hDecoder->sample_buffer);
    hDecoder->sample_buffer = NULL;
    hDecoder->alloced_channels = 0;

    for (i = 0; i < MAX_CHANNELS; i++)
    {


@@ 440,13 441,17 @@ int8_t FAADAPI faacDecInitDRM(faacDecHandle hDecoder, uint32_t samplerate,
#endif
    }

#ifdef SBR_DEC
    for (i = 0; i < MAX_SYNTAX_ELEMENTS; i++)
    {
#ifdef SBR_DEC
        if (hDecoder->sbr[i])
            sbrDecodeEnd(hDecoder->sbr[i]);
    }

        hDecoder->sbr_alloced[i] = 0;
#endif
        hDecoder->element_alloced[i] = 0;
        hDecoder->element_output_channels[i] = 0;
    }

    hDecoder->fb = filter_bank_init(hDecoder->frameLength);


M libfaad/sbr_dec.h => libfaad/sbr_dec.h +3 -1
@@ 22,7 22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
** $Id: sbr_dec.h,v 1.22 2004/01/29 11:31:11 menno Exp $
** $Id: sbr_dec.h,v 1.23 2004/02/04 20:07:24 menno Exp $
**/

#ifndef __SBR_DEC_H__


@@ 158,8 158,10 @@ typedef struct
	int8_t lcstereo_flag;
	uint8_t bs_dataextra;
    uint8_t Is_DRM_SBR;
#ifdef DRM_PS
    drm_ps_info drm_ps;
#endif
#endif

	uint8_t numTimeSlotsRate;
	uint8_t numTimeSlots;