Merge remote branch 'internal/upstream' into HEAD
This commit is contained in:
commit
1d0db7134e
@ -562,6 +562,9 @@ process_common_toolchain() {
|
||||
mips*) enable mips;;
|
||||
esac
|
||||
|
||||
# PIC is probably what we want when building shared libs
|
||||
enabled shared && soft_enable pic
|
||||
|
||||
# Handle darwin variants
|
||||
case ${toolchain} in
|
||||
*-darwin8-gcc)
|
||||
@ -880,9 +883,9 @@ process_common_toolchain() {
|
||||
enabled gcov &&
|
||||
check_add_cflags -fprofile-arcs -ftest-coverage &&
|
||||
check_add_ldflags -fprofile-arcs -ftest-coverage
|
||||
enabled optimizations && check_add_cflags -O3
|
||||
if enabled rvct; then
|
||||
enabled optimizations && check_add_cflags -Otime
|
||||
if enabled optimizations; then
|
||||
enabled rvct && check_add_cflags -Otime
|
||||
enabled small && check_add_cflags -O2 || check_add_cflags -O3
|
||||
fi
|
||||
|
||||
# Position Independant Code (PIC) support, for building relocatable
|
||||
|
3
configure
vendored
3
configure
vendored
@ -38,6 +38,7 @@ Advanced options:
|
||||
${toggle_realtime_only} enable this option while building for real-time encoding
|
||||
${toggle_runtime_cpu_detect} runtime cpu detection
|
||||
${toggle_shared} shared library support
|
||||
${toggle_small} favor smaller size over speed
|
||||
${toggle_arm_asm_detok} assembly version of the detokenizer (ARM platforms only)
|
||||
|
||||
Codecs:
|
||||
@ -246,6 +247,7 @@ CONFIG_LIST="
|
||||
spatial_resampling
|
||||
realtime_only
|
||||
shared
|
||||
small
|
||||
arm_asm_detok
|
||||
|
||||
experimental
|
||||
@ -286,6 +288,7 @@ CMDLINE_SELECT="
|
||||
spatial_resampling
|
||||
realtime_only
|
||||
shared
|
||||
small
|
||||
arm_asm_detok
|
||||
experimental
|
||||
"
|
||||
|
@ -96,6 +96,7 @@ typedef struct VP8Decompressor
|
||||
// variable for threading
|
||||
#if CONFIG_MULTITHREAD
|
||||
int mt_baseline_filter_level[MAX_MB_SEGMENTS];
|
||||
int sync_range;
|
||||
int *mt_current_mb_col; // Each row remembers its already decoded column.
|
||||
|
||||
unsigned char **mt_yabove_row; // mb_rows x width
|
||||
|
@ -257,6 +257,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
|
||||
int mb_row;
|
||||
int num_part = 1 << pbi->common.multi_token_partition;
|
||||
volatile int *last_row_current_mb_col;
|
||||
int nsync = pbi->sync_range;
|
||||
|
||||
for (mb_row = ithread+1; mb_row < pc->mb_rows; mb_row += (pbi->decoding_thread_count + 1))
|
||||
{
|
||||
@ -292,9 +293,9 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
|
||||
|
||||
for (mb_col = 0; mb_col < pc->mb_cols; mb_col++)
|
||||
{
|
||||
if ((mb_col & 7) == 0)
|
||||
if ((mb_col & (nsync-1)) == 0)
|
||||
{
|
||||
while (mb_col > (*last_row_current_mb_col - 8) && *last_row_current_mb_col != pc->mb_cols - 1)
|
||||
while (mb_col > (*last_row_current_mb_col - nsync) && *last_row_current_mb_col != pc->mb_cols - 1)
|
||||
{
|
||||
x86_pause_hint();
|
||||
thread_sleep(0);
|
||||
@ -608,6 +609,11 @@ int vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
|
||||
if ((width & 0xf) != 0)
|
||||
width += 16 - (width & 0xf);
|
||||
|
||||
if (width < 640) pbi->sync_range = 1;
|
||||
else if (width <= 1280) pbi->sync_range = 8;
|
||||
else if (width <= 2560) pbi->sync_range =16;
|
||||
else pbi->sync_range = 32;
|
||||
|
||||
uv_width = width >>1;
|
||||
|
||||
// Allocate an int for each mb row.
|
||||
@ -764,6 +770,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
|
||||
int num_part = 1 << pbi->common.multi_token_partition;
|
||||
int i, j;
|
||||
volatile int *last_row_current_mb_col = NULL;
|
||||
int nsync = pbi->sync_range;
|
||||
|
||||
int filter_level;
|
||||
loop_filter_info *lfi = pc->lf_info;
|
||||
@ -832,8 +839,8 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
|
||||
|
||||
for (mb_col = 0; mb_col < pc->mb_cols; mb_col++)
|
||||
{
|
||||
if ( mb_row > 0 && (mb_col & 7) == 0){
|
||||
while (mb_col > (*last_row_current_mb_col - 8) && *last_row_current_mb_col != pc->mb_cols - 1)
|
||||
if ( mb_row > 0 && (mb_col & (nsync-1)) == 0){
|
||||
while (mb_col > (*last_row_current_mb_col - nsync) && *last_row_current_mb_col != pc->mb_cols - 1)
|
||||
{
|
||||
x86_pause_hint();
|
||||
thread_sleep(0);
|
||||
|
@ -1 +1,2 @@
|
||||
data vpx_codec_vp8_dx_algo
|
||||
text vpx_codec_vp8_dx
|
||||
|
@ -1 +1,2 @@
|
||||
data vpx_codec_vp8_cx_algo
|
||||
text vpx_codec_vp8_cx
|
||||
|
@ -81,8 +81,6 @@ VP8_COMMON_SRCS-yes += common/recon.c
|
||||
VP8_COMMON_SRCS-yes += common/reconinter.c
|
||||
VP8_COMMON_SRCS-yes += common/reconintra.c
|
||||
VP8_COMMON_SRCS-yes += common/reconintra4x4.c
|
||||
VP8_COMMON_SRCS-yes += common/reconintra_mt.h
|
||||
VP8_COMMON_SRCS-yes += common/reconintra_mt.c
|
||||
VP8_COMMON_SRCS-yes += common/setupintrarecon.c
|
||||
VP8_COMMON_SRCS-yes += common/swapyv12buffer.c
|
||||
VP8_COMMON_SRCS-yes += common/textblit.c
|
||||
|
@ -1100,7 +1100,7 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] =
|
||||
#ifndef VERSION_STRING
|
||||
#define VERSION_STRING
|
||||
#endif
|
||||
vpx_codec_iface_t vpx_codec_vp8_cx_algo =
|
||||
CODEC_INTERFACE(vpx_codec_vp8_cx) =
|
||||
{
|
||||
"WebM Project VP8 Encoder" VERSION_STRING,
|
||||
VPX_CODEC_INTERNAL_ABI_VERSION,
|
||||
|
@ -653,7 +653,7 @@ vpx_codec_ctrl_fn_map_t vp8_ctf_maps[] =
|
||||
#ifndef VERSION_STRING
|
||||
#define VERSION_STRING
|
||||
#endif
|
||||
vpx_codec_iface_t vpx_codec_vp8_dx_algo =
|
||||
CODEC_INTERFACE(vpx_codec_vp8_dx) =
|
||||
{
|
||||
"WebM Project VP8 Decoder" VERSION_STRING,
|
||||
VPX_CODEC_INTERNAL_ABI_VERSION,
|
||||
|
@ -67,6 +67,8 @@ VP8_DX_SRCS-yes += decoder/treereader.h
|
||||
VP8_DX_SRCS-yes += decoder/onyxd_if.c
|
||||
VP8_DX_SRCS-yes += decoder/threading.c
|
||||
VP8_DX_SRCS-yes += decoder/idct_blk.c
|
||||
VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.h
|
||||
VP8_DX_SRCS-$(CONFIG_MULTITHREAD) += decoder/reconintra_mt.c
|
||||
|
||||
VP8_DX_SRCS-yes := $(filter-out $(VP8_DX_SRCS_REMOVE-yes),$(VP8_DX_SRCS-yes))
|
||||
|
||||
|
@ -389,6 +389,20 @@ struct vpx_codec_priv
|
||||
#define RECAST(id, x) id##__convert(x)
|
||||
|
||||
|
||||
/* CODEC_INTERFACE convenience macro
|
||||
*
|
||||
* By convention, each codec interface is a struct with extern linkage, where
|
||||
* the symbol is suffixed with _algo. A getter function is also defined to
|
||||
* return a pointer to the struct, since in some cases it's easier to work
|
||||
* with text symbols than data symbols (see issue #169). This function has
|
||||
* the same name as the struct, less the _algo suffix. The CODEC_INTERFACE
|
||||
* macro is provided to define this getter function automatically.
|
||||
*/
|
||||
#define CODEC_INTERFACE(id)\
|
||||
vpx_codec_iface_t* id(void) { return &id##_algo; }\
|
||||
vpx_codec_iface_t id##_algo
|
||||
|
||||
|
||||
/* Internal Utility Functions
|
||||
*
|
||||
* The following functions are indended to be used inside algorithms as
|
||||
|
@ -29,7 +29,8 @@
|
||||
* This interface provides the capability to encode raw VP8 streams, as would
|
||||
* be found in AVI files.
|
||||
*/
|
||||
extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
|
||||
extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
|
||||
extern vpx_codec_iface_t* vpx_codec_vp8_cx(void);
|
||||
|
||||
|
||||
#if CONFIG_EXPERIMENTAL
|
||||
|
@ -29,7 +29,8 @@
|
||||
* This interface provides the capability to decode raw VP8 streams, as would
|
||||
* be found in AVI files and other non-Flash uses.
|
||||
*/
|
||||
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
||||
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
||||
extern vpx_codec_iface_t* vpx_codec_vp8_dx(void);
|
||||
|
||||
/* Include controls common to both the encoder and decoder */
|
||||
#include "vp8.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user