aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-26 01:12:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-26 01:12:08 +0100
commit022f8d27dd0a61bfaae729d53d133b17418ea16b (patch)
tree351bff9edab8404f7850ee05a238c50e6364e19b
parenta11eeb921571b23d1c988f9a2ddda109792948a6 (diff)
parentf32dfad9dc64acf0fd1bb867e127a9efe6380676 (diff)
downloadffmpeg-022f8d27dd0a61bfaae729d53d133b17418ea16b.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: swscale: Readd #define _SVID_SOURCE Fix av_get_channel_layout_string() for positions >31 configure: Store vda lib flags in extralibs instead of ldflags Make channel layout masks unsigned dca: ARMv6 optimised decode_blockcode() nullenc: drop AVFMT_RAWPICTURE from the flags frame-mt: return consumed packet size in ff_thread_decode_frame aacdec: add more fate tests covering SBR and PS MK(BE)TAG: avoid undefined shifts Conflicts: configure libavcodec/arm/dca.h libavcodec/dca.c libavcodec/mlp_parser.c libavcodec/version.h libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/defaults.c libavutil/audioconvert.c libavutil/avutil.h libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/aac_ac3_parser.h2
-rw-r--r--libavcodec/aacdectab.h2
-rw-r--r--libavcodec/ac3.h2
-rw-r--r--libavcodec/ac3enc.c6
-rw-r--r--libavcodec/ac3enc.h2
-rw-r--r--libavcodec/arm/dca.h70
-rw-r--r--libavcodec/audioconvert.c2
-rw-r--r--libavcodec/audioconvert.h2
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/dca.c29
-rw-r--r--libavcodec/mlp_parser.c2
-rw-r--r--libavcodec/mlp_parser.h2
-rw-r--r--libavcodec/pthread.c5
-rw-r--r--libavcodec/thread.h3
-rw-r--r--libavcodec/version.h2
-rw-r--r--libavcodec/vorbis.h2
-rw-r--r--libavcodec/vorbis_data.c2
-rw-r--r--libavdevice/alsa-audio-common.c4
-rw-r--r--libavfilter/asrc_anullsrc.c2
-rw-r--r--libavfilter/avfilter.c2
-rw-r--r--libavfilter/avfilter.h9
-rw-r--r--libavformat/nullenc.c2
-rw-r--r--libavutil/audioconvert.c12
-rw-r--r--libavutil/audioconvert.h8
-rw-r--r--libavutil/avutil.h2
-rw-r--r--libavutil/common.h4
-rw-r--r--tests/fate/aac.mak13
28 files changed, 119 insertions, 82 deletions
diff --git a/configure b/configure
index 3fccf063e7..dccf63c6cf 100755
--- a/configure
+++ b/configure
@@ -2999,7 +2999,7 @@ disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
if ! disabled vda; then
if check_header VideoDecodeAcceleration/VDADecoder.h; then
enable vda
- add_ldflags -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
+ add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
fi
fi
diff --git a/libavcodec/aac_ac3_parser.h b/libavcodec/aac_ac3_parser.h
index ccc387d3aa..b1fb0cf59f 100644
--- a/libavcodec/aac_ac3_parser.h
+++ b/libavcodec/aac_ac3_parser.h
@@ -48,7 +48,7 @@ typedef struct AACAC3ParseContext {
int sample_rate;
int bit_rate;
int samples;
- int64_t channel_layout;
+ uint64_t channel_layout;
int service_type;
int remaining_size;
diff --git a/libavcodec/aacdectab.h b/libavcodec/aacdectab.h
index 22ae00ff32..442ef91654 100644
--- a/libavcodec/aacdectab.h
+++ b/libavcodec/aacdectab.h
@@ -90,7 +90,7 @@ static const uint8_t aac_channel_layout_map[7][5][2] = {
{ { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, },
};
-static const int64_t aac_channel_layout[8] = {
+static const uint64_t aac_channel_layout[8] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_SURROUND,
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index d53527844c..b9f34b9d90 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -120,7 +120,7 @@ typedef struct {
uint32_t bit_rate;
uint8_t channels;
uint16_t frame_size;
- int64_t channel_layout;
+ uint64_t channel_layout;
/** @} */
} AC3HeaderInfo;
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 3657ece1e0..93a08821be 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -77,7 +77,7 @@ static uint8_t exponent_group_tab[2][3][256];
/**
* List of supported channel layouts.
*/
-const int64_t ff_ac3_channel_layouts[19] = {
+const uint64_t ff_ac3_channel_layouts[19] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_2_1,
@@ -2060,13 +2060,13 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
* Set channel information during initialization.
*/
static av_cold int set_channel_info(AC3EncodeContext *s, int channels,
- int64_t *channel_layout)
+ uint64_t *channel_layout)
{
int ch_layout;
if (channels < 1 || channels > AC3_MAX_CHANNELS)
return AVERROR(EINVAL);
- if ((uint64_t)*channel_layout > 0x7FF)
+ if (*channel_layout > 0x7FF)
return AVERROR(EINVAL);
ch_layout = *channel_layout;
if (!ch_layout)
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index 4a017498f6..6ef1a5373a 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -258,7 +258,7 @@ typedef struct AC3EncodeContext {
} AC3EncodeContext;
-extern const int64_t ff_ac3_channel_layouts[19];
+extern const uint64_t ff_ac3_channel_layouts[19];
int ff_ac3_encode_init(AVCodecContext *avctx);
diff --git a/libavcodec/arm/dca.h b/libavcodec/arm/dca.h
index e85b82c1bd..9ff7f7c75e 100644
--- a/libavcodec/arm/dca.h
+++ b/libavcodec/arm/dca.h
@@ -27,38 +27,54 @@
#if HAVE_ARMV6 && HAVE_INLINE_ASM
-#define decode_blockcode decode_blockcode
-static inline int decode_blockcode(int code, int levels, int *values)
+#define decode_blockcodes decode_blockcodes
+static inline int decode_blockcodes(int code1, int code2, int levels,
+ int *values)
{
- int v0, v1, v2, v3;
+ int v0, v1, v2, v3, v4, v5;
- __asm__ ("smmul %4, %8, %11 \n"
- "smlabb %8, %4, %10, %8 \n"
- "smmul %5, %4, %11 \n"
- "sub %8, %8, %9, lsr #1 \n"
- "smlabb %4, %5, %10, %4 \n"
- "smmul %6, %5, %11 \n"
- "str %8, %0 \n"
- "sub %4, %4, %9, lsr #1 \n"
- "smlabb %5, %6, %10, %5 \n"
- "smmul %7, %6, %11 \n"
- "str %4, %1 \n"
- "sub %5, %5, %9, lsr #1 \n"
- "smlabb %6, %7, %10, %6 \n"
- "cmp %7, #0 \n"
- "str %5, %2 \n"
- "sub %6, %6, %9, lsr #1 \n"
- "it eq \n"
- "mvneq %7, #0 \n"
- "str %6, %3 \n"
+ __asm__ ("smmul %8, %14, %18 \n"
+ "smmul %11, %15, %18 \n"
+ "smlabb %14, %8, %17, %14 \n"
+ "smlabb %15, %11, %17, %15 \n"
+ "smmul %9, %8, %18 \n"
+ "smmul %12, %11, %18 \n"
+ "sub %14, %14, %16, lsr #1 \n"
+ "sub %15, %15, %16, lsr #1 \n"
+ "smlabb %8, %9, %17, %8 \n"
+ "smlabb %11, %12, %17, %11 \n"
+ "smmul %10, %9, %18 \n"
+ "smmul %13, %12, %18 \n"
+ "str %14, %0 \n"
+ "str %15, %4 \n"
+ "sub %8, %8, %16, lsr #1 \n"
+ "sub %11, %11, %16, lsr #1 \n"
+ "smlabb %9, %10, %17, %9 \n"
+ "smlabb %12, %13, %17, %12 \n"
+ "smmul %14, %10, %18 \n"
+ "smmul %15, %13, %18 \n"
+ "str %8, %1 \n"
+ "str %11, %5 \n"
+ "sub %9, %9, %16, lsr #1 \n"
+ "sub %12, %12, %16, lsr #1 \n"
+ "smlabb %10, %14, %17, %10 \n"
+ "smlabb %13, %15, %17, %13 \n"
+ "str %9, %2 \n"
+ "str %12, %6 \n"
+ "sub %10, %10, %16, lsr #1 \n"
+ "sub %13, %13, %16, lsr #1 \n"
+ "str %10, %3 \n"
+ "str %13, %7 \n"
: "=m"(values[0]), "=m"(values[1]),
"=m"(values[2]), "=m"(values[3]),
- "=&r"(v0), "=&r"(v1), "=&r"(v2), "=&r"(v3),
- "+&r"(code)
- : "r"(levels - 1), "r"(-levels), "r"(ff_inverse[levels])
- : "cc");
+ "=m"(values[4]), "=m"(values[5]),
+ "=m"(values[6]), "=m"(values[7]),
+ "=&r"(v0), "=&r"(v1), "=&r"(v2),
+ "=&r"(v3), "=&r"(v4), "=&r"(v5),
+ "+&r"(code1), "+&r"(code2)
+ : "r"(levels - 1), "r"(-levels), "r"(ff_inverse[levels]));
- return v3;
+ return code1 | code2;
}
#endif
diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c
index e101095e40..c48fbb74c5 100644
--- a/libavcodec/audioconvert.c
+++ b/libavcodec/audioconvert.c
@@ -48,7 +48,7 @@ void avcodec_sample_fmt_string (char *buf, int buf_size, int sample_fmt)
}
#endif
-int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
+uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
{
switch(nb_channels) {
case 1: return AV_CH_LAYOUT_MONO;
diff --git a/libavcodec/audioconvert.h b/libavcodec/audioconvert.h
index 5f38cca513..7d8278fd47 100644
--- a/libavcodec/audioconvert.h
+++ b/libavcodec/audioconvert.h
@@ -80,7 +80,7 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout);
* @param fmt_name Format name, or NULL if unknown
* @return Channel layout mask
*/
-int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
+uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
struct AVAudioConvert;
typedef struct AVAudioConvert AVAudioConvert;
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 18e16ff584..2fb200f047 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2758,14 +2758,14 @@ typedef struct AVCodecContext {
* - encoding: set by user.
* - decoding: set by user, may be overwritten by libavcodec.
*/
- int64_t channel_layout;
+ uint64_t channel_layout;
/**
* Request decoder to use this channel layout if it can (0 for default)
* - encoding: unused
* - decoding: Set by user.
*/
- int64_t request_channel_layout;
+ uint64_t request_channel_layout;
/**
* Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
@@ -3122,7 +3122,7 @@ typedef struct AVCodec {
const char *long_name;
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
- const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
+ const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 37977e5c55..07a9c0a484 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -128,7 +128,7 @@ static const int dca_ext_audio_descr_mask[] = {
* All 2 channel configurations -> AV_CH_LAYOUT_STEREO
*/
-static const int64_t dca_core_channel_layout[] = {
+static const uint64_t dca_core_channel_layout[] = {
AV_CH_FRONT_CENTER, ///< 1, A
AV_CH_LAYOUT_STEREO, ///< 2, A + B (dual mono)
AV_CH_LAYOUT_STEREO, ///< 2, L + R (stereo)
@@ -1037,7 +1037,7 @@ static void dca_downmix(float *samples, int srcfmt,
}
-#ifndef decode_blockcode
+#ifndef decode_blockcodes
/* Very compact version of the block code decoder that does not use table
* look-up but is slightly slower */
static int decode_blockcode(int code, int levels, int *values)
@@ -1051,12 +1051,13 @@ static int decode_blockcode(int code, int levels, int *values)
code = div;
}
- if (code == 0)
- return 0;
- else {
- av_log(NULL, AV_LOG_ERROR, "ERROR: block code look-up failed\n");
- return AVERROR_INVALIDDATA;
- }
+ return code;
+}
+
+static int decode_blockcodes(int code1, int code2, int levels, int *values)
+{
+ return decode_blockcode(code1, levels, values) |
+ decode_blockcode(code2, levels, values + 4);
}
#endif
@@ -1126,16 +1127,20 @@ static int dca_subsubframe(DCAContext * s, int base_channel, int block_index)
if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table){
if (abits <= 7){
/* Block code */
- int block_code1, block_code2, size, levels;
+ int block_code1, block_code2, size, levels, err;
size = abits_sizes[abits-1];
levels = abits_levels[abits-1];
block_code1 = get_bits(&s->gb, size);
- /* FIXME Should test return value */
- decode_blockcode(block_code1, levels, block);
block_code2 = get_bits(&s->gb, size);
- decode_blockcode(block_code2, levels, &block[4]);
+ err = decode_blockcodes(block_code1, block_code2,
+ levels, block);
+ if (err) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "ERROR: block code look-up failed\n");
+ return AVERROR_INVALIDDATA;
+ }
}else{
/* no coding */
for (m = 0; m < 8; m++)
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 151841a103..0c06dbbab4 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -107,7 +107,7 @@ static int truehd_channels(int chanmap)
return channels;
}
-int64_t ff_truehd_layout(int chanmap)
+uint64_t ff_truehd_layout(int chanmap)
{
int layout = 0, i;
diff --git a/libavcodec/mlp_parser.h b/libavcodec/mlp_parser.h
index 6e43bc38dc..3b81763d57 100644
--- a/libavcodec/mlp_parser.h
+++ b/libavcodec/mlp_parser.h
@@ -54,7 +54,7 @@ typedef struct MLPHeaderInfo
int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb);
-int64_t ff_truehd_layout(int chanmap);
+uint64_t ff_truehd_layout(int chanmap);
extern const uint64_t ff_mlp_layout[32];
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 83ecaad069..eb304720e4 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -525,7 +525,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
*got_picture_ptr=0;
- return 0;
+ return avpkt->size;
}
/*
@@ -566,7 +566,8 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
fctx->next_finished = finished;
- return p->result;
+ /* return the size of the consumed packet if no error occurred */
+ return (p->result >= 0) ? avpkt->size : p->result;
}
void ff_thread_report_progress(AVFrame *f, int n, int field)
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 9cfb31d5a1..1c5ffe7a73 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -42,6 +42,9 @@ void ff_thread_flush(AVCodecContext *avctx);
* Submits a new frame to a decoding thread.
* Returns the next available frame in picture. *got_picture_ptr
* will be 0 if none is available.
+ * The return value on success is the size of the consumed packet for
+ * compatiblity with avcodec_decode_video2(). This means the decoder
+ * has to consume the full packet.
*
* Parameters are the same as avcodec_decode_video2().
*/
diff --git a/libavcodec/version.h b/libavcodec/version.h
index f3de82b193..98eb48086c 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -22,7 +22,7 @@
#define LIBAVCODEC_VERSION_MAJOR 53
#define LIBAVCODEC_VERSION_MINOR 37
-#define LIBAVCODEC_VERSION_MICRO 0
+#define LIBAVCODEC_VERSION_MICRO 1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index 15b5d85b36..cad080ef3a 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -27,7 +27,7 @@ extern const float ff_vorbis_floor1_inverse_db_table[256];
extern const float * const ff_vorbis_vwin[8];
extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8];
-extern const int64_t ff_vorbis_channel_layouts[9];
+extern const uint64_t ff_vorbis_channel_layouts[9];
typedef struct {
uint16_t x;
diff --git a/libavcodec/vorbis_data.c b/libavcodec/vorbis_data.c
index 8fa624168a..aab06b7453 100644
--- a/libavcodec/vorbis_data.c
+++ b/libavcodec/vorbis_data.c
@@ -44,7 +44,7 @@ const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = {
{ 0, 2, 1, 6, 7, 4, 5, 3 },
};
-const int64_t ff_vorbis_channel_layouts[9] = {
+const uint64_t ff_vorbis_channel_layouts[9] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_SURROUND,
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index 1ed7b6ed5e..cb7ba6654f 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -143,7 +143,7 @@ switch(format) {\
case FORMAT_F32: s->reorder_func = alsa_reorder_f32_out_ ##layout; break;\
}
-static av_cold int find_reorder_func(AlsaData *s, int codec_id, int64_t layout, int out)
+static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, int out)
{
int format;
@@ -194,7 +194,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
snd_pcm_t *h;
snd_pcm_hw_params_t *hw_params;
snd_pcm_uframes_t buffer_size, period_size;
- int64_t layout = ctx->streams[0]->codec->channel_layout;
+ uint64_t layout = ctx->streams[0]->codec->channel_layout;
if (ctx->filename[0] == 0) audio_device = "default";
else audio_device = ctx->filename;
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 1bcc3eb9a6..288e2bf910 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -30,7 +30,7 @@
typedef struct {
const AVClass *class;
char *channel_layout_str;
- int64_t channel_layout;
+ uint64_t channel_layout;
char *sample_rate_str;
int sample_rate;
int nb_samples; ///< number of samples per requested frame
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index fa316a670c..5327cf9b69 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -473,7 +473,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link,
AVFilterBufferRef *
avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
int nb_samples, enum AVSampleFormat sample_fmt,
- int64_t channel_layout, int planar)
+ uint64_t channel_layout, int planar)
{
AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer));
AVFilterBufferRef *samplesref = av_mallocz(sizeof(AVFilterBufferRef));
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 5e1cfdba78..d3afc35ebe 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 49
-#define LIBAVFILTER_VERSION_MICRO 0
+#define LIBAVFILTER_VERSION_MICRO 1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
@@ -110,7 +110,7 @@ typedef struct AVFilterBuffer {
* per reference properties must be separated out.
*/
typedef struct AVFilterBufferRefAudioProps {
- int64_t channel_layout; ///< channel layout of audio buffer
+ uint64_t channel_layout; ///< channel layout of audio buffer
int nb_samples; ///< number of audio samples per channel
int sample_rate; ///< audio buffer sample rate
int planar; ///< audio buffer - planar or packed
@@ -641,7 +641,7 @@ struct AVFilterLink {
int h; ///< agreed upon image height
AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
/* These parameters apply only to audio */
- int64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h)
+ uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h)
#if LIBAVFILTER_VERSION_MAJOR < 3
int64_t sample_rate; ///< samples per second
#else
@@ -772,8 +772,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,
AVFilterBufferRef *
avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
int nb_samples, enum AVSampleFormat sample_fmt,
- int64_t channel_layout, int planar);
-
+ uint64_t channel_layout, int planar);
/**
* Request an input frame from the filter at the other end of the link.
*
diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c
index 2ab92dff75..3f4107923f 100644
--- a/libavformat/nullenc.c
+++ b/libavformat/nullenc.c
@@ -32,5 +32,5 @@ AVOutputFormat ff_null_muxer = {
.audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
.video_codec = CODEC_ID_RAWVIDEO,
.write_packet = null_write_packet,
- .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS,
+ .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS,
};
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 30f6074e2a..c4cab22fce 100644
--- a/libavutil/audioconvert.c
+++ b/libavutil/audioconvert.c
@@ -60,7 +60,7 @@ static const char *get_channel_name(int channel_id)
static const struct {
const char *name;
int nb_channels;
- int64_t layout;
+ uint64_t layout;
} channel_layout_map[] = {
{ "mono", 1, AV_CH_LAYOUT_MONO },
{ "stereo", 2, AV_CH_LAYOUT_STEREO },
@@ -76,7 +76,7 @@ static const struct {
{ 0 }
};
-static int64_t get_channel_layout_single(const char *name, int name_len)
+static uint64_t get_channel_layout_single(const char *name, int name_len)
{
int i;
char *end;
@@ -102,7 +102,7 @@ static int64_t get_channel_layout_single(const char *name, int name_len)
return 0;
}
-int64_t av_get_channel_layout(const char *name)
+uint64_t av_get_channel_layout(const char *name)
{
const char *n, *e;
const char *name_end = name + strlen(name);
@@ -119,7 +119,7 @@ int64_t av_get_channel_layout(const char *name)
}
void av_get_channel_layout_string(char *buf, int buf_size,
- int nb_channels, int64_t channel_layout)
+ int nb_channels, uint64_t channel_layout)
{
int i;
@@ -138,7 +138,7 @@ void av_get_channel_layout_string(char *buf, int buf_size,
int i, ch;
av_strlcat(buf, " (", buf_size);
for (i = 0, ch = 0; i < 64; i++) {
- if ((channel_layout & (1L << i))) {
+ if ((channel_layout & (UINT64_C(1) << i))) {
const char *name = get_channel_name(i);
if (name) {
if (ch > 0)
@@ -152,7 +152,7 @@ void av_get_channel_layout_string(char *buf, int buf_size,
}
}
-int av_get_channel_layout_nb_channels(int64_t channel_layout)
+int av_get_channel_layout_nb_channels(uint64_t channel_layout)
{
int count;
uint64_t x = channel_layout;
diff --git a/libavutil/audioconvert.h b/libavutil/audioconvert.h
index 766ef8b9da..d0232d2aa3 100644
--- a/libavutil/audioconvert.h
+++ b/libavutil/audioconvert.h
@@ -62,7 +62,7 @@
/** Channel mask value used for AVCodecContext.request_channel_layout
to indicate that the user requests the channel order of the decoder output
to be the native codec channel order. */
-#define AV_CH_LAYOUT_NATIVE 0x8000000000000000LL
+#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
/**
* @}
@@ -104,7 +104,7 @@
* AV_CH_* macros).
+ Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
*/
-int64_t av_get_channel_layout(const char *name);
+uint64_t av_get_channel_layout(const char *name);
/**
* Return a description of a channel layout.
@@ -113,12 +113,12 @@ int64_t av_get_channel_layout(const char *name);
* @param buf put here the string containing the channel layout
* @param buf_size size in bytes of the buffer
*/
-void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout);
+void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
/**
* Return the number of channels in the channel layout.
*/
-int av_get_channel_layout_nb_channels(int64_t channel_layout);
+int av_get_channel_layout_nb_channels(uint64_t channel_layout);
/**
* Return default channel layout for a given number of channels.
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index a09fe9417b..30fae0aa93 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -154,7 +154,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 29
-#define LIBAVUTIL_VERSION_MICRO 0
+#define LIBAVUTIL_VERSION_MICRO 1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
diff --git a/libavutil/common.h b/libavutil/common.h
index d60e8638a5..cf361ca15e 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -220,8 +220,8 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
return (x + (x >> 16)) & 0x3F;
}
-#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
-#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
+#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
+#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
/**
* Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
index 8c805575f3..547e35606d 100644
--- a/tests/fate/aac.mak
+++ b/tests/fate/aac.mak
@@ -38,6 +38,19 @@ FATE_AAC += fate-aac-ap05_48
fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4
fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
+fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
+fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
+
+FATE_AAC_CT = sbr_bc-ps_i.3gp \
+ sbr_bic-ps_i.3gp \
+ sbr_i-ps_i.aac \
+ sbr_bc-ps_bc.mp4 \
+ sbr_bc-ps_i.mp4 \
+ sbr_i-ps_bic.mp4 \
+ sbr_i-ps_i.mp4
+
+#FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%)
+
FATE_TESTS += $(FATE_AAC)
fate-aac: $(FATE_AAC)
$(FATE_AAC): CMP = oneoff