diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-02 22:59:04 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-02 22:59:04 +0000 |
commit | 228ca70d485e2660c2e381d7112cbcca65c156a0 (patch) | |
tree | f7ab4303f2daa68c76271787a60d50cb1ada2e46 /libfaad2/sbr_dec.h | |
parent | eb1dee5cbf86fba8d5081bae6071cc4a4fd68306 (diff) | |
download | mpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.bz2 mpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.xz |
update to the 2.0 release of faad, patch by adland
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12528 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/sbr_dec.h')
-rw-r--r-- | libfaad2/sbr_dec.h | 56 |
1 files changed, 42 insertions, 14 deletions
diff --git a/libfaad2/sbr_dec.h b/libfaad2/sbr_dec.h index 4d4f4bc217..68a23e1394 100644 --- a/libfaad2/sbr_dec.h +++ b/libfaad2/sbr_dec.h @@ -1,6 +1,6 @@ /* ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding -** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com +** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -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.7 2003/09/25 12:04:31 menno Exp $ +** $Id: sbr_dec.h,v 1.2 2003/10/03 22:22:27 alex Exp $ **/ #ifndef __SBR_DEC_H__ @@ -32,6 +32,18 @@ extern "C" { #endif +#ifdef PS_DEC +#include "ps_dec.h" +#endif +#ifdef DRM_PS +#include "drm_dec.h" +#endif + +/* MAX_NTSRHFG: maximum of number_time_slots * rate + HFGen. 16*2+8 */ +#define MAX_NTSRHFG 40 +#define MAX_NTSR 32 /* max number_time_slots * rate, ok for DRM and not DRM mode */ + + typedef struct { real_t *x; uint8_t channels; @@ -41,6 +53,9 @@ typedef struct { real_t *v[2]; uint8_t v_index; uint8_t channels; +#ifdef USE_SSE + void (*qmf_func)(void *a, void *b, void *c, void *d); +#endif } qmfs_info; typedef struct @@ -49,6 +64,7 @@ typedef struct uint8_t rate; uint8_t just_seeked; + uint8_t ret; uint8_t amp_res[2]; @@ -131,28 +147,34 @@ typedef struct uint32_t frame; uint32_t header_count; - uint8_t *data; - uint16_t data_size; - uint8_t id_aac; qmfa_info *qmfa[2]; qmfs_info *qmfs[2]; - qmf_t *Xsbr[2]; - qmf_t *Xcodec[2]; + qmf_t Xsbr[2][MAX_NTSRHFG][64]; + qmf_t Xcodec[2][MAX_NTSRHFG][32]; #ifdef DRM int8_t lcstereo_flag; uint8_t bs_dataextra; - uint16_t data_size_bits; uint8_t Is_DRM_SBR; +#ifdef DRM_PS + drm_ps_info drm_ps; +#endif #endif - uint16_t numTimeSlotsRate; - uint16_t numTimeSlots; + uint8_t numTimeSlotsRate; + uint8_t numTimeSlots; uint8_t tHFGen; uint8_t tHFAdj; +#ifdef PS_DEC + ps_info ps; +#endif +#if (defined(PS_DEC) || defined(DRM_PS)) + uint8_t ps_used; +#endif + /* to get it compiling */ /* we'll see during the coding of all the tools, whether these are all used or not. @@ -192,16 +214,22 @@ typedef struct uint8_t bs_df_noise[2][3]; } sbr_info; -sbr_info *sbrDecodeInit(uint16_t framelength +sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac, + uint32_t sample_rate #ifdef DRM , uint8_t IsDRM #endif ); void sbrDecodeEnd(sbr_info *sbr); -void sbrDecodeFrame(sbr_info *sbr, real_t *left_channel, - real_t *right_channel, uint8_t id_aac, - uint8_t just_seeked, uint8_t upsample_only); +uint8_t sbrDecodeCoupleFrame(sbr_info *sbr, real_t *left_chan, real_t *right_chan, + const uint8_t just_seeked, const uint8_t upsample_only); +uint8_t sbrDecodeSingleFrame(sbr_info *sbr, real_t *channel, + const uint8_t just_seeked, const uint8_t upsample_only); +#if (defined(PS_DEC) || defined(DRM_PS)) +uint8_t sbrDecodeSingleFramePS(sbr_info *sbr, real_t *left_channel, real_t *right_channel, + const uint8_t just_seeked, const uint8_t upsample_only); +#endif #ifdef __cplusplus |