annotate ffmpeg/libavcodec/aacps.h @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 /*
yading@10 2 * MPEG-4 Parametric Stereo definitions and declarations
yading@10 3 * Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
yading@10 4 *
yading@10 5 * This file is part of FFmpeg.
yading@10 6 *
yading@10 7 * FFmpeg is free software; you can redistribute it and/or
yading@10 8 * modify it under the terms of the GNU Lesser General Public
yading@10 9 * License as published by the Free Software Foundation; either
yading@10 10 * version 2.1 of the License, or (at your option) any later version.
yading@10 11 *
yading@10 12 * FFmpeg is distributed in the hope that it will be useful,
yading@10 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
yading@10 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
yading@10 15 * Lesser General Public License for more details.
yading@10 16 *
yading@10 17 * You should have received a copy of the GNU Lesser General Public
yading@10 18 * License along with FFmpeg; if not, write to the Free Software
yading@10 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yading@10 20 */
yading@10 21
yading@10 22 #ifndef AVCODEC_PS_H
yading@10 23 #define AVCODEC_PS_H
yading@10 24
yading@10 25 #include <stdint.h>
yading@10 26
yading@10 27 #include "aacpsdsp.h"
yading@10 28 #include "avcodec.h"
yading@10 29 #include "get_bits.h"
yading@10 30
yading@10 31 #define PS_MAX_NUM_ENV 5
yading@10 32 #define PS_MAX_NR_IIDICC 34
yading@10 33 #define PS_MAX_NR_IPDOPD 17
yading@10 34 #define PS_MAX_SSB 91
yading@10 35 #define PS_MAX_AP_BANDS 50
yading@10 36 #define PS_QMF_TIME_SLOTS 32
yading@10 37 #define PS_MAX_DELAY 14
yading@10 38 #define PS_AP_LINKS 3
yading@10 39 #define PS_MAX_AP_DELAY 5
yading@10 40
yading@10 41 typedef struct PSContext {
yading@10 42 int start;
yading@10 43 int enable_iid;
yading@10 44 int iid_quant;
yading@10 45 int nr_iid_par;
yading@10 46 int nr_ipdopd_par;
yading@10 47 int enable_icc;
yading@10 48 int icc_mode;
yading@10 49 int nr_icc_par;
yading@10 50 int enable_ext;
yading@10 51 int frame_class;
yading@10 52 int num_env_old;
yading@10 53 int num_env;
yading@10 54 int enable_ipdopd;
yading@10 55 int border_position[PS_MAX_NUM_ENV+1];
yading@10 56 int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Intensity Difference Parameters
yading@10 57 int8_t icc_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-Channel Coherence Parameters
yading@10 58 /* ipd/opd is iid/icc sized so that the same functions can handle both */
yading@10 59 int8_t ipd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Phase Difference Parameters
yading@10 60 int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Overall Phase Difference Parameters
yading@10 61 int is34bands;
yading@10 62 int is34bands_old;
yading@10 63
yading@10 64 DECLARE_ALIGNED(16, float, in_buf)[5][44][2];
yading@10 65 DECLARE_ALIGNED(16, float, delay)[PS_MAX_SSB][PS_QMF_TIME_SLOTS + PS_MAX_DELAY][2];
yading@10 66 DECLARE_ALIGNED(16, float, ap_delay)[PS_MAX_AP_BANDS][PS_AP_LINKS][PS_QMF_TIME_SLOTS + PS_MAX_AP_DELAY][2];
yading@10 67 DECLARE_ALIGNED(16, float, peak_decay_nrg)[34];
yading@10 68 DECLARE_ALIGNED(16, float, power_smooth)[34];
yading@10 69 DECLARE_ALIGNED(16, float, peak_decay_diff_smooth)[34];
yading@10 70 DECLARE_ALIGNED(16, float, H11)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
yading@10 71 DECLARE_ALIGNED(16, float, H12)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
yading@10 72 DECLARE_ALIGNED(16, float, H21)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
yading@10 73 DECLARE_ALIGNED(16, float, H22)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC];
yading@10 74 int8_t opd_hist[PS_MAX_NR_IIDICC];
yading@10 75 int8_t ipd_hist[PS_MAX_NR_IIDICC];
yading@10 76 PSDSPContext dsp;
yading@10 77 } PSContext;
yading@10 78
yading@10 79 void ff_ps_init(void);
yading@10 80 void ff_ps_ctx_init(PSContext *ps);
yading@10 81 int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int bits_left);
yading@10 82 int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64], float R[2][38][64], int top);
yading@10 83
yading@10 84 #endif /* AVCODEC_PS_H */