History

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

Michael Niedermayer committed 14 years ago

Commit 022f8d22 parents a11eeb9 f32dfad28 files · +119 −82Browse files

Unified · Split

28 files
  1. configure +1 −1
  2. libavcodec/aac_ac3_parser.h +1 −1
  3. libavcodec/aacdectab.h +1 −1
  4. libavcodec/ac3.h +1 −1
  5. libavcodec/ac3enc.c +3 −3
  6. libavcodec/ac3enc.h +1 −1
  7. libavcodec/arm/dca.h +43 −27
  8. libavcodec/audioconvert.c +1 −1
  9. libavcodec/audioconvert.h +1 −1
  10. libavcodec/avcodec.h +3 −3
  11. libavcodec/dca.c +17 −12
  12. libavcodec/mlp_parser.c +1 −1
  13. libavcodec/mlp_parser.h +1 −1
  14. libavcodec/pthread.c +3 −2
  15. libavcodec/thread.h +3 −0
  16. libavcodec/version.h +1 −1
  17. libavcodec/vorbis.h +1 −1
  18. libavcodec/vorbis_data.c +1 −1
  19. libavdevice/alsa-audio-common.c +2 −2
  20. libavfilter/asrc_anullsrc.c +1 −1
  21. libavfilter/avfilter.c +1 −1
  22. libavfilter/avfilter.h +4 −5
  23. libavformat/nullenc.c +1 −1
  24. libavutil/audioconvert.c +6 −6
  25. libavutil/audioconvert.h +4 −4
  26. libavutil/avutil.h +1 −1
  27. libavutil/common.h +2 −2
  28. tests/fate/aac.mak +13 −0
