/*1* AAC encoder intensity stereo2* Copyright (C) 2015 Rostislav Pehlivanov3*4* This file is part of FFmpeg.5*6* FFmpeg is free software; you can redistribute it and/or7* modify it under the terms of the GNU Lesser General Public8* License as published by the Free Software Foundation; either9* version 2.1 of the License, or (at your option) any later version.10*11* FFmpeg is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14* Lesser General Public License for more details.15*16* You should have received a copy of the GNU Lesser General Public17* License along with FFmpeg; if not, write to the Free Software18* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA19*/2021/**22* @file23* AAC encoder Intensity Stereo24* @author Rostislav Pehlivanov ( atomnuker gmail com )25*/2627#ifndef AVCODEC_AACENC_IS_H28#define AVCODEC_AACENC_IS_H2930#include "aacenc.h"3132/** Frequency in Hz for lower limit of intensity stereo **/33#define INT_STEREO_LOW_LIMIT 61003435struct AACISError {36int pass; /* 1 if dist2 <= dist1 */37int phase; /* -1 or +1 */38float error; /* fabs(dist1 - dist2) */39float dist1; /* From original coeffs */40float dist2; /* From IS'd coeffs */41float ener01;42};4344struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe,45int start, int w, int g, float ener0,46float ener1, float ener01,47int use_pcoeffs, int phase);48void ff_aac_search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe);4950#endif /* AVCODEC_AACENC_IS_H */515253