aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/amrwbdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-06 03:56:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-06 06:03:32 +0100
commitf095391a140ed3f379e1fb16605fac821c3e6660 (patch)
tree6b0be38bffb002457cba26183c57e56d5d464551 /libavcodec/amrwbdec.c
parent01606d10e600c4794d89490e731c321fb73a5141 (diff)
parent632eb1bbae473f7105e0ec6556cb040ea6d30910 (diff)
downloadffmpeg-f095391a140ed3f379e1fb16605fac821c3e6660.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits) cdxl demux: do not create packets with uninitialized data at EOF. Replace computations of remaining bits with calls to get_bits_left(). amrnb/amrwb: Remove get_bits usage. cosmetics: reindent avformat: do not require a pixel/sample format if there is no decoder avformat: do not fill-in audio packet duration in compute_pkt_fields() lavf: Use av_get_audio_frame_duration() in get_audio_frame_size() dca_parser: parse the sample rate and frame durations libspeexdec: do not set AVCodecContext.frame_size libopencore-amr: do not set AVCodecContext.frame_size alsdec: do not set AVCodecContext.frame_size siff: do not set AVCodecContext.frame_size amr demuxer: do not set AVCodecContext.frame_size. aiffdec: do not set AVCodecContext.frame_size mov: do not set AVCodecContext.frame_size ape: do not set AVCodecContext.frame_size. rdt: remove workaround for infinite loop with aac avformat: do not require frame_size in avformat_find_stream_info() for CELT avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3 avformat: do not require frame_size in avformat_find_stream_info() for AAC ... Conflicts: doc/APIchanges libavcodec/Makefile libavcodec/avcodec.h libavcodec/h264.c libavcodec/h264_ps.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/dsputil_mmx.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/amrwbdec.c')
-rw-r--r--libavcodec/amrwbdec.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 663fd0f2e9..e3570d3e63 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -27,7 +27,6 @@
#include "libavutil/lfg.h"
#include "avcodec.h"
-#include "get_bits.h"
#include "lsp.h"
#include "celp_math.h"
#include "celp_filters.h"
@@ -120,14 +119,9 @@ static av_cold int amrwb_decode_init(AVCodecContext *avctx)
*/
static int decode_mime_header(AMRWBContext *ctx, const uint8_t *buf)
{
- GetBitContext gb;
- init_get_bits(&gb, buf, 8);
-
/* Decode frame header (1st octet) */
- skip_bits(&gb, 1); // padding bit
- ctx->fr_cur_mode = get_bits(&gb, 4);
- ctx->fr_quality = get_bits1(&gb);
- skip_bits(&gb, 2); // padding bits
+ ctx->fr_cur_mode = buf[0] >> 3 & 0x0F;
+ ctx->fr_quality = (buf[0] & 0x4) != 0x4;
return 1;
}