mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 947979 - Build parts of media/libvpx in unified mode; r=rillian
This commit is contained in:
parent
b7e2b9858e
commit
1758a70e95
@ -15,7 +15,11 @@ if CONFIG['VPX_NEED_OBJ_INT_EXTRACT']:
|
||||
|
||||
HOST_PROGRAM = 'host_obj_int_extract'
|
||||
|
||||
# Unify fewer files together to reduce the chance of name collision
|
||||
FILES_PER_UNIFIED_FILE = 8
|
||||
|
||||
SOURCES += files['SOURCES']
|
||||
UNIFIED_SOURCES += files['UNIFIED_SOURCES']
|
||||
|
||||
if CONFIG['MOZ_VPX_ERROR_CONCEALMENT']:
|
||||
SOURCES += files['ERROR_CONCEALMENT']
|
||||
|
@ -105,7 +105,7 @@ files = {
|
||||
'vpx_scale/arm/neon/yv12extend_arm.c'
|
||||
],
|
||||
'AVX2': ['vp9/common/x86/vp9_loopfilter_intrin_avx2.c'],
|
||||
'SOURCES': [
|
||||
'UNIFIED_SOURCES': [
|
||||
'vp8/common/alloccommon.c',
|
||||
'vp8/common/blockd.c',
|
||||
'vp8/common/debugmodes.c',
|
||||
@ -127,8 +127,6 @@ files = {
|
||||
'vp8/common/reconinter.c',
|
||||
'vp8/common/reconintra.c',
|
||||
'vp8/common/reconintra4x4.c',
|
||||
'vp8/common/rtcd.c',
|
||||
'vp8/common/sad_c.c',
|
||||
'vp8/common/setupintrarecon.c',
|
||||
'vp8/common/swapyv12buffer.c',
|
||||
'vp8/common/treecoder.c',
|
||||
@ -164,7 +162,6 @@ files = {
|
||||
'vp8/encoder/tokenize.c',
|
||||
'vp8/encoder/treewriter.c',
|
||||
'vp8/vp8_cx_iface.c',
|
||||
'vp8/vp8_dx_iface.c',
|
||||
'vp9/common/generic/vp9_systemdependent.c',
|
||||
'vp9/common/vp9_alloccommon.c',
|
||||
'vp9/common/vp9_common_data.c',
|
||||
@ -172,7 +169,6 @@ files = {
|
||||
'vp9/common/vp9_debugmodes.c',
|
||||
'vp9/common/vp9_entropy.c',
|
||||
'vp9/common/vp9_entropymode.c',
|
||||
'vp9/common/vp9_entropymv.c',
|
||||
'vp9/common/vp9_extend.c',
|
||||
'vp9/common/vp9_filter.c',
|
||||
'vp9/common/vp9_findnearmv.c',
|
||||
@ -184,7 +180,6 @@ files = {
|
||||
'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',
|
||||
@ -197,7 +192,6 @@ files = {
|
||||
'vp9/decoder/vp9_dsubexp.c',
|
||||
'vp9/decoder/vp9_onyxd_if.c',
|
||||
'vp9/decoder/vp9_thread.c',
|
||||
'vp9/encoder/vp9_bitstream.c',
|
||||
'vp9/encoder/vp9_boolhuff.c',
|
||||
'vp9/encoder/vp9_dct.c',
|
||||
'vp9/encoder/vp9_encodeframe.c',
|
||||
@ -225,18 +219,26 @@ files = {
|
||||
'vp9/encoder/vp9_variance_c.c',
|
||||
'vp9/vp9_cx_iface.c',
|
||||
'vp9/vp9_dx_iface.c',
|
||||
'vpx/src/svc_encodeframe.c',
|
||||
'vpx/src/vpx_codec.c',
|
||||
'vpx/src/vpx_decoder.c',
|
||||
'vpx/src/vpx_encoder.c',
|
||||
'vpx/src/vpx_image.c',
|
||||
'vpx_mem/vpx_mem.c',
|
||||
'vpx_scale/generic/gen_scalers.c',
|
||||
'vpx_scale/generic/vpx_scale.c',
|
||||
'vpx_scale/generic/yv12config.c',
|
||||
'vpx_scale/generic/yv12extend.c',
|
||||
'vpx_scale/vpx_scale_rtcd.c'
|
||||
],
|
||||
'SOURCES': [
|
||||
'vp8/common/rtcd.c',
|
||||
'vp8/common/sad_c.c',
|
||||
'vp8/vp8_dx_iface.c',
|
||||
'vp9/common/vp9_entropymv.c',
|
||||
'vp9/common/vp9_rtcd.c',
|
||||
'vp9/encoder/vp9_bitstream.c',
|
||||
'vpx/src/svc_encodeframe.c',
|
||||
'vpx_mem/vpx_mem.c',
|
||||
],
|
||||
'ERROR_CONCEALMENT': ['vp8/decoder/error_concealment.c'],
|
||||
'EXPORTS': ['vpx/vp8.h',
|
||||
'vpx/vp8cx.h',
|
||||
|
69
media/libvpx/unified.patch
Normal file
69
media/libvpx/unified.patch
Normal file
@ -0,0 +1,69 @@
|
||||
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
|
@ -444,6 +444,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")
|
||||
|
||||
def update_readme(commit):
|
||||
with open('README_MOZILLA') as f:
|
||||
|
@ -8,6 +8,8 @@
|
||||
* 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);
|
||||
@ -31,3 +33,5 @@ void setup_intra_recon_left(unsigned char *y_buffer,
|
||||
for (i = 0; i < 8; i++)
|
||||
v_buffer[uv_stride *i] = (unsigned char) 129;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,9 @@
|
||||
* 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)
|
||||
@ -95,3 +98,5 @@ static void once(void (*func)(void))
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user