summaryrefslogtreecommitdiff
path: root/libavcodec/dvaudiodec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-01-27 14:37:09 +0100
committerPaul B Mahol <onemda@gmail.com>2016-01-28 10:31:41 +0100
commit2edd47582b4db2b89b821d6e809d5a4671487b0e (patch)
treeec849b104845a3959b4252ed98aaff3050b7f107 /libavcodec/dvaudiodec.c
parent27f1ea5097da5aa3a3bffdc5f06e915a89f51c6a (diff)
downloadffmpeg-2edd47582b4db2b89b821d6e809d5a4671487b0e.tar.gz
avcodec: add dvaudio parser
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/dvaudiodec.c')
-rw-r--r--libavcodec/dvaudiodec.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/libavcodec/dvaudiodec.c b/libavcodec/dvaudiodec.c
index 0cbc2be48c..faa9e5fb34 100644
--- a/libavcodec/dvaudiodec.c
+++ b/libavcodec/dvaudiodec.c
@@ -21,6 +21,7 @@
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
+#include "dvaudio.h"
typedef struct DVAudioContext {
int block_size;
@@ -66,21 +67,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
}
-static inline int dv_get_audio_sample_count(const uint8_t *buffer, int dsf)
-{
- int samples = buffer[0] & 0x3f; /* samples in this frame - min samples */
-
- switch ((buffer[3] >> 3) & 0x07) {
- case 0:
- return samples + (dsf ? 1896 : 1580);
- case 1:
- return samples + (dsf ? 1742 : 1452);
- case 2:
- default:
- return samples + (dsf ? 1264 : 1053);
- }
-}
-
static inline uint16_t dv_audio_12to16(uint16_t sample)
{
uint16_t shift, result;