FFmpeg
Loading...
Searching...
No Matches
aacsbr.h
Go to the documentation of this file.
1/*
2 * AAC Spectral Band Replication function declarations
3 * Copyright (c) 2008-2009 Robert Swain ( rob opendot cl )
4 * Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23/**
24 * @file
25 * AAC Spectral Band Replication function declarations
26 * @author Robert Swain ( rob opendot cl )
27 */
28
29#ifndef AVCODEC_AACSBR_H
30#define AVCODEC_AACSBR_H
31
32#include "get_bits.h"
33#include "aac/aacdec.h"
34
36
37#define ENVELOPE_ADJUSTMENT_OFFSET 2
38#define NOISE_FLOOR_OFFSET 6
39
40/**
41 * SBR VLC tables
42 */
43enum {
54};
55
56/**
57 * bs_frame_class - frame class of current SBR frame (14496-3 sp04 p98)
58 */
59enum {
64};
65
66enum {
68};
69
71/** Initialize SBR. */
72void ff_aac_sbr_init(void);
74/**
75 * Allocate an ExtChannelElement (if necessary) and
76 * initialize the SBR context contained in it.
77 */
80
81/** Close the SBR context implicitly contained in a ChannelElement. */
84
85/** Decode one SBR element. */
87 GetBitContext *gb, int crc, int cnt, int id_aac,
88 int fl960);
90 GetBitContext *gb, int crc, int cnt, int id_aac,
91 int fl960);
92
93/** Due to channel allocation not being known upon SBR parameter transmission,
94 * supply the parameters separately.
95 * Functionally identical to ff_aac_sbr_decode_extension() */
98
99/** Decode frame SBR data, USAC. */
102 int sbr_ch, int indep_flag);
103
104/** Apply one SBR element to one AAC element. */
106 int id_aac, int fl960,
107 void /* float */ *L, void /* float */ *R);
109 int id_aac, int fl960,
110 void /* int */ *L, void /* int */ *R);
111
113
114#endif /* AVCODEC_AACSBR_H */
AAC decoder definitions and structures.
FF_VISIBILITY_PUSH_HIDDEN void ff_aac_sbr_init(void)
Initialize SBR.
int ff_aac_sbr_decode_extension_fixed(AACDecContext *ac, ChannelElement *che, GetBitContext *gb, int crc, int cnt, int id_aac, int fl960)
int ff_aac_sbr_decode_extension(AACDecContext *ac, ChannelElement *che, GetBitContext *gb, int crc, int cnt, int id_aac, int fl960)
Decode one SBR element.
@ EXTENSION_ID_PS
Definition aacsbr.h:67
int ff_aac_sbr_ctx_alloc_init_fixed(AACDecContext *ac, ChannelElement **che, int id_aac)
void ff_aac_sbr_ctx_close(ChannelElement *che)
Close the SBR context implicitly contained in a ChannelElement.
@ VARVAR
Definition aacsbr.h:63
@ VARFIX
Definition aacsbr.h:62
@ FIXVAR
Definition aacsbr.h:61
@ FIXFIX
Definition aacsbr.h:60
int ff_aac_sbr_config_usac(AACDecContext *ac, ChannelElement *che, AACUsacElemConfig *ue)
Due to channel allocation not being known upon SBR parameter transmission, supply the parameters sepa...
@ F_HUFFMAN_ENV_1_5DB
Definition aacsbr.h:45
@ F_HUFFMAN_ENV_BAL_3_0DB
Definition aacsbr.h:51
@ T_HUFFMAN_NOISE_3_0DB
Definition aacsbr.h:52
@ T_HUFFMAN_ENV_BAL_1_5DB
Definition aacsbr.h:46
@ F_HUFFMAN_ENV_3_0DB
Definition aacsbr.h:49
@ T_HUFFMAN_NOISE_BAL_3_0DB
Definition aacsbr.h:53
@ T_HUFFMAN_ENV_1_5DB
Definition aacsbr.h:44
@ T_HUFFMAN_ENV_3_0DB
Definition aacsbr.h:48
@ F_HUFFMAN_ENV_BAL_1_5DB
Definition aacsbr.h:47
@ T_HUFFMAN_ENV_BAL_3_0DB
Definition aacsbr.h:50
void ff_aac_sbr_apply(AACDecContext *ac, ChannelElement *che, int id_aac, int fl960, void *L, void *R)
Apply one SBR element to one AAC element.
int ff_aac_sbr_decode_usac_data(AACDecContext *ac, ChannelElement *che, AACUsacElemConfig *ue, GetBitContext *gb, int sbr_ch, int indep_flag)
Decode frame SBR data, USAC.
void ff_aac_sbr_ctx_close_fixed(ChannelElement *che)
void ff_aac_sbr_init_fixed(void)
int ff_aac_sbr_ctx_alloc_init(AACDecContext *ac, ChannelElement **che, int id_aac)
Allocate an ExtChannelElement (if necessary) and initialize the SBR context contained in it.
void ff_aac_sbr_apply_fixed(AACDecContext *ac, ChannelElement *che, int id_aac, int fl960, void *L, void *R)
#define L(x)
Definition vpx_arith.h:36
#define FF_VISIBILITY_PUSH_HIDDEN
#define FF_VISIBILITY_POP_HIDDEN
#define ue(name, range_min, range_max)
Definition cbs_h264.c:61
bitstream reader API header.
#define R
Definition huffyuv.h:44
main AAC decoding context
Definition aacdec.h:500
channel element - generic struct for SCE/CPE/CCE/LFE
Definition aacdec.h:296