summaryrefslogtreecommitdiffstats
path: root/libavcodec/wma.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/wma.h')
-rw-r--r--libavcodec/wma.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index 80b8286..325f03c 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -1,21 +1,21 @@
/*
* WMA compatible codec
- * Copyright (c) 2002-2007 The Libav Project
+ * Copyright (c) 2002-2007 The FFmpeg Project
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -25,10 +25,9 @@
#include "libavutil/float_dsp.h"
#include "avcodec.h"
-#include "bitstream.h"
#include "fft.h"
+#include "get_bits.h"
#include "put_bits.h"
-#include "vlc.h"
/* size of blocks */
#define BLOCK_MIN_BITS 7
@@ -43,7 +42,7 @@
#define NB_LSP_COEFS 10
/* XXX: is it a suitable value ? */
-#define MAX_CODED_SUPERFRAME_SIZE 16384
+#define MAX_CODED_SUPERFRAME_SIZE 32768
#define MAX_CHANNELS 2
@@ -67,7 +66,7 @@ typedef struct CoefVLCTable {
typedef struct WMACodecContext {
AVCodecContext *avctx;
- BitstreamContext bc;
+ GetBitContext gb;
PutBitContext pb;
int version; ///< 1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
int use_bit_reservoir;
@@ -117,7 +116,7 @@ typedef struct WMACodecContext {
DECLARE_ALIGNED(32, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE];
DECLARE_ALIGNED(32, FFTSample, output)[BLOCK_MAX_SIZE * 2];
FFTContext mdct_ctx[BLOCK_NB_SIZES];
- float *windows[BLOCK_NB_SIZES];
+ const float *windows[BLOCK_NB_SIZES];
/* output buffer for one frame and the last for IMDCT windowing */
DECLARE_ALIGNED(32, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2];
/* last frame info */
@@ -132,7 +131,7 @@ typedef struct WMACodecContext {
float lsp_pow_e_table[256];
float lsp_pow_m_table1[(1 << LSP_POW_BITS)];
float lsp_pow_m_table2[(1 << LSP_POW_BITS)];
- AVFloatDSPContext fdsp;
+ AVFloatDSPContext *fdsp;
#ifdef TRACE
int frame_count;
@@ -145,11 +144,13 @@ extern const float ff_wma_lsp_codebook[NB_LSP_COEFS][16];
extern const uint32_t ff_aac_scalefactor_code[121];
extern const uint8_t ff_aac_scalefactor_bits[121];
+av_warn_unused_result
int ff_wma_init(AVCodecContext *avctx, int flags2);
+
int ff_wma_total_gain_to_bits(int total_gain);
int ff_wma_end(AVCodecContext *avctx);
-unsigned int ff_wma_get_large_val(BitstreamContext *bc);
-int ff_wma_run_level_decode(AVCodecContext *avctx, BitstreamContext *bc,
+unsigned int ff_wma_get_large_val(GetBitContext *gb);
+int ff_wma_run_level_decode(AVCodecContext *avctx, GetBitContext *gb,
VLC *vlc, const float *level_table,
const uint16_t *run_table, int version,
WMACoef *ptr, int offset, int num_coefs,
OpenPOWER on IntegriCloud