Tero Rintaluoma [Mon, 28 Mar 2011 06:51:51 +0000 (09:51 +0300)]
Half pixel variance further optimized for ARMv6
Half pixel interpolations optimized in variance calculations. Separate
function calls to vp8_filter_block2d_bil_x_pass_armv6 are avoided.On
average, performance improvement is 6-7% for VGA@30fps sequences.
Johann [Thu, 10 Feb 2011 19:57:43 +0000 (14:57 -0500)]
use asm_offsets with vp8_regular_quantize_b_sse2
remove helper function and avoid shadowing all the arguments to the
stack on 64bit systems
when running with --good --cpu-used=0:
~2% on linux x86 and x86_64
~2% on win32 x86 msys and visual studio
more on darwin10 x86_64
significantly more on
x86_64-win64-vs9
John Koleszar [Mon, 21 Mar 2011 11:50:42 +0000 (07:50 -0400)]
Allow specifying --end-usage by enum name
Map an enum to the --end-usage values, so you can specify
--end-usage=cq instead of --end-usage=2. The numerical values still
work for historical scripts, etc, but this is more user friendly.
Tero Rintaluoma [Mon, 21 Mar 2011 11:33:45 +0000 (13:33 +0200)]
ARMv6 optimized fdct4x4
Optimized fdct4x4 (8x4) for ARMv6 instruction set.
- No interlocks in Cortex-A8 pipeline
- One interlock cycle in ARM11 pipeline
- About 2.16 times faster than current C-code compiled with -O3
Attila Nagy [Fri, 18 Mar 2011 08:44:08 +0000 (10:44 +0200)]
Fix multithreaded encoding for 1 MB wide frame
Thread synchronization was not correct when frame width was 1 MB.
Number of allocated encoding threads is limited by the sync_range.
There is no point having more because each thread lags sync_range MBs
behind the thread processing the row above.
John Koleszar [Thu, 17 Mar 2011 21:07:59 +0000 (17:07 -0400)]
Increase static linkage, remove unused functions
A large number of functions were defined with external linkage, even
though they were only used from within one file. This patch changes
their linkage to static and removes the vp8_ prefix from their names,
which should make it more obvious to the reader that the function is
contained within the current translation unit. Functions that were
not referenced were removed.
Ralph Giles [Thu, 17 Mar 2011 07:23:36 +0000 (00:23 -0700)]
Set bounds from the array when iterating mmaps.
The mmap allocation code in vp8_dx_iface.c was inconsistent.
The static array vp8_mem_req_segs defines two descriptors,
but only the first is real. The second is a sentinel and
isn't actually allocated, so vpx_codec_alg_priv is declared
with mmaps[NELEMENTS(vp8_mem_req_segs)-1]. Some functions
use this reduced upper bound when iterating though the mmap
array, but these two functions did not.
Instead, this commit calls NELEMENTS(...->mmaps) to directly
query the bounds of the dereferenced array.
This fixes an array-bounds warning from gcc 4.6 on
vp8_xma_set_mmap.
John Koleszar [Thu, 29 Jul 2010 21:04:39 +0000 (17:04 -0400)]
apple: include proper mach primatives
Fixes implicit declaration warning for 'mach_task_self'. This change
is an update to Change I9991dedd1ccfddc092eca86705ecbc3b764b799d,
which fixed this issue for the decoder but not the encoder.
Without this change I get link errors in firefox's libxul. It looks
like the linker expect a particular pattern for getting the GOT. This
patch changes webm to use the same pattern used by the compiler.
John Koleszar [Fri, 11 Mar 2011 16:35:38 +0000 (11:35 -0500)]
Move build_intra_predictors_mby to RTCD framework
The vp8_build_intra_predictors_mby and vp8_build_intra_predictors_mby_s
functions had global function pointers rather than using the RTCD
framework. This can show up as a potential data race with tools such as
helgrind. See https://bugzilla.mozilla.org/show_bug.cgi?id=640935
for an example.
Paul Wilkins [Fri, 11 Mar 2011 14:51:40 +0000 (14:51 +0000)]
Clean up of vp8_init_config()
Clean up vp8_init_config() a bit and remove null pointer case,
as this code can't be called any more and is not an adequate
trap anyway, as a null pointer would cause exceptions before
hitting the test.
Paul Wilkins [Thu, 10 Mar 2011 16:11:39 +0000 (16:11 +0000)]
1 Pass CQ and VBR bug fixes
Issue 291 highlighted the fact that CQ mode was not working
as expected in 1 pass mode,
This commit fixes that specific problem but in so doing I also
uncovered an overflow issue in the VBR code for 1 pass and
some data values not being correctly initialized.
For some clips (particularly short clips), the resulting
improvement is dramatic.
Attila Nagy [Fri, 25 Feb 2011 11:42:05 +0000 (13:42 +0200)]
Encoder loopfilter running in its own thread
In multithreaded mode the loopfilter is running in its own thread (filter level
calculation and frame filtering). Filtering is mostly done in parallel with the
bitstream packing. Before starting the packing the loopfilter level has
to be calculated. Also any needed reference frame copying is done in the
filter thread.
Currently the encoder will create n+1 threads, where n > 1 is the number of
threads specified by application and 1 is the extra filter thread. With n = 1
the encoder runs in single thread mode. There will never be more than n threads
running concurrently.
Johann [Wed, 2 Mar 2011 14:44:39 +0000 (09:44 -0500)]
obj_int_extract for Visual Studio
Enable extraction of assembly offsets from compiled examples in MSVS.
This will allow us to remove some stub functions from x86 assembly since
we will be able to reliably determine structure offsets at compile time.
see ARM code for examples:
vp8/encoder/arm/armv5te/
vpx_scale/arm/neon/
Adrian Grange [Thu, 10 Mar 2011 19:32:48 +0000 (11:32 -0800)]
Removed firstpass motion map
The firstpass motion map consists of an 8-bit flag for
each MB indicating how strongly the firstpass code
believes it should be filtered during the second pass
ARNR filtering.
For long or large format material the motion map can
become extremely large and hamper the operation of
the encoding process.
This change removes the motion map altogether, leaving
the second pass to rely on the magnitude of the motion
compensated error to determine the filter weight to
use for the MB during ARNR filtering.
Tests on the derf set indicate that the effect of this
change is neutral, with some small wins and losses. The
motion map has therefore been removed based on
a cost/benefit evaluation.
James Berry [Thu, 10 Mar 2011 16:13:44 +0000 (11:13 -0500)]
Fix incorrect macroblock counts in twopass rate control
The previous calculation of macroblock count (w*h)/256
is not correct when the width/height are not multiples of
16. Use the precalculated macroblock count from
cpi->common instead. This manifested itself as a divide
by zero when the number of pixels was less than 256.
num_mbs updated in estimate_max_q, estimate_q,
estimate_kf_group_q, and estimate_cq
Ralph Giles [Tue, 8 Mar 2011 22:51:23 +0000 (14:51 -0800)]
Fix an unused variable warning.
Move the update of the loopfilter info to the same block where it
is used. GCC 4.5 is not able trace the initialization of the local
filter_info across the other calls between the two conditionals on
pbi->common and issues an uninitialized variable warning.
Yunqing Wang [Fri, 4 Mar 2011 00:02:45 +0000 (19:02 -0500)]
Write SSSE3 sub-pixel filter function
1. Process 16 pixels at one time instead of 8.
2. Add check for both xoffset =0 and yoffset=0, which happens
during motion search.
This change gave encoder 1%~3% performance gain.
Ralph Giles [Tue, 8 Mar 2011 15:14:12 +0000 (07:14 -0800)]
Fix a multi-line format-string warning.
GCC 4.5 and 4.6 both issue a warning about the multi-line format
string introduced in bc9c30a0, which also changed the whitespace
in the associated stt file by line-wrapping the long format string.
Instead, use multiple string constants, which the compiler will
concatenate. This maintains the original formatting, but remains
legible within the standard line length.
John Koleszar [Tue, 8 Mar 2011 01:58:37 +0000 (20:58 -0500)]
correct zbin boost for splitmv mode
Disable zbin boost in SPLITMV mode as intended. Was incorrectly looking
at vp8_ref_frame_order instead of vp8_mode_order when comparing against
SPLITMV. This condition should have always been false, as SPLITMV is
not in the range of valid reference frames.
Paul Wilkins [Mon, 7 Mar 2011 15:58:07 +0000 (15:58 +0000)]
Improved key frame detection.
In some cases where clips have been encoded with
borders (eg. some wide-screen content where there is a
border top and bottom and slide shows containing portrait
format photographs (border left and right)) key frames were
not being correctly detected.
The new code looks to measure cases where a portion of
the image can be coded equally easily using intra or inter
modes and where the resulting error score is also very low.
These "neutral" areas are then discounted in the key frame
detection code.
Paul Wilkins [Mon, 7 Mar 2011 15:11:09 +0000 (15:11 +0000)]
Improved KF insertion after fades to still.
This code extends what was previously done for GFs, to pick
cases where insertion of a key frame after a fade (or other
transition or complex motion) followed by a still section, will
be beneficial and will reduce the number of forced key frames.