summaryrefslogtreecommitdiff
path: root/chromium/third_party/ffmpeg
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-17 13:57:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-19 13:44:40 +0000
commit6ec7b8da05d21a3878bd21c691b41e675d74bb1c (patch)
treeb87f250bc19413750b9bb9cdbf2da20ef5014820 /chromium/third_party/ffmpeg
parentec02ee4181c49b61fce1c8fb99292dbb8139cc90 (diff)
downloadqtwebengine-chromium-6ec7b8da05d21a3878bd21c691b41e675d74bb1c.tar.gz
BASELINE: Update Chromium to 60.0.3112.70
Change-Id: I9911c2280a014d4632f254857876a395d4baed2d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/ffmpeg')
-rwxr-xr-xchromium/third_party/ffmpeg/BUILD.gn10
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm2
-rw-r--r--chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h4
-rw-r--r--chromium/third_party/ffmpeg/chromium/patches/README5
-rwxr-xr-xchromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py6
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/aacsbr_template.c1
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/libopusdec.c40
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/opus.c21
-rw-r--r--chromium/third_party/ffmpeg/libavformat/isom.h1
-rw-r--r--chromium/third_party/ffmpeg/libavformat/mov.c27
10 files changed, 87 insertions, 30 deletions
diff --git a/chromium/third_party/ffmpeg/BUILD.gn b/chromium/third_party/ffmpeg/BUILD.gn
index 42d85c9651d..2afab748963 100755
--- a/chromium/third_party/ffmpeg/BUILD.gn
+++ b/chromium/third_party/ffmpeg/BUILD.gn
@@ -5,6 +5,8 @@
import("ffmpeg_options.gni")
import("ffmpeg_generated.gni")
+import("//build/buildflag_header.gni")
+
# Path to platform configuration files.
platform_config_root =
"chromium/config/$ffmpeg_branding/$os_config/$ffmpeg_arch"
@@ -148,6 +150,13 @@ config("ffmpegsumo_warnings") {
}
}
+buildflag_header("ffmpeg_features") {
+ header = "ffmpeg_features.h"
+ flags = [
+ "USE_SYSTEM_FFMPEG=false",
+ ]
+}
+
if (is_component_ffmpeg) {
link_target_type = "source_set"
} else {
@@ -191,6 +200,7 @@ target(link_target_type, "ffmpeg_internal") {
ldflags = []
libs = []
deps = [
+ ":ffmpeg_features",
"//third_party/opus",
]
diff --git a/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm b/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm
index ef4d25b8eab..b21141eb1f1 100644
--- a/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm
+++ b/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.asm
@@ -329,7 +329,7 @@
%define HAVE_GNU_AS 0
%define HAVE_GNU_WINDRES 0
%define HAVE_IBM_ASM 0
-%define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 1
+%define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 0
%define HAVE_INLINE_ASM_LABELS 1
%define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
%define HAVE_PRAGMA_DEPRECATED 1
diff --git a/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h b/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h
index b78eeb9b18d..5bca3092f56 100644
--- a/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h
+++ b/chromium/third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h
@@ -1,7 +1,7 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --disable-nvenc --disable-cuda --disable-cuvid --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac' --enable-parser='opus,vorbis,flac' --extra-cflags=-I/usr/local/google/home/tguilbert/Code/chromium/src/third_party/opus/src/include --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --enable-decoder='aac,h264,mp3' --enable-demuxer='aac,mp3,mov' --enable-parser='aac,h264,mpegaudio' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-demuxer=gsm --enable-parser=gsm"
+#define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --disable-nvenc --disable-cuda --disable-cuvid --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac' --enable-parser='opus,vorbis,flac' --extra-cflags=-I/usr/local/google/home/tguilbert/Code/chromium/src/third_party/opus/src/include --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --enable-decoder='aac,h264,mp3' --enable-demuxer='aac,mp3,mov' --enable-parser='aac,h264,mpegaudio' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-demuxer=gsm --enable-parser=gsm"
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
#define CONFIG_THIS_YEAR 2017
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
@@ -345,7 +345,7 @@
#define HAVE_GNU_AS 0
#define HAVE_GNU_WINDRES 0
#define HAVE_IBM_ASM 0
-#define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 1
+#define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 0
#define HAVE_INLINE_ASM_LABELS 1
#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
#define HAVE_PRAGMA_DEPRECATED 1
diff --git a/chromium/third_party/ffmpeg/chromium/patches/README b/chromium/third_party/ffmpeg/chromium/patches/README
index a96bd4a0e55..fa999dd87d7 100644
--- a/chromium/third_party/ffmpeg/chromium/patches/README
+++ b/chromium/third_party/ffmpeg/chromium/patches/README
@@ -117,3 +117,8 @@ Current patches:
Fixes the conditionals on Linux so that these symbols are hidden and
adds the Chromium-specific private_extern extension for hiding these
symbols on OSX.
+
+ Changes to libavcodec/libopusdec.c and libavcodec/libopusdec.c
+ https://chromium-review.googlesource.com/c/477130/
+ libopus: +channel mapping 2 support in libopusdec.
+ Enables demuxing of Ambisonics content coded with channel mapping 2.
diff --git a/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py b/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
index a052e27c1da..d15b7abe368 100755
--- a/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
+++ b/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
@@ -383,9 +383,7 @@ def main(argv):
'--arch=x86_64',
])
if target_os != 'android':
- # TODO(krasin): move this to Common, when https://crbug.com/537368
- # is fixed and CFI is unblocked from launching on ChromeOS.
- configure_flags['EnableLTO'].extend(['--enable-lto'])
+ configure_flags['Common'].extend(['--enable-lto'])
pass
elif target_arch == 'ia32':
configure_flags['Common'].extend([
@@ -632,12 +630,10 @@ def main(argv):
do_build_ffmpeg('Chromium',
configure_flags['Common'] +
configure_flags['Chromium'] +
- configure_flags['EnableLTO'] +
configure_args)
do_build_ffmpeg('Chrome',
configure_flags['Common'] +
configure_flags['Chrome'] +
- configure_flags['EnableLTO'] +
configure_args)
else:
do_build_ffmpeg('Chromium',
diff --git a/chromium/third_party/ffmpeg/libavcodec/aacsbr_template.c b/chromium/third_party/ffmpeg/libavcodec/aacsbr_template.c
index f8aa4854dfc..7a440e9fdc7 100644
--- a/chromium/third_party/ffmpeg/libavcodec/aacsbr_template.c
+++ b/chromium/third_party/ffmpeg/libavcodec/aacsbr_template.c
@@ -1143,6 +1143,7 @@ int AAC_RENAME(ff_decode_sbr_extension)(AACContext *ac, SpectralBandReplication
if (bytes_read > cnt) {
av_log(ac->avctx, AV_LOG_ERROR,
"Expected to read %d SBR bytes actually read %d.\n", cnt, bytes_read);
+ sbr_turnoff(sbr);
}
return cnt;
}
diff --git a/chromium/third_party/ffmpeg/libavcodec/libopusdec.c b/chromium/third_party/ffmpeg/libavcodec/libopusdec.c
index 2e160885ae7..792a97d9d82 100644
--- a/chromium/third_party/ffmpeg/libavcodec/libopusdec.c
+++ b/chromium/third_party/ffmpeg/libavcodec/libopusdec.c
@@ -61,8 +61,6 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
av_log(avc, AV_LOG_ERROR, "Invalid number of channels\n");
return AVERROR(EINVAL);
}
- avc->channel_layout = avc->channels > 8 ? 0 :
- ff_vorbis_channel_layouts[avc->channels - 1];
if (avc->extradata_size >= OPUS_HEAD_SIZE) {
opus->pre_skip = AV_RL16(avc->extradata + 10);
@@ -86,14 +84,38 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
mapping = mapping_arr;
}
- if (avc->channels > 2 && avc->channels <= 8) {
- const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];
- int ch;
+ if (channel_map == 1) {
+ avc->channel_layout = avc->channels > 8 ? 0 :
+ ff_vorbis_channel_layouts[avc->channels - 1];
+ if (avc->channels > 2 && avc->channels <= 8) {
+ const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];
+ int ch;
+
+ /* Remap channels from Vorbis order to ffmpeg order */
+ for (ch = 0; ch < avc->channels; ch++)
+ mapping_arr[ch] = mapping[vorbis_offset[ch]];
+ mapping = mapping_arr;
+ }
+ } else if (channel_map == 2) {
+ int ambisonic_channels;
+ if (avc->channels > 227) {
+ av_log(avc, AV_LOG_ERROR, "Too many channels\n");
+ return AVERROR_INVALIDDATA;
+ }
- /* Remap channels from Vorbis order to ffmpeg order */
- for (ch = 0; ch < avc->channels; ch++)
- mapping_arr[ch] = mapping[vorbis_offset[ch]];
- mapping = mapping_arr;
+ ambisonic_channels = ff_sqrt(avc->channels);
+ ambisonic_channels *= ambisonic_channels;
+ if (avc->channels != ambisonic_channels &&
+ avc->channels != ambisonic_channels + 2) {
+ av_log(avc, AV_LOG_ERROR,
+ "Channel mapping 2 is only specified for channel counts"
+ " which can be written as n or n + 2 for nonnegative integer n,"
+ " where n is the number of ambisonic channels.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ avc->channel_layout = 0;
+ } else {
+ avc->channel_layout = 0;
}
opus->dec = opus_multistream_decoder_create(avc->sample_rate, avc->channels,
diff --git a/chromium/third_party/ffmpeg/libavcodec/opus.c b/chromium/third_party/ffmpeg/libavcodec/opus.c
index 5847e88e11d..7cfbb023842 100644
--- a/chromium/third_party/ffmpeg/libavcodec/opus.c
+++ b/chromium/third_party/ffmpeg/libavcodec/opus.c
@@ -372,19 +372,22 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
layout = ff_vorbis_channel_layouts[channels - 1];
channel_reorder = channel_reorder_vorbis;
} else if (map_type == 2) {
- int ambisonic_order = ff_sqrt(channels) - 1;
- if (channels != ((ambisonic_order + 1) * (ambisonic_order + 1)) &&
- channels != ((ambisonic_order + 1) * (ambisonic_order + 1) + 2)) {
- av_log(avctx, AV_LOG_ERROR,
- "Channel mapping 2 is only specified for channel counts"
- " which can be written as (n + 1)^2 or (n + 1)^2 + 2"
- " for nonnegative integer n\n");
- return AVERROR_INVALIDDATA;
- }
+ int ambisonic_channels;
if (channels > 227) {
av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
return AVERROR_INVALIDDATA;
}
+
+ ambisonic_channels = ff_sqrt(channels);
+ ambisonic_channels *= ambisonic_channels;
+ if (channels != ambisonic_channels &&
+ channels != ambisonic_channels + 2) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Channel mapping 2 is only specified for channel counts"
+ " which can be written as n or n + 2 for nonnegative integer n,"
+ " where n is the number of ambisonic channels.\n");
+ return AVERROR_INVALIDDATA;
+ }
layout = 0;
} else
layout = 0;
diff --git a/chromium/third_party/ffmpeg/libavformat/isom.h b/chromium/third_party/ffmpeg/libavformat/isom.h
index 68641a471ae..c35c5678cec 100644
--- a/chromium/third_party/ffmpeg/libavformat/isom.h
+++ b/chromium/third_party/ffmpeg/libavformat/isom.h
@@ -233,6 +233,7 @@ typedef struct MOVContext {
unsigned int nb_chapter_tracks;
int use_absolute_path;
int ignore_editlist;
+ int advanced_editlist;
int ignore_chapters;
int seek_individually;
int64_t next_root_atom; ///< offset of the next root atom
diff --git a/chromium/third_party/ffmpeg/libavformat/mov.c b/chromium/third_party/ffmpeg/libavformat/mov.c
index 0f39c409168..e0dc1f2bc71 100644
--- a/chromium/third_party/ffmpeg/libavformat/mov.c
+++ b/chromium/third_party/ffmpeg/libavformat/mov.c
@@ -3319,7 +3319,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
uint64_t stream_size = 0;
if (sc->elst_count) {
- int i, edit_start_index = 0;
+ int i, edit_start_index = 0, multiple_edits = 0;
int64_t empty_duration = 0; // empty duration of the first edit list entry
int64_t start_time = 0; // start time of the media
@@ -3332,15 +3332,28 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
edit_start_index = 1;
} else if (i == edit_start_index && e->time >= 0) {
start_time = e->time;
+ } else {
+ multiple_edits = 1;
}
}
+ if (multiple_edits && !mov->advanced_editlist)
+ av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, "
+ "Use -advanced_editlist to correctly decode otherwise "
+ "a/v desync might occur\n");
+
/* adjust first dts according to edit list */
if ((empty_duration || start_time) && mov->time_scale > 0) {
if (empty_duration)
empty_duration = av_rescale(empty_duration, sc->time_scale, mov->time_scale);
sc->time_offset = start_time - empty_duration;
+ if (!mov->advanced_editlist)
+ current_dts = -sc->time_offset;
}
+
+ if (!multiple_edits && !mov->advanced_editlist &&
+ st->codecpar->codec_id == AV_CODEC_ID_AAC && start_time > 0)
+ sc->start_pad = start_time;
}
/* only use old uncompressed audio chunk demuxing when stts specifies it */
@@ -3574,8 +3587,10 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
}
}
- // Fix index according to edit lists.
- mov_fix_index(mov, st);
+ if (!mov->ignore_editlist && mov->advanced_editlist) {
+ // Fix index according to edit lists.
+ mov_fix_index(mov, st);
+ }
}
static int test_same_origin(const char *src, const char *ref) {
@@ -6270,7 +6285,11 @@ static const AVOption mov_options[] = {
"Seek each stream individually to the to the closest point",
OFFSET(seek_individually), AV_OPT_TYPE_BOOL, { .i64 = 1 },
0, 1, FLAGS},
- {"ignore_editlist", "", OFFSET(ignore_editlist), AV_OPT_TYPE_BOOL, {.i64 = 0},
+ {"ignore_editlist", "Ignore the edit list atom.", OFFSET(ignore_editlist), AV_OPT_TYPE_BOOL, {.i64 = 0},
+ 0, 1, FLAGS},
+ {"advanced_editlist",
+ "Modify the AVIndex according to the editlists. Use this option to decode in the order specified by the edits.",
+ OFFSET(advanced_editlist), AV_OPT_TYPE_BOOL, {.i64 = 1},
0, 1, FLAGS},
{"ignore_chapters", "", OFFSET(ignore_chapters), AV_OPT_TYPE_BOOL, {.i64 = 0},
0, 1, FLAGS},