aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-08 15:53:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-08 15:54:18 +0100
commit3a7ef8dc44abe3b8f58cbf69acfd361287c12f2b (patch)
tree039f7c840093da78f566977fd6def1139ddb5839 /libavcodec
parent64e174e8b8975e36827a84c6d9adb6f161bc734f (diff)
parent57231e4d5b467833fb289439cd35a92513bb55c1 (diff)
downloadffmpeg-3a7ef8dc44abe3b8f58cbf69acfd361287c12f2b.tar.gz
Merge commit '57231e4d5b467833fb289439cd35a92513bb55c1'
* commit '57231e4d5b467833fb289439cd35a92513bb55c1': tak: demuxer, parser, and decoder Not merged as requested by Author and Maintainer of tak in FFmpeg. I just merged a few typo fixes and minor cosmetic improvments. Conflicts: Changelog libavcodec/Makefile libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/tak.c libavcodec/tak.h libavcodec/tak_parser.c libavcodec/takdec.c libavcodec/version.h libavformat/takdec.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h1
-rw-r--r--libavcodec/tak.c4
-rw-r--r--libavcodec/tak.h60
-rw-r--r--libavcodec/tak_parser.c2
-rw-r--r--libavcodec/utils.c1
5 files changed, 36 insertions, 32 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b6a4b0ec24..bbf3381694 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -433,6 +433,7 @@ enum AVCodecID {
AV_CODEC_ID_ILBC,
AV_CODEC_ID_OPUS_DEPRECATED,
AV_CODEC_ID_COMFORT_NOISE,
+ AV_CODEC_ID_TAK_DEPRECATED,
AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
AV_CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
diff --git a/libavcodec/tak.c b/libavcodec/tak.c
index e7fbf6bc54..616cbc80da 100644
--- a/libavcodec/tak.c
+++ b/libavcodec/tak.c
@@ -19,10 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "tak.h"
+#include "libavutil/bswap.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/bswap.h"
+#include "tak.h"
static const int64_t tak_channel_layouts[] = {
0,
diff --git a/libavcodec/tak.h b/libavcodec/tak.h
index cfa074defa..08af506d49 100644
--- a/libavcodec/tak.h
+++ b/libavcodec/tak.h
@@ -27,33 +27,35 @@
#ifndef AVCODEC_TAK_H
#define AVCODEC_TAK_H
+#include <stdint.h>
+
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "avcodec.h"
-#define TAK_FORMAT_DATA_TYPE_BITS 3
-#define TAK_FORMAT_SAMPLE_RATE_BITS 18
-#define TAK_FORMAT_BPS_BITS 5
-#define TAK_FORMAT_CHANNEL_BITS 4
-#define TAK_FORMAT_VALID_BITS 5
-#define TAK_FORMAT_CH_LAYOUT_BITS 6
-#define TAK_SIZE_FRAME_DURATION_BITS 4
-#define TAK_SIZE_SAMPLES_NUM_BITS 35
-#define TAK_LAST_FRAME_POS_BITS 40
-#define TAK_LAST_FRAME_SIZE_BITS 24
-#define TAK_ENCODER_CODEC_BITS 6
-#define TAK_ENCODER_PROFILE_BITS 4
-#define TAK_ENCODER_VERSION_BITS 24
-#define TAK_SAMPLE_RATE_MIN 6000
-#define TAK_CHANNELS_MIN 1
-#define TAK_BPS_MIN 8
-#define TAK_FRAME_HEADER_FLAGS_BITS 3
-#define TAK_FRAME_HEADER_SYNC_ID 0xA0FF
-#define TAK_FRAME_HEADER_SYNC_ID_BITS 16
-#define TAK_FRAME_HEADER_SAMPLE_COUNT_BITS 14
-#define TAK_FRAME_HEADER_NO_BITS 21
-#define TAK_FRAME_DURATION_QUANT_SHIFT 5
-#define TAK_CRC24_BITS 24
+#define TAK_FORMAT_DATA_TYPE_BITS 3
+#define TAK_FORMAT_SAMPLE_RATE_BITS 18
+#define TAK_FORMAT_BPS_BITS 5
+#define TAK_FORMAT_CHANNEL_BITS 4
+#define TAK_FORMAT_VALID_BITS 5
+#define TAK_FORMAT_CH_LAYOUT_BITS 6
+#define TAK_SIZE_FRAME_DURATION_BITS 4
+#define TAK_SIZE_SAMPLES_NUM_BITS 35
+#define TAK_LAST_FRAME_POS_BITS 40
+#define TAK_LAST_FRAME_SIZE_BITS 24
+#define TAK_ENCODER_CODEC_BITS 6
+#define TAK_ENCODER_PROFILE_BITS 4
+#define TAK_ENCODER_VERSION_BITS 24
+#define TAK_SAMPLE_RATE_MIN 6000
+#define TAK_CHANNELS_MIN 1
+#define TAK_BPS_MIN 8
+#define TAK_FRAME_HEADER_FLAGS_BITS 3
+#define TAK_FRAME_HEADER_SYNC_ID 0xA0FF
+#define TAK_FRAME_HEADER_SYNC_ID_BITS 16
+#define TAK_FRAME_HEADER_SAMPLE_COUNT_BITS 14
+#define TAK_FRAME_HEADER_NO_BITS 21
+#define TAK_FRAME_DURATION_QUANT_SHIFT 5
+#define TAK_CRC24_BITS 24
#define TAK_MAX_CHANNELS ( 1 << TAK_FORMAT_CHANNEL_BITS )
@@ -132,17 +134,17 @@ void ff_tak_init_crc(void);
int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size);
/**
- * Parse the Streaminfo metadata block
- * @param[in] gb pointer to GetBitContext
- * @param[out] s where parsed information is stored
+ * Parse the Streaminfo metadata block.
+ * @param[in] gb pointer to GetBitContext
+ * @param[out] s storage for parsed information
*/
void avpriv_tak_parse_streaminfo(GetBitContext *gb, TAKStreamInfo *s);
/**
* Validate and decode a frame header.
- * @param avctx AVCodecContext to use as av_log() context
- * @param[in] gb GetBitContext from which to read frame header
- * @param[out] s frame information
+ * @param avctx AVCodecContext to use as av_log() context
+ * @param[in] gb GetBitContext from which to read frame header
+ * @param[out] s frame information
* @param log_level_offset log level offset. can be used to silence error messages.
* @return non-zero on error, 0 if ok
*/
diff --git a/libavcodec/tak_parser.c b/libavcodec/tak_parser.c
index 55766a4d78..94609f00ba 100644
--- a/libavcodec/tak_parser.c
+++ b/libavcodec/tak_parser.c
@@ -30,7 +30,7 @@
typedef struct TAKParseContext {
ParseContext pc;
TAKStreamInfo ti;
- int index;
+ int index;
} TAKParseContext;
static av_cold int tak_init(AVCodecParserContext *s)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3d33f85d97..d7b3f18cb1 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1917,6 +1917,7 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
//last major bump but will fill up again over time, please don't remove it
// case AV_CODEC_ID_UTVIDEO_DEPRECATED: return AV_CODEC_ID_UTVIDEO;
case AV_CODEC_ID_OPUS_DEPRECATED: return AV_CODEC_ID_OPUS;
+ case AV_CODEC_ID_TAK_DEPRECATED : return AV_CODEC_ID_TAK;
default : return id;
}
}