mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1063356 - Update libvpx update script. r=kinetik
Remove upstreamed patches, rebase stdint.patch. Update script to work with the most recent chrome pull, upstream hasn't been doing releases, so this is the next best way to stay current. It's no longer possible to build vp8 and vp9 in the same unified source file, so most of the vp9 code is moved out of unified sources.
This commit is contained in:
parent
392efab7ef
commit
c5b35b977f
@ -1,30 +0,0 @@
|
||||
diff --git a/media/libvpx/vpx/src/svc_encodeframe.c b/media/libvpx/vpx/src/svc_encodeframe.c
|
||||
index 57d21dc..2514ad3 100644
|
||||
--- a/media/libvpx/vpx/src/svc_encodeframe.c
|
||||
+++ b/media/libvpx/vpx/src/svc_encodeframe.c
|
||||
@@ -18,21 +18,23 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define VPX_DISABLE_CTRL_TYPECHECKS 1
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/svc_context.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
-#if defined(__MINGW32__) && !defined(MINGW_HAS_SECURE_API)
|
||||
+#ifdef __MINGW32__
|
||||
#define strtok_r strtok_s
|
||||
+#ifndef MINGW_HAS_SECURE_API
|
||||
// proto from /usr/x86_64-w64-mingw32/include/sec_api/string_s.h
|
||||
_CRTIMP char *__cdecl strtok_s(char *str, const char *delim, char **context);
|
||||
-#endif
|
||||
+#endif /* MINGW_HAS_SECURE_API */
|
||||
+#endif /* __MINGW32__ */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define strdup _strdup
|
||||
#define strtok_r strtok_s
|
||||
#endif
|
||||
|
||||
#define SVC_REFERENCE_FRAMES 8
|
||||
#define SUPERFRAME_SLOTS (8)
|
@ -1,41 +1,20 @@
|
||||
diff --git a/media/libvpx/vpx/vpx_integer.h b/media/libvpx/vpx/vpx_integer.h
|
||||
--- a/media/libvpx/vpx/vpx_integer.h
|
||||
+++ b/media/libvpx/vpx/vpx_integer.h
|
||||
@@ -10,16 +10,18 @@
|
||||
|
||||
|
||||
#ifndef VPX_INTEGER_H
|
||||
#define VPX_INTEGER_H
|
||||
|
||||
--- vpx/vpx_integer.h- 2014-09-17 15:49:58.000000000 -0700
|
||||
+++ vpx/vpx_integer.h 2014-09-17 15:52:59.000000000 -0700
|
||||
@@ -15,6 +15,8 @@
|
||||
/* get ptrdiff_t, size_t, wchar_t, NULL */
|
||||
#include <stddef.h>
|
||||
|
||||
+#if !defined(VPX_DONT_DEFINE_STDINT_TYPES)
|
||||
+
|
||||
#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef signed int int32_t;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
@@ -47,16 +49,18 @@ typedef unsigned int uintptr_t;
|
||||
|
||||
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#if defined(_MSC_VER)
|
||||
#define VPX_FORCE_INLINE __forceinline
|
||||
#define VPX_INLINE __inline
|
||||
@@ -56,6 +58,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
+#endif // VPX_DONT_DEFINE_STDINT_TYPES
|
||||
+
|
||||
/* VS2010 defines stdint.h, but not inttypes.h */
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
#define PRId64 "I64d"
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,82 +0,0 @@
|
||||
diff --git a/media/libvpx/vp8/common/setupintrarecon.h b/media/libvpx/vp8/common/setupintrarecon.h
|
||||
index e515c3a..9317a6d 100644
|
||||
--- a/media/libvpx/vp8/common/setupintrarecon.h
|
||||
+++ b/media/libvpx/vp8/common/setupintrarecon.h
|
||||
@@ -3,16 +3,18 @@
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
+#ifndef SETUPINTRARECON_H
|
||||
+#define SETUPINTRARECON_H
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
|
||||
extern void vp8_setup_intra_recon_top_line(YV12_BUFFER_CONFIG *ybf);
|
||||
|
||||
static
|
||||
void setup_intra_recon_left(unsigned char *y_buffer,
|
||||
unsigned char *u_buffer,
|
||||
@@ -26,8 +28,10 @@ void setup_intra_recon_left(unsigned char *y_buffer,
|
||||
y_buffer[y_stride *i] = (unsigned char) 129;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
u_buffer[uv_stride *i] = (unsigned char) 129;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
v_buffer[uv_stride *i] = (unsigned char) 129;
|
||||
}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/media/libvpx/vpx_ports/vpx_once.h b/media/libvpx/vpx_ports/vpx_once.h
|
||||
index 16a735c..0387a71 100644
|
||||
--- a/media/libvpx/vpx_ports/vpx_once.h
|
||||
+++ b/media/libvpx/vpx_ports/vpx_once.h
|
||||
@@ -2,16 +2,19 @@
|
||||
* Copyright (c) 2011 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
+#ifndef VPX_ONCE_H
|
||||
+#define VPX_ONCE_H
|
||||
+
|
||||
#include "vpx_config.h"
|
||||
|
||||
#if CONFIG_MULTITHREAD && defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
static void once(void (*func)(void))
|
||||
{
|
||||
static CRITICAL_SECTION *lock;
|
||||
@@ -90,8 +93,10 @@ static void once(void (*func)(void))
|
||||
|
||||
if(!done)
|
||||
{
|
||||
func();
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/media/libvpx/vp8/common/loopfilter.c b/media/libvpx/vp8/common/loopfilter.c
|
||||
index 19857a7..3c0fa63 100644
|
||||
--- a/media/libvpx/vp8/common/loopfilter.c
|
||||
+++ b/media/libvpx/vp8/common/loopfilter.c
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "onyxc_int.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
-typedef unsigned char uc;
|
||||
-
|
||||
static void lf_init_lut(loop_filter_info_n *lfi)
|
||||
{
|
||||
int filt_lvl;
|
@ -120,16 +120,20 @@ MODULES = {
|
||||
'VP8_COMMON_SRCS-$(HAVE_MEDIA)',
|
||||
'VP8_COMMON_SRCS-$(HAVE_NEON)',
|
||||
'VP9_COMMON_SRCS-$(HAVE_NEON)',
|
||||
'VP9_COMMON_SRCS-$(HAVE_NEON_ASM)',
|
||||
'VP8_CX_SRCS-$(ARCH_ARM)',
|
||||
'VP8_CX_SRCS-$(HAVE_EDSP)',
|
||||
'VP8_CX_SRCS-$(HAVE_MEDIA)',
|
||||
'VP8_CX_SRCS-$(HAVE_NEON)',
|
||||
'VP8_CX_SRCS-$(HAVE_NEON_ASM)',
|
||||
'VP9_CX_SRCS-$(HAVE_NEON)',
|
||||
],
|
||||
'ERROR_CONCEALMENT': [
|
||||
'VP8_DX_SRCS-$(CONFIG_ERROR_CONCEALMENT)',
|
||||
],
|
||||
'AVX2': [
|
||||
'VP9_COMMON_SRCS-$(HAVE_AVX2)',
|
||||
'VP9_CX_SRCS-$(HAVE_AVX2)',
|
||||
],
|
||||
'VP8_POSTPROC': [
|
||||
'VP8_COMMON_SRCS-$(CONFIG_POSTPROC)',
|
||||
@ -140,12 +144,14 @@ MODULES = {
|
||||
}
|
||||
|
||||
DISABLED_MODULES = [
|
||||
'API_SRCS-$(CONFIG_SPATIAL_SVC)',
|
||||
'MEM_SRCS-$(CONFIG_MEM_MANAGER)',
|
||||
'MEM_SRCS-$(CONFIG_MEM_TRACKER)',
|
||||
'VP8_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER)',
|
||||
'VP9_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER)',
|
||||
'VP8_CX_SRCS-$(CONFIG_INTERNAL_STATS)',
|
||||
'VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS)',
|
||||
'VP9_CX_SRCS-$(CONFIG_VP9_TEMPORAL_DENOISING)',
|
||||
|
||||
# mips files are also ignored via ignored_folders
|
||||
'SCALE_SRCS-$(HAVE_DSPR2)',
|
||||
@ -205,23 +211,95 @@ files = {
|
||||
'vpx/vpx_codec.h',
|
||||
'vpx/vpx_decoder.h',
|
||||
'vpx/vpx_encoder.h',
|
||||
'vpx/vpx_frame_buffer.h',
|
||||
'vpx/vpx_image.h',
|
||||
'vpx/vpx_integer.h',
|
||||
],
|
||||
'X86-64_ASM': [
|
||||
'third_party/x86inc/x86inc.asm',
|
||||
'vp8/common/x86/loopfilter_block_sse2.asm',
|
||||
'vp9/encoder/x86/vp9_quantize_ssse3.asm',
|
||||
'vp8/common/x86/loopfilter_block_sse2_x86_64.asm',
|
||||
'vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm',
|
||||
],
|
||||
'SOURCES': [
|
||||
'vp8/common/rtcd.c',
|
||||
'vp8/common/sad_c.c',
|
||||
'vp8/encoder/bitstream.c',
|
||||
'vp8/encoder/onyx_if.c',
|
||||
'vp8/vp8_dx_iface.c',
|
||||
'vp9/common/vp9_alloccommon.c',
|
||||
'vp9/common/vp9_blockd.c',
|
||||
'vp9/common/vp9_common_data.c',
|
||||
'vp9/common/vp9_convolve.c',
|
||||
'vp9/common/vp9_debugmodes.c',
|
||||
'vp9/common/vp9_entropy.c',
|
||||
'vp9/common/vp9_entropymode.c',
|
||||
'vp9/common/vp9_entropymv.c',
|
||||
'vp9/common/vp9_filter.c',
|
||||
'vp9/common/vp9_frame_buffers.c',
|
||||
'vp9/common/vp9_idct.c',
|
||||
'vp9/common/vp9_loopfilter.c',
|
||||
'vp9/common/vp9_loopfilter_filters.c',
|
||||
'vp9/common/vp9_mvref_common.c',
|
||||
'vp9/common/vp9_pred_common.c',
|
||||
'vp9/common/vp9_prob.c',
|
||||
'vp9/common/vp9_quant_common.c',
|
||||
'vp9/common/vp9_reconinter.c',
|
||||
'vp9/common/vp9_reconintra.c',
|
||||
'vp9/common/vp9_rtcd.c',
|
||||
'vp9/common/vp9_scale.c',
|
||||
'vp9/common/vp9_scan.c',
|
||||
'vp9/common/vp9_seg_common.c',
|
||||
'vp9/common/vp9_thread.c',
|
||||
'vp9/common/vp9_tile_common.c',
|
||||
'vp9/decoder/vp9_decodeframe.c',
|
||||
'vp9/decoder/vp9_decodemv.c',
|
||||
'vp9/decoder/vp9_decoder.c',
|
||||
'vp9/decoder/vp9_detokenize.c',
|
||||
'vp9/decoder/vp9_dsubexp.c',
|
||||
'vp9/decoder/vp9_dthread.c',
|
||||
'vp9/decoder/vp9_reader.c',
|
||||
'vp9/encoder/vp9_bitstream.c',
|
||||
'vp9/encoder/vp9_aq_complexity.c',
|
||||
'vp9/encoder/vp9_aq_cyclicrefresh.c',
|
||||
'vp9/encoder/vp9_aq_variance.c',
|
||||
'vp9/encoder/vp9_context_tree.c',
|
||||
'vp9/encoder/vp9_cost.c',
|
||||
'vp9/encoder/vp9_dct.c',
|
||||
'vp9/encoder/vp9_encodeframe.c',
|
||||
'vp9/encoder/vp9_encodemb.c',
|
||||
'vp9/encoder/vp9_encodemv.c',
|
||||
'vp9/encoder/vp9_encoder.c',
|
||||
'vp9/encoder/vp9_extend.c',
|
||||
'vp9/encoder/vp9_firstpass.c',
|
||||
'vp9/encoder/vp9_lookahead.c',
|
||||
'vp9/encoder/vp9_mbgraph.c',
|
||||
'vp9/encoder/vp9_mcomp.c',
|
||||
'vp9/encoder/vp9_picklpf.c',
|
||||
'vp9/encoder/vp9_pickmode.c',
|
||||
'vp9/encoder/vp9_quantize.c',
|
||||
'vp9/encoder/vp9_ratectrl.c',
|
||||
'vp9/encoder/vp9_rd.c',
|
||||
'vp9/encoder/vp9_rdopt.c',
|
||||
'vp9/encoder/vp9_resize.c',
|
||||
'vp9/encoder/vp9_sad.c',
|
||||
'vp9/encoder/vp9_segmentation.c',
|
||||
'vp9/encoder/vp9_speed_features.c',
|
||||
'vp9/encoder/vp9_subexp.c',
|
||||
'vp9/encoder/vp9_svc_layercontext.c',
|
||||
'vp9/encoder/vp9_temporal_filter.c',
|
||||
'vp9/encoder/vp9_tokenize.c',
|
||||
'vp9/encoder/vp9_treewriter.c',
|
||||
'vp9/encoder/vp9_variance.c',
|
||||
'vp9/encoder/vp9_write_bit_buffer.c',
|
||||
'vp9/encoder/vp9_writer.c',
|
||||
'vp9/vp9_cx_iface.c',
|
||||
'vp9/vp9_dx_iface.c',
|
||||
'vpx/src/svc_encodeframe.c',
|
||||
'vpx/src/vpx_encoder.c',
|
||||
'vpx_mem/vpx_mem.c',
|
||||
'vpx_scale/vpx_scale_rtcd.c',
|
||||
'vpx_scale/generic/yv12config.c',
|
||||
'vpx_scale/generic/yv12extend.c',
|
||||
]
|
||||
}
|
||||
|
||||
@ -230,8 +308,8 @@ manual = [
|
||||
'vp8/encoder/boolhuff.c',
|
||||
|
||||
# 64bit only
|
||||
'vp8/common/x86/loopfilter_block_sse2.asm',
|
||||
'vp9/encoder/x86/vp9_quantize_ssse3.asm',
|
||||
'vp8/common/x86/loopfilter_block_sse2_x86_64.asm',
|
||||
'vp9/encoder/x86/vp9_quantize_ssse3_x86_64.asm',
|
||||
|
||||
# offsets are special cased in Makefile.in
|
||||
'vp8/encoder/vp8_asm_enc_offsets.c',
|
||||
@ -450,9 +528,7 @@ def update_and_remove_files(prefix, libvpx_files, files):
|
||||
|
||||
def apply_patches():
|
||||
# Patch to permit vpx users to specify their own <stdint.h> types.
|
||||
os.system("patch -p3 < stdint.patch")
|
||||
os.system("patch -p3 < unified.patch")
|
||||
os.system("patch -p3 < mingw.patch")
|
||||
os.system("patch -p0 < stdint.patch")
|
||||
|
||||
def update_readme(commit):
|
||||
with open('README_MOZILLA') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user