Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: src/libFLAC/include/private/stream_encoder.h

Issue 1961133002: Update FLAC to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/flac.git@master
Patch Set: build config tweaks for Windows Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libFLAC/include/private/metadata.h ('k') | src/libFLAC/include/private/stream_encoder_framing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/libFLAC/include/private/stream_encoder.h
diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/stream_encoder.h
similarity index 54%
copy from src/libFLAC/include/private/cpu.h
copy to src/libFLAC/include/private/stream_encoder.h
index 651bb224f2a61f04adfbbdb8fe5601b225c33145..96d31358625bc38eb1201a14e8f8bb6f2f9acbf5 100644
--- a/src/libFLAC/include/private/cpu.h
+++ b/src/libFLAC/include/private/stream_encoder.h
@@ -1,5 +1,6 @@
/* libFLAC - Free Lossless Audio Codec library
- * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
+ * Copyright (C) 2000-2009 Josh Coalson
+ * Copyright (C) 2011-2014 Xiph.Org Foundation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,60 +30,38 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FLAC__PRIVATE__CPU_H
-#define FLAC__PRIVATE__CPU_H
-
-#include "FLAC/ordinals.h"
+#ifndef FLAC__PRIVATE__STREAM_ENCODER_H
+#define FLAC__PRIVATE__STREAM_ENCODER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-typedef enum {
- FLAC__CPUINFO_TYPE_IA32,
- FLAC__CPUINFO_TYPE_PPC,
- FLAC__CPUINFO_TYPE_UNKNOWN
-} FLAC__CPUInfo_Type;
-
-typedef struct {
- FLAC__bool cpuid;
- FLAC__bool bswap;
- FLAC__bool cmov;
- FLAC__bool mmx;
- FLAC__bool fxsr;
- FLAC__bool sse;
- FLAC__bool sse2;
- FLAC__bool sse3;
- FLAC__bool ssse3;
- FLAC__bool _3dnow;
- FLAC__bool ext3dnow;
- FLAC__bool extmmx;
-} FLAC__CPUInfo_IA32;
-
-typedef struct {
- FLAC__bool altivec;
- FLAC__bool ppc64;
-} FLAC__CPUInfo_PPC;
+/*
+ * This is used to avoid overflow with unusual signals in 32-bit
+ * accumulator in the *precompute_partition_info_sums_* functions.
+ */
+#define FLAC__MAX_EXTRA_RESIDUAL_BPS 4
-typedef struct {
- FLAC__bool use_asm;
- FLAC__CPUInfo_Type type;
- union {
- FLAC__CPUInfo_IA32 ia32;
- FLAC__CPUInfo_PPC ppc;
- } data;
-} FLAC__CPUInfo;
+#if (defined FLAC__CPU_IA32 || defined FLAC__CPU_X86_64) && defined FLAC__HAS_X86INTRIN
+#include "private/cpu.h"
+#include "FLAC/format.h"
-void FLAC__cpu_info(FLAC__CPUInfo *info);
+#ifdef FLAC__SSE2_SUPPORTED
+extern void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual[], FLAC__uint64 abs_residual_partition_sums[],
+ unsigned residual_samples, unsigned predictor_order, unsigned min_partition_order, unsigned max_partition_order, unsigned bps);
+#endif
-#ifndef FLAC__NO_ASM
-#ifdef FLAC__CPU_IA32
-#ifdef FLAC__HAS_NASM
-FLAC__uint32 FLAC__cpu_have_cpuid_asm_ia32(void);
-void FLAC__cpu_info_asm_ia32(FLAC__uint32 *flags_edx, FLAC__uint32 *flags_ecx);
-FLAC__uint32 FLAC__cpu_info_extended_amd_asm_ia32(void);
+#ifdef FLAC__SSSE3_SUPPORTED
+extern void FLAC__precompute_partition_info_sums_intrin_ssse3(const FLAC__int32 residual[], FLAC__uint64 abs_residual_partition_sums[],
+ unsigned residual_samples, unsigned predictor_order, unsigned min_partition_order, unsigned max_partition_order, unsigned bps);
#endif
+
+#ifdef FLAC__AVX2_SUPPORTED
+extern void FLAC__precompute_partition_info_sums_intrin_avx2(const FLAC__int32 residual[], FLAC__uint64 abs_residual_partition_sums[],
+ unsigned residual_samples, unsigned predictor_order, unsigned min_partition_order, unsigned max_partition_order, unsigned bps);
#endif
+
#endif
#endif
« no previous file with comments | « src/libFLAC/include/private/metadata.h ('k') | src/libFLAC/include/private/stream_encoder_framing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698