configure+1−1
@@ -2999,7 +2999,7 @@ disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib · 2998 unmodified lines
29992999 if ! disabled vda; then
30003000 if check_header VideoDecodeAcceleration/VDADecoder.h; then
30013001 enable vda
3002− add_ldflags -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
3002+ add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
30033003 fi
30043004 fi
30053005
libavcodec/aac_ac3_parser.h+1−1
@@ -48,7 +48,7 @@ typedef struct AACAC3ParseContext { · 47 unmodified lines
4848 int sample_rate;
4949 int bit_rate;
5050 int samples;
51− int64_t channel_layout;
51+ uint64_t channel_layout;
5252 int service_type;
5353
5454 int remaining_size;
libavcodec/aacdectab.h+1−1
@@ -90,7 +90,7 @@ static const uint8_t aac_channel_layout_map[7][5][2] = { · 89 unmodified lines
9090 { { TYPE_CPE, 0 }, { TYPE_SCE, 0 }, { TYPE_LFE, 0 }, { TYPE_CPE, 2 }, { TYPE_CPE, 1 }, },
9191 };
9292
93−static const int64_t aac_channel_layout[8] = {
93+static const uint64_t aac_channel_layout[8] = {
9494 AV_CH_LAYOUT_MONO,
9595 AV_CH_LAYOUT_STEREO,
9696 AV_CH_LAYOUT_SURROUND,
libavcodec/ac3.h+1−1
@@ -120,7 +120,7 @@ typedef struct { · 119 unmodified lines
120120 uint32_t bit_rate;
121121 uint8_t channels;
122122 uint16_t frame_size;
123− int64_t channel_layout;
123+ uint64_t channel_layout;
124124 /** @} */
125125 } AC3HeaderInfo;
126126
libavcodec/ac3enc.c+3−3
@@ -77,7 +77,7 @@ static uint8_t exponent_group_tab[2][3][256]; · 76 unmodified lines
7777 /**
7878 * List of supported channel layouts.
7979 */
80−const int64_t ff_ac3_channel_layouts[19] = {
80+const uint64_t ff_ac3_channel_layouts[19] = {
8181 AV_CH_LAYOUT_MONO,
8282 AV_CH_LAYOUT_STEREO,
8383 AV_CH_LAYOUT_2_1,
@@ -2060,13 +2060,13 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx) · 1976 unmodified lines
20602060 * Set channel information during initialization.
20612061 */
20622062 static av_cold int set_channel_info(AC3EncodeContext *s, int channels,
2063− int64_t *channel_layout)
2063+ uint64_t *channel_layout)
20642064 {
20652065 int ch_layout;
20662066
20672067 if (channels < 1 || channels > AC3_MAX_CHANNELS)
20682068 return AVERROR(EINVAL);
2069− if ((uint64_t)*channel_layout > 0x7FF)
2069+ if (*channel_layout > 0x7FF)
20702070 return AVERROR(EINVAL);
20712071 ch_layout = *channel_layout;
20722072 if (!ch_layout)
libavcodec/ac3enc.h+1−1
@@ -258,7 +258,7 @@ typedef struct AC3EncodeContext { · 257 unmodified lines
258258 } AC3EncodeContext;
259259
260260
261−extern const int64_t ff_ac3_channel_layouts[19];
261+extern const uint64_t ff_ac3_channel_layouts[19];
262262
263263 int ff_ac3_encode_init(AVCodecContext *avctx);
264264
libavcodec/arm/dca.h+43−27
@@ -27,38 +27,54 @@ · 26 unmodified lines
2727
2828 #if HAVE_ARMV6 && HAVE_INLINE_ASM
2929
30−#define decode_blockcode decode_blockcode
31−static inline int decode_blockcode(int code, int levels, int *values)
30+#define decode_blockcodes decode_blockcodes
31+static inline int decode_blockcodes(int code1, int code2, int levels,
32+ int *values)
3233 {
33− int v0, v1, v2, v3;
34+ int v0, v1, v2, v3, v4, v5;
3435
35− __asm__ ("smmul %4, %8, %11 \n"
36− "smlabb %8, %4, %10, %8 \n"
37− "smmul %5, %4, %11 \n"
38− "sub %8, %8, %9, lsr #1 \n"
39− "smlabb %4, %5, %10, %4 \n"
40− "smmul %6, %5, %11 \n"
41− "str %8, %0 \n"
42− "sub %4, %4, %9, lsr #1 \n"
43− "smlabb %5, %6, %10, %5 \n"
44− "smmul %7, %6, %11 \n"
45− "str %4, %1 \n"
46− "sub %5, %5, %9, lsr #1 \n"
47− "smlabb %6, %7, %10, %6 \n"
48− "cmp %7, #0 \n"
49− "str %5, %2 \n"
50− "sub %6, %6, %9, lsr #1 \n"
51− "it eq \n"
52− "mvneq %7, #0 \n"
53− "str %6, %3 \n"
36+ __asm__ ("smmul %8, %14, %18 \n"
37+ "smmul %11, %15, %18 \n"
38+ "smlabb %14, %8, %17, %14 \n"
39+ "smlabb %15, %11, %17, %15 \n"
40+ "smmul %9, %8, %18 \n"
41+ "smmul %12, %11, %18 \n"
42+ "sub %14, %14, %16, lsr #1 \n"
43+ "sub %15, %15, %16, lsr #1 \n"
44+ "smlabb %8, %9, %17, %8 \n"
45+ "smlabb %11, %12, %17, %11 \n"
46+ "smmul %10, %9, %18 \n"
47+ "smmul %13, %12, %18 \n"
48+ "str %14, %0 \n"
49+ "str %15, %4 \n"
50+ "sub %8, %8, %16, lsr #1 \n"
51+ "sub %11, %11, %16, lsr #1 \n"
52+ "smlabb %9, %10, %17, %9 \n"
53+ "smlabb %12, %13, %17, %12 \n"
54+ "smmul %14, %10, %18 \n"
55+ "smmul %15, %13, %18 \n"
56+ "str %8, %1 \n"
57+ "str %11, %5 \n"
58+ "sub %9, %9, %16, lsr #1 \n"
59+ "sub %12, %12, %16, lsr #1 \n"
60+ "smlabb %10, %14, %17, %10 \n"
61+ "smlabb %13, %15, %17, %13 \n"
62+ "str %9, %2 \n"
63+ "str %12, %6 \n"
64+ "sub %10, %10, %16, lsr #1 \n"
65+ "sub %13, %13, %16, lsr #1 \n"
66+ "str %10, %3 \n"
67+ "str %13, %7 \n"
5468 : "=m"(values[0]), "=m"(values[1]),
5569 "=m"(values[2]), "=m"(values[3]),
56− "=&r"(v0), "=&r"(v1), "=&r"(v2), "=&r"(v3),
57− "+&r"(code)
58− : "r"(levels - 1), "r"(-levels), "r"(ff_inverse[levels])
59− : "cc");
70+ "=m"(values[4]), "=m"(values[5]),
71+ "=m"(values[6]), "=m"(values[7]),
72+ "=&r"(v0), "=&r"(v1), "=&r"(v2),
73+ "=&r"(v3), "=&r"(v4), "=&r"(v5),
74+ "+&r"(code1), "+&r"(code2)
75+ : "r"(levels - 1), "r"(-levels), "r"(ff_inverse[levels]));
6076
61− return v3;
77+ return code1 | code2;
6278 }
6379
6480 #endif
libavcodec/audioconvert.c+1−1
@@ -48,7 +48,7 @@ void avcodec_sample_fmt_string (char *buf, int buf_size, int sample_fmt) · 47 unmodified lines
4848 }
4949 #endif
5050
51−int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
51+uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
5252 {
5353 switch(nb_channels) {
5454 case 1: return AV_CH_LAYOUT_MONO;
libavcodec/audioconvert.h+1−1
@@ -80,7 +80,7 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout); · 79 unmodified lines
8080 * @param fmt_name Format name, or NULL if unknown
8181 * @return Channel layout mask
8282 */
83−int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
83+uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
8484
8585 struct AVAudioConvert;
8686 typedef struct AVAudioConvert AVAudioConvert;
libavcodec/avcodec.h+3−3
@@ -2758,14 +2758,14 @@ typedef struct AVCodecContext { · 2757 unmodified lines
27582758 * - encoding: set by user.
27592759 * - decoding: set by user, may be overwritten by libavcodec.
27602760 */
2761− int64_t channel_layout;
2761+ uint64_t channel_layout;
27622762
27632763 /**
27642764 * Request decoder to use this channel layout if it can (0 for default)
27652765 * - encoding: unused
27662766 * - decoding: Set by user.
27672767 */
2768− int64_t request_channel_layout;
2768+ uint64_t request_channel_layout;
27692769
27702770 /**
27712771 * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
@@ -3122,7 +3122,7 @@ typedef struct AVCodec { · 350 unmodified lines
31223122 const char *long_name;
31233123 const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
31243124 const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
3125− const int64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
3125+ const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
31263126 uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
31273127 const AVClass *priv_class; ///< AVClass for the private context
31283128 const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
libavcodec/dca.c+17−12
@@ -128,7 +128,7 @@ static const int dca_ext_audio_descr_mask[] = { · 127 unmodified lines
128128 * All 2 channel configurations -> AV_CH_LAYOUT_STEREO
129129 */
130130
131−static const int64_t dca_core_channel_layout[] = {
131+static const uint64_t dca_core_channel_layout[] = {
132132 AV_CH_FRONT_CENTER, ///< 1, A
133133 AV_CH_LAYOUT_STEREO, ///< 2, A + B (dual mono)
134134 AV_CH_LAYOUT_STEREO, ///< 2, L + R (stereo)
@@ -1037,7 +1037,7 @@ static void dca_downmix(float *samples, int srcfmt, · 902 unmodified lines
10371037 }
10381038
10391039
1040−#ifndef decode_blockcode
1040+#ifndef decode_blockcodes
10411041 /* Very compact version of the block code decoder that does not use table
10421042 * look-up but is slightly slower */
10431043 static int decode_blockcode(int code, int levels, int *values)
@@ -1051,12 +1051,13 @@ static int decode_blockcode(int code, int levels, int *values) · 7 unmodified lines
10511051 code = div;
10521052 }
10531053
1054− if (code == 0)
1055− return 0;
1056− else {
1057− av_log(NULL, AV_LOG_ERROR, "ERROR: block code look-up failed\n");
1058− return AVERROR_INVALIDDATA;
1059− }
1054+ return code;
1055+}
1056+
1057+static int decode_blockcodes(int code1, int code2, int levels, int *values)
1058+{
1059+ return decode_blockcode(code1, levels, values) |
1060+ decode_blockcode(code2, levels, values + 4);
10601061 }
10611062 #endif
10621063
@@ -1126,16 +1127,20 @@ static int dca_subsubframe(DCAContext * s, int base_channel, int block_index) · 63 unmodified lines
11261127 if (abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table){
11271128 if (abits <= 7){
11281129 /* Block code */
1129− int block_code1, block_code2, size, levels;
1130+ int block_code1, block_code2, size, levels, err;
11301131
11311132 size = abits_sizes[abits-1];
11321133 levels = abits_levels[abits-1];
11331134
11341135 block_code1 = get_bits(&s->gb, size);
1135− /* FIXME Should test return value */
1136− decode_blockcode(block_code1, levels, block);
11371136 block_code2 = get_bits(&s->gb, size);
1138− decode_blockcode(block_code2, levels, &block[4]);
1137+ err = decode_blockcodes(block_code1, block_code2,
1138+ levels, block);
1139+ if (err) {
1140+ av_log(s->avctx, AV_LOG_ERROR,
1141+ "ERROR: block code look-up failed\n");
1142+ return AVERROR_INVALIDDATA;
1143+ }
11391144 }else{
11401145 /* no coding */
11411146 for (m = 0; m < 8; m++)
libavcodec/mlp_parser.c+1−1
@@ -107,7 +107,7 @@ static int truehd_channels(int chanmap) · 106 unmodified lines
107107 return channels;
108108 }
109109
110−int64_t ff_truehd_layout(int chanmap)
110+uint64_t ff_truehd_layout(int chanmap)
111111 {
112112 int layout = 0, i;
113113
libavcodec/mlp_parser.h+1−1
@@ -54,7 +54,7 @@ typedef struct MLPHeaderInfo · 53 unmodified lines
5454
5555
5656 int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb);
57−int64_t ff_truehd_layout(int chanmap);
57+uint64_t ff_truehd_layout(int chanmap);
5858
5959 extern const uint64_t ff_mlp_layout[32];
6060
libavcodec/pthread.c+3−2
@@ -525,7 +525,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx, · 524 unmodified lines
525525 if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
526526
527527 *got_picture_ptr=0;
528− return 0;
528+ return avpkt->size;
529529 }
530530
531531 /*
@@ -566,7 +566,8 @@ int ff_thread_decode_frame(AVCodecContext *avctx, · 34 unmodified lines
566566
567567 fctx->next_finished = finished;
568568
569− return p->result;
569+ /* return the size of the consumed packet if no error occurred */
570+ return (p->result >= 0) ? avpkt->size : p->result;
570571 }
571572
572573 void ff_thread_report_progress(AVFrame *f, int n, int field)
libavcodec/thread.h+3−0
@@ -42,6 +42,9 @@ void ff_thread_flush(AVCodecContext *avctx); · 41 unmodified lines
4242 * Submits a new frame to a decoding thread.
4343 * Returns the next available frame in picture. *got_picture_ptr
4444 * will be 0 if none is available.
45+ * The return value on success is the size of the consumed packet for
46+ * compatiblity with avcodec_decode_video2(). This means the decoder
47+ * has to consume the full packet.
4548 *
4649 * Parameters are the same as avcodec_decode_video2().
4750 */
libavcodec/version.h+1−1
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222
2323 #define LIBAVCODEC_VERSION_MAJOR 53
2424 #define LIBAVCODEC_VERSION_MINOR 37
25−#define LIBAVCODEC_VERSION_MICRO 0
25+#define LIBAVCODEC_VERSION_MICRO 1
2626
2727 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
2828 LIBAVCODEC_VERSION_MINOR, \
libavcodec/vorbis.h+1−1
@@ -27,7 +27,7 @@ extern const float ff_vorbis_floor1_inverse_db_table[256]; · 26 unmodified lines
2727 extern const float * const ff_vorbis_vwin[8];
2828 extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
2929 extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8];
30−extern const int64_t ff_vorbis_channel_layouts[9];
30+extern const uint64_t ff_vorbis_channel_layouts[9];
3131
3232 typedef struct {
3333 uint16_t x;
libavcodec/vorbis_data.c+1−1
@@ -44,7 +44,7 @@ const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = { · 43 unmodified lines
4444 { 0, 2, 1, 6, 7, 4, 5, 3 },
4545 };
4646
47−const int64_t ff_vorbis_channel_layouts[9] = {
47+const uint64_t ff_vorbis_channel_layouts[9] = {
4848 AV_CH_LAYOUT_MONO,
4949 AV_CH_LAYOUT_STEREO,
5050 AV_CH_LAYOUT_SURROUND,
libavdevice/alsa-audio-common.c+2−2
@@ -143,7 +143,7 @@ switch(format) {\ · 142 unmodified lines
143143 case FORMAT_F32: s->reorder_func = alsa_reorder_f32_out_ ##layout; break;\
144144 }
145145
146−static av_cold int find_reorder_func(AlsaData *s, int codec_id, int64_t layout, int out)
146+static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout, int out)
147147 {
148148 int format;
149149
@@ -194,7 +194,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode, · 44 unmodified lines
194194 snd_pcm_t *h;
195195 snd_pcm_hw_params_t *hw_params;
196196 snd_pcm_uframes_t buffer_size, period_size;
197− int64_t layout = ctx->streams[0]->codec->channel_layout;
197+ uint64_t layout = ctx->streams[0]->codec->channel_layout;
198198
199199 if (ctx->filename[0] == 0) audio_device = "default";
200200 else audio_device = ctx->filename;
libavfilter/asrc_anullsrc.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030 typedef struct {
3131 const AVClass *class;
3232 char *channel_layout_str;
33− int64_t channel_layout;
33+ uint64_t channel_layout;
3434 char *sample_rate_str;
3535 int sample_rate;
3636 int nb_samples; ///< number of samples per requested frame
libavfilter/avfilter.c+1−1
@@ -473,7 +473,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, · 472 unmodified lines
473473 AVFilterBufferRef *
474474 avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
475475 int nb_samples, enum AVSampleFormat sample_fmt,
476− int64_t channel_layout, int planar)
476+ uint64_t channel_layout, int planar)
477477 {
478478 AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer));
479479 AVFilterBufferRef *samplesref = av_mallocz(sizeof(AVFilterBufferRef));
libavfilter/avfilter.h+4−5
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030
3131 #define LIBAVFILTER_VERSION_MAJOR 2
3232 #define LIBAVFILTER_VERSION_MINOR 49
33−#define LIBAVFILTER_VERSION_MICRO 0
33+#define LIBAVFILTER_VERSION_MICRO 1
3434
3535 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
3636 LIBAVFILTER_VERSION_MINOR, \
@@ -110,7 +110,7 @@ typedef struct AVFilterBuffer { · 73 unmodified lines
110110 * per reference properties must be separated out.
111111 */
112112 typedef struct AVFilterBufferRefAudioProps {
113− int64_t channel_layout; ///< channel layout of audio buffer
113+ uint64_t channel_layout; ///< channel layout of audio buffer
114114 int nb_samples; ///< number of audio samples per channel
115115 int sample_rate; ///< audio buffer sample rate
116116 int planar; ///< audio buffer - planar or packed
@@ -641,7 +641,7 @@ struct AVFilterLink { · 524 unmodified lines
641641 int h; ///< agreed upon image height
642642 AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
643643 /* These parameters apply only to audio */
644− int64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h)
644+ uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h)
645645 #if LIBAVFILTER_VERSION_MAJOR < 3
646646 int64_t sample_rate; ///< samples per second
647647 #else
@@ -772,8 +772,7 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms, · 124 unmodified lines
772772 AVFilterBufferRef *
773773 avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
774774 int nb_samples, enum AVSampleFormat sample_fmt,
775− int64_t channel_layout, int planar);
776−
775+ uint64_t channel_layout, int planar);
777776 /**
778777 * Request an input frame from the filter at the other end of the link.
779778 *
libavformat/nullenc.c+1−1
@@ -32,5 +32,5 @@ AVOutputFormat ff_null_muxer = { · 31 unmodified lines
3232 .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
3333 .video_codec = CODEC_ID_RAWVIDEO,
3434 .write_packet = null_write_packet,
35− .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS,
35+ .flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS,
3636 };
libavutil/audioconvert.c+6−6
@@ -60,7 +60,7 @@ static const char *get_channel_name(int channel_id) · 59 unmodified lines
6060 static const struct {
6161 const char *name;
6262 int nb_channels;
63− int64_t layout;
63+ uint64_t layout;
6464 } channel_layout_map[] = {
6565 { "mono", 1, AV_CH_LAYOUT_MONO },
6666 { "stereo", 2, AV_CH_LAYOUT_STEREO },
@@ -76,7 +76,7 @@ static const struct { · 9 unmodified lines
7676 { 0 }
7777 };
7878
79−static int64_t get_channel_layout_single(const char *name, int name_len)
79+static uint64_t get_channel_layout_single(const char *name, int name_len)
8080 {
8181 int i;
8282 char *end;
@@ -102,7 +102,7 @@ static int64_t get_channel_layout_single(const char *name, int name_len) · 19 unmodified lines
102102 return 0;
103103 }
104104
105−int64_t av_get_channel_layout(const char *name)
105+uint64_t av_get_channel_layout(const char *name)
106106 {
107107 const char *n, *e;
108108 const char *name_end = name + strlen(name);
@@ -119,7 +119,7 @@ int64_t av_get_channel_layout(const char *name) · 10 unmodified lines
119119 }
120120
121121 void av_get_channel_layout_string(char *buf, int buf_size,
122− int nb_channels, int64_t channel_layout)
122+ int nb_channels, uint64_t channel_layout)
123123 {
124124 int i;
125125
@@ -138,7 +138,7 @@ void av_get_channel_layout_string(char *buf, int buf_size, · 12 unmodified lines
138138 int i, ch;
139139 av_strlcat(buf, " (", buf_size);
140140 for (i = 0, ch = 0; i < 64; i++) {
141− if ((channel_layout & (1L << i))) {
141+ if ((channel_layout & (UINT64_C(1) << i))) {
142142 const char *name = get_channel_name(i);
143143 if (name) {
144144 if (ch > 0)
@@ -152,7 +152,7 @@ void av_get_channel_layout_string(char *buf, int buf_size, · 7 unmodified lines
152152 }
153153 }
154154
155−int av_get_channel_layout_nb_channels(int64_t channel_layout)
155+int av_get_channel_layout_nb_channels(uint64_t channel_layout)
156156 {
157157 int count;
158158 uint64_t x = channel_layout;
libavutil/audioconvert.h+4−4
@@ -62,7 +62,7 @@ · 61 unmodified lines
6262 /** Channel mask value used for AVCodecContext.request_channel_layout
6363 to indicate that the user requests the channel order of the decoder output
6464 to be the native codec channel order. */
65−#define AV_CH_LAYOUT_NATIVE 0x8000000000000000LL
65+#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
6666
6767 /**
6868 * @}
@@ -104,7 +104,7 @@ · 35 unmodified lines
104104 * AV_CH_* macros).
105105 + Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
106106 */
107−int64_t av_get_channel_layout(const char *name);
107+uint64_t av_get_channel_layout(const char *name);
108108
109109 /**
110110 * Return a description of a channel layout.
@@ -113,12 +113,12 @@ int64_t av_get_channel_layout(const char *name); · 2 unmodified lines
113113 * @param buf put here the string containing the channel layout
114114 * @param buf_size size in bytes of the buffer
115115 */
116−void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout);
116+void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
117117
118118 /**
119119 * Return the number of channels in the channel layout.
120120 */
121−int av_get_channel_layout_nb_channels(int64_t channel_layout);
121+int av_get_channel_layout_nb_channels(uint64_t channel_layout);
122122
123123 /**
124124 * Return default channel layout for a given number of channels.
libavutil/avutil.h+1−1
@@ -154,7 +154,7 @@ · 153 unmodified lines
154154
155155 #define LIBAVUTIL_VERSION_MAJOR 51
156156 #define LIBAVUTIL_VERSION_MINOR 29
157−#define LIBAVUTIL_VERSION_MICRO 0
157+#define LIBAVUTIL_VERSION_MICRO 1
158158
159159 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
160160 LIBAVUTIL_VERSION_MINOR, \
libavutil/common.h+2−2
@@ -220,8 +220,8 @@ static av_always_inline av_const int av_popcount_c(uint32_t x) · 219 unmodified lines
220220 return (x + (x >> 16)) & 0x3F;
221221 }
222222
223−#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
224−#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
223+#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))
224+#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24))
225225
226226 /**
227227 * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
tests/fate/aac.mak+13−0
@@ -38,6 +38,19 @@ FATE_AAC += fate-aac-ap05_48 · 37 unmodified lines
3838 fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4
3939 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
4040
41+fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
42+fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
43+
44+FATE_AAC_CT = sbr_bc-ps_i.3gp \
45+ sbr_bic-ps_i.3gp \
46+ sbr_i-ps_i.aac \
47+ sbr_bc-ps_bc.mp4 \
48+ sbr_bc-ps_i.mp4 \
49+ sbr_i-ps_bic.mp4 \
50+ sbr_i-ps_i.mp4
51+
52+#FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%)
53+
4154 FATE_TESTS += $(FATE_AAC)
4255 fate-aac: $(FATE_AAC)
4356 $(FATE_AAC): CMP = oneoff

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t