- Main Page
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

# drm_dec.h

    00001 /*
    00002 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
    00003 ** Copyright (C) 2003-2005 M. Bakker, Ahead Software AG, http://www.nero.com
    00004 **
    00005 ** This program is free software; you can redistribute it and/or modify
    00006 ** it under the terms of the GNU General Public License as published by
    00007 ** the Free Software Foundation; either version 2 of the License, or
    00008 ** (at your option) any later version.
    00009 **
    00010 ** This program is distributed in the hope that it will be useful,
    00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013 ** GNU General Public License for more details.
    00014 **
    00015 ** You should have received a copy of the GNU General Public License
    00016 ** along with this program; if not, write to the Free Software
    00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018 **
    00019 ** Any non-GPL usage of this software or parts of this software is strictly
    00020 ** forbidden.
    00021 **
    00022 ** Software using this code must display the following message visibly in the
    00023 ** software:
    00024 ** "FAAD2 AAC/HE-AAC/HE-AACv2/DRM decoder (c) Ahead Software, www.nero.com"
    00025 ** in, for example, the about-box or help/startup screen.
    00026 **
    00027 ** Commercial non-GPL licensing of this software is possible.
    00028 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
    00029 **
    00030 ** $Id: drm_dec.h,v 1.1 2005/11/06 10:54:47 gabest Exp $
    00031 **/
    00032
    00033 #ifndef __DRM_DEC_H__
    00034 #define __DRM_DEC_H__
    00035
    00036 #ifdef __cplusplus
    00037 extern "C" {
    00038 #endif
    00039
    00040 #include "bits.h"
    00041
    00042 #define DRM_PARAMETRIC_STEREO    0
    00043 #define DRM_NUM_SA_BANDS         8
    00044 #define DRM_NUM_PAN_BANDS       20
    00045 #define NUM_OF_LINKS             3
    00046 #define NUM_OF_QMF_CHANNELS     64
    00047 #define NUM_OF_SUBSAMPLES       30
    00048 #define MAX_SA_BAND             46
    00049 #define MAX_PAN_BAND            64
    00050 #define MAX_DELAY                5
    00051
    00052 typedef struct
    00053 {
    00054     uint8_t drm_ps_data_available;
    00055     uint8_t bs_enable_sa;
    00056     uint8_t bs_enable_pan;
    00057
    00058     uint8_t bs_sa_dt_flag;
    00059     uint8_t bs_pan_dt_flag;
    00060
    00061     uint8_t g_last_had_sa;
    00062     uint8_t g_last_had_pan;
    00063
    00064     int8_t bs_sa_data[DRM_NUM_SA_BANDS];
    00065     int8_t bs_pan_data[DRM_NUM_PAN_BANDS];
    00066
    00067     int8_t g_sa_index[DRM_NUM_SA_BANDS];
    00068     int8_t g_pan_index[DRM_NUM_PAN_BANDS];
    00069     int8_t g_prev_sa_index[DRM_NUM_SA_BANDS];
    00070     int8_t g_prev_pan_index[DRM_NUM_PAN_BANDS];
    00071
    00072     int8_t sa_decode_error;
    00073     int8_t pan_decode_error;
    00074
    00075     int8_t g_last_good_sa_index[DRM_NUM_SA_BANDS];
    00076     int8_t g_last_good_pan_index[DRM_NUM_PAN_BANDS];
    00077
    00078     qmf_t SA[NUM_OF_SUBSAMPLES][MAX_SA_BAND];
    00079
    00080     complex_t d_buff[2][MAX_SA_BAND];
    00081     complex_t d2_buff[NUM_OF_LINKS][MAX_DELAY][MAX_SA_BAND];
    00082
    00083     uint8_t delay_buf_index_ser[NUM_OF_LINKS];
    00084
    00085     real_t prev_nrg[MAX_SA_BAND];
    00086     real_t prev_peakdiff[MAX_SA_BAND];
    00087     real_t peakdecay_fast[MAX_SA_BAND];
    00088 } drm_ps_info;
    00089
    00090
    00091 uint16_t drm_ps_data(drm_ps_info *ps, bitfile *ld);
    00092
    00093 drm_ps_info *drm_ps_init(void);
    00094 void drm_ps_free(drm_ps_info *ps);
    00095
    00096 uint8_t drm_ps_decode(drm_ps_info *ps, uint8_t guess, qmf_t X_left[38][64], qmf_t X_right[38][64]);
    00097
    00098 #ifdef __cplusplus
    00099 }
    00100 #endif
    00101 #endif
    00102