Skip to content

Commit

Permalink
Update FLAC from Chromium 114.0.5735.358
Browse files Browse the repository at this point in the history
Issue: 326748668
Reviewed-on: youtube#3320
  • Loading branch information
dahlstrom-g authored May 23, 2024
2 parents a7b54ab + ed1f733 commit 684946e
Show file tree
Hide file tree
Showing 100 changed files with 12,152 additions and 9,066 deletions.
20 changes: 13 additions & 7 deletions third_party/flac/AUTHORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* FLAC - Free Lossless Audio Codec
* Copyright (C) 2001-2009 Josh Coalson
* Copyright (C) 2011-2014 Xiph.Org Foundation
* Copyright (C) 2011-2022 Xiph.Org Foundation
*
* This file is part the FLAC project. FLAC is comprised of several
* components distributed under different licenses. The codec libraries
Expand All @@ -17,17 +17,19 @@
* distribution.
*/

Current FLAC maintainer: Erik de Castro Lopo <[email protected]>
This file lists major contributors to the FLAC project. This list is not
exhaustive. For an exhaustive list, run the command `git shortlog -s` on
the git repo or visit https://gitlab.xiph.org/xiph/flac/-/graphs/master

For a complete list of contributions, run the command `git log` on the
git repo, visit https://github.com/xiph/flac/commits or visit
https://gitlab.xiph.org/xiph/flac/commits

Original author: Josh Coalson <[email protected]>
Maintainer 2012-2020: Erik de Castro Lopo <[email protected]>

Website : https://www.xiph.org/flac/

FLAC is an Open Source lossless audio codec originally developed by Josh Coalson
between 2001 and 2009. From 2009 to 2012 FLAC was basically unmaintained. In
2012 the Erik de Castro Lopo became the chief maintainer as part of the
Xiph.Org Foundation.

Other major contributors and their contributions:

"lvqcl" <[email protected]>
Expand Down Expand Up @@ -56,3 +58,7 @@ Other major contributors and their contributions:
"Matt Zimmerman" <[email protected]>
* Libtool/autoconf/automake make system, flac man page

"Martijn van Beurden" <[email protected]>
* Compression improvements
* Fuzzer improvements and fixes for fuzz findings
* Implementation of 32 bps encoder and decoder
72 changes: 50 additions & 22 deletions third_party/flac/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/sanitizers/sanitizers.gni")
import("//testing/libfuzzer/fuzzer_test.gni")

config("flac_config") {
defines = [
"FLAC__NO_DLL",
]
defines = [ "FLAC__NO_DLL" ]
}

# Need a separate config to ensure the warnings are added to the end.
Expand All @@ -15,9 +16,13 @@ config("flac_private_config") {
# libflac converts between FLAC__StreamDecoderState and
# FLAC__StreamDecoderInitStatus a lot in stream_decoder.c.
"-Wno-conversion",

# libflac contains constants that are only used in certain compile-time
# cases, which triggers unused-const-variable warnings in other cases.
"-Wno-unused-const-variable",

# libflac contains some questionable bit math.
"-Wno-incompatible-pointer-types",
]
}
}
Expand All @@ -36,23 +41,29 @@ source_set("flac") {
"include/share/alloc.h",
"include/share/compat.h",
"include/share/endswap.h",
"include/share/getopt.h",
"include/share/grabbag.h",
"include/share/grabbag/cuesheet.h",
"include/share/grabbag/file.h",
"include/share/grabbag/picture.h",
"include/share/grabbag/replaygain.h",
"include/share/grabbag/seektable.h",
"include/share/macros.h",
"include/share/private.h",
"src/libFLAC/alloc.c",
"include/share/replaygain_analysis.h",
"include/share/replaygain_synthesis.h",
"include/share/safe_str.h",
"include/share/utf8.h",
"src/libFLAC/bitmath.c",
"src/libFLAC/bitreader.c",
"src/libFLAC/bitwriter.c",
"src/libFLAC/cpu.c",
"src/libFLAC/crc.c",
"src/libFLAC/fixed.c",
"src/libFLAC/fixed_intrin_sse2.c",
"src/libFLAC/fixed_intrin_ssse3.c",
"src/libFLAC/float.c",
"src/libFLAC/format.c",
"src/libFLAC/lpc.c",
"src/libFLAC/md5.c",
"src/libFLAC/memory.c",
"src/libFLAC/stream_decoder.c",
"src/libFLAC/stream_encoder.c",
"src/libFLAC/stream_encoder_framing.c",
"src/libFLAC/window.c",
"src/libFLAC/include/private/all.h",
"src/libFLAC/include/private/bitmath.h",
"src/libFLAC/include/private/bitreader.h",
Expand All @@ -73,16 +84,26 @@ source_set("flac") {
"src/libFLAC/include/protected/all.h",
"src/libFLAC/include/protected/stream_decoder.h",
"src/libFLAC/include/protected/stream_encoder.h",
"src/libFLAC/lpc.c",
"src/libFLAC/lpc_intrin_avx2.c",
"src/libFLAC/lpc_intrin_fma.c",
"src/libFLAC/lpc_intrin_neon.c",
"src/libFLAC/lpc_intrin_sse2.c",
"src/libFLAC/lpc_intrin_sse41.c",
"src/libFLAC/lpc_intrin_vsx.c",
"src/libFLAC/md5.c",
"src/libFLAC/memory.c",
"src/libFLAC/metadata_object.c",
"src/libFLAC/stream_decoder.c",
"src/libFLAC/stream_encoder.c",
"src/libFLAC/stream_encoder_framing.c",
"src/libFLAC/stream_encoder_intrin_avx2.c",
"src/libFLAC/stream_encoder_intrin_sse2.c",
"src/libFLAC/stream_encoder_intrin_ssse3.c",
"src/libFLAC/window.c",
]

if (is_starboard) {
deps = [
"//starboard:starboard_headers_only",
"//starboard/common",
]
} else {
configs -= [ "//build/config/compiler:chromium_code" ]
}
configs += [
":flac_config",
":flac_private_config",
Expand All @@ -97,7 +118,8 @@ if (is_starboard) {

defines = [
"FLAC__OVERFLOW_DETECT",
"VERSION=\"1.3.1\"",
"FLAC__HAS_OGG=0",
"PACKAGE_VERSION=\"1.4.2\"",
"HAVE_LROUND",
]

Expand All @@ -106,15 +128,21 @@ if (is_starboard) {
"include/share/win_utf8_io.h",
"src/share/win_utf8_io/win_utf8_io.c",
]

# win_utf8_io.c defines this itself.
configs -= [ "//build/config/win:lean_and_mean" ]
cflags = [
"/wd4334", # 32-bit shift converted to 64 bits.
"/wd4267" # Converting from size_t to unsigned on 64-bit.
"/wd4267", # Converting from size_t to unsigned on 64-bit.
]
} else {
defines += [
"HAVE_INTTYPES_H",
defines += [ "HAVE_INTTYPES_H" ]
}

if (use_fuzzing_engine) {
sources += [
"oss-fuzz/fuzzer_common.c",
"oss-fuzz/fuzzer_common.h",
]
}
}
Loading

0 comments on commit 684946e

Please sign in to comment.