summaryrefslogtreecommitdiff
path: root/vp8/common
AgeCommit message (Collapse)Author
2010-10-21Convert [4][4] matrices to [16] arrays.Timothy B. Terriberry
Most of the code that actually uses these matrices indexes them as if they were a single contiguous array, and coverity produces reports about the resulting accesses that overflow the static bounds of the first row. This is perfectly legal in C, but converting them to actual [16] arrays should eliminate the report, and removes a good deal of extraneous indexing and address operators from the code. Change-Id: Ibda479e2232b3e51f9edf3b355b8640520fdbf23
2010-10-19Merge "fixed a typo that mis-used Y plane stride for UV blocks."Yaowu Xu
2010-10-14Fix one gcc compiler warningYunqing Wang
../libvpx/vp8/encoder/bitstream.c: In function ‘pack_inter_mode_mvs’: ../libvpx/vp8/encoder/bitstream.c:1026: warning: array subscript has type ‘char’ Change-Id: Ic77491e0a172fa1821e5b3e914d0dc41fe87c00f
2010-10-04nasm: movhps compatibility QWORD->MMWORDJan Kratochvil
Filed for nasm as: https://sourceforge.net/tracker/?func=detail&atid=106208&aid=3081103&group_id=6208 nasm just does not accept any size parameter for movhps: 1.asm:2: error: mismatch in operand sizes Some parts of libvpx already use MMWORD for movhps and MMWORD is defined-out so it is compatible both with yasm and nasm. Provide nasm compatibility. No binary change by this patch with yasm on {x86_64,i686}-fedora13-linux-gnu. Change-Id: I4008a317ca87ec07c9ada958fcdc10a0cb589bbc
2010-10-04nasm: address labels 'rel label' vice 'wrt rip'Jan Kratochvil
nasm does not support `label wrt rip', it requires `rel label'. It is still fully compatible with yasm. Provide nasm compatibility. No binary change by this patch with yasm on {x86_64,i686}-fedora13-linux-gnu. Few longer opcodes with nasm on {x86_64,i686}-fedora13-linux-gnu have been checked as safe. Change-Id: I488773a4e930a56e43b0cc72d867ee5291215f50
2010-10-04nasm: match instruction length (movd/movq) to parametersJan Kratochvil
nasm requires the instruction length (movd/movq) to match to its parameters. I find it more clear to really use 64bit instructions when we use 64bit registers in the assembly. Provide nasm compatibility. No binary change by this patch with yasm on {x86_64,i686}-fedora13-linux-gnu. Few longer opcodes with nasm on {x86_64,i686}-fedora13-linux-gnu have been checked as safe. Change-Id: Id9b1a5cdfb1bc05697e523c317a296df43d42a91
2010-10-04fixed a typo that mis-used Y plane stride for UV blocks.Yaowu Xu
Raised by Lei Yang, the Y plane stride was used for UV blocks. This is clearly a typo. But as the comments in the code suggested that this port of code has not been used yet, so the typo should not have created any damage yet. Change-Id: Iea895edc17469a51c803a8cc6d0fce65a1a7fc2f
2010-10-01Merge "Fix valgrind errors in the NEON loop filters."Johann
2010-09-30Fix valgrind errors in the NEON loop filters.Timothy B. Terriberry
Like the ARMv6 code, these functions were accessing values below the stack pointer, which can be corrupted by signal delivery at any time.
2010-09-30Merge "Fix loopfilter delta zero transitions"John Koleszar
2010-09-29Merge "Optimizations on the loopfilters."Fritz Koenig
2010-09-29Fix loopfilter delta zero transitionsJohn Koleszar
Loopfilter deltas are initialized to zero on keyframes in the decoder. The values then persist from the previous frame unless an update bit is set in the bitstream. This data is not included in the entropy data saved by the 'refresh entropy' bit in the bitstream, so it is effectively an additional contextual element beyond the 3 ref-frames and the entropy data. The encoder was treating this delta update bit as update-if-nonzero, meaning that the value would be refreshed even if it hadn't changed, and more significantly, if the correct value for the delta changed to zero, the update wouldn't be sent, and the decoder would preserve the last (presumably non-zero) value. This patch updates the encoder to send an update only if the value has changed from the previously transmitted value. It also forces the value to be transmitted in error resilient mode, to account for lost context in the event of lost frames. Change-Id: I56671d5b42965d0166ac226765dbfce3e5301868
2010-09-28Optimizations on the loopfilters.Fritz Koenig
- Scheduling for Atom processors - Combining of macros to allow for better interleaving - Change from multiplies to adds for main filter - Use of movhps/movlps to fill xmm registers without shifting and orring Change-Id: I0b3500a5f58abf7085253ec92d64c8a96723040b
2010-09-27Add 4-tap version of 2nd-pass ARMv6 MC filter.Timothy B. Terriberry
The existing code applied a 6-tap filter with 0's on either end. We're already paying the branch penalty to avoid computing the two extra columns needed as input to this filter. We might as well save time computing the filter as well. This reduces the inner loop from 21 instructions to 16, the number of loads per iteration from 4 to 1, and the number of multiplies from 7 to 4. The gain in overall decoding performance, however, is small (less than 1%). This change also means we now valgrind clean on ARMv6, which is its real purpose. The errors reported here were valgrind's fault (it does not detect that 0 times an uninitialized value is initialized), but Julian Seward says it would slow down valgrind considerably to make such checks. Speeding up libvpx rather, even by a small amount, seems a much better idea if only to enable proper valgrind checking of the rest of the codec. Change-Id: Ifb376ea195e086b60f61daf1097d8910c4d8ff16
2010-09-27move reconintra_mt to decoder (fixup)John Koleszar
Missed the .h file in the move. Change-Id: Ib408183fbb4d019fd46394b362f89ca6ea9d10bc
2010-09-27Merge "combine max values and compare once"Johann
2010-09-24Fix valgrind errors in vp8_sixtap_predict8x4_armv6().Timothy B. Terriberry
This function was accessing values below the stack pointer, which can be corrupted by signal delivery at any time. Change-Id: I92945b30817562eb0340f289e74c108da72aeaca
2010-09-24combine max values and compare onceJohann
previous implementation compared each set of values to limit and then &'d them together, requiring a compare and & for each value. this does the accumulation first, requiring only one compare Change-Id: Ia5e3a1a50e47699c88470b8c41964f92a0dc1323
2010-09-24move reconintra_mt to decoder (for now)John Koleszar
reconintra_mt.c is only required for building the decoder right now. It could definitely be used for the encoder in the future, but it currently depends on decoder only data structures. (onyxd_int.h, VP8D_COMP, etc). Move it from common/ to decoder/ until the necessary changes to the common multithread code are complete. This patch is needed to build with --disable-vp8-decoder. Change-Id: I568c52221a2b309234d269675cba97131ce35c86
2010-09-22Remove dead codeJohann
The new loopfilter was originally introduced as an experimental change. It's permanent now. Change-Id: I25dbedb6ceff3e9f9c04e18bb29f84c3ecb7e546
2010-09-21Merge "Restructure multi-threaded decoder"Yunqing Wang
2010-09-20Use movq instead of movdqu.Fritz Koenig
Movdqu is more expensive (throughput, uops) than movq. Minimal impact for newer big cores, but ~2.25% gain on Atom. Change-Id: I62c80bb1cc01d8a91c350c4c7719462809a4ef7f
2010-09-20Better choice of instruction filter mask comparision.Fritz Koenig
Use pmaxub instead of a combination of psubusb/por to determine if any comparisons go over the limit. Change-Id: I3f0bd7d2aabe5fee9ba6620508e2b60605abcb82
2010-09-17Restructure multi-threaded decoderYunqing Wang
On each MB, loopfiltering is done right after MB decoding. This combines two loops in multi-threaded code into one, which reduces number of synchronizations to half. The above-row/left-col data are saved in temp buffers for next-row/next MB decoding. Tests on 4-core gLucid machine showed 10% decoder performance gain with threads=4 (tulip clip). Testing on other platforms isn't done yet. Change-Id: Id18ea7c1e84965dabea65d4c01ca5bc056ddeac9
2010-09-13Removed unnecessary pxor.Fritz Koenig
There is no need to make sure that the lower byte of the register is 0 because the downshift by 11 overwrites that byte. Change-Id: I89cbf004b2ff532a2c68e0dc399c45a49cdad5a1
2010-09-10Make block access to frame buffer sequentialFritz Koenig
Sequentially accessing memory from a low address to a high address should make it easier for the processor to predict the cache. Change-Id: I1921ce996bdd547144fe864fea6435f527f5842d
2010-09-09Merge branch 'master' of git://review.webmproject.org/libvpxFritz Koenig
2010-09-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-07Bilinear subpixel optimizations for ssse3.Fritz Koenig
Used pmaddubsw for multiply and add of two filter taps at once for 16x16 and 8x8 blocks. Change-Id: Idccf2d6e094561624407b109fa7e80ba799355ea
2010-09-03Reduced the size of MB_MODE_INFOScott LaVarnway
Moved partition_bmi and partition_count out of MB_MODE_INFO and placed into MACROBLOCK. Also reduced the size of other members of the MB_MODE_INFO struct. For 1080p, the memory was reduced by 1,209,516 bytes. The decoder performance appeared to improve by 3% for the clip used. Note: The main goal for this change is to improve the decoder performance. The encoder will be revisited at a later date for further structure cleanup. Change-Id: I4733621292ee9cc3fffa4046cb3fd4d99bd14613
2010-09-02encoder: remove postproc dependencyJames Zern
Remove the dependency on postproc.c for the encoder in general, the only unchecked need for it is when CONFIG_PSNR is enabled. All other cases are already wrapped in CONFIG_POSTPROC. In the CONFIG_PSNR case the file will still be included. Additionally, when VP8_SET_POSTPROC is used with the encoder when post processing has been disabled an error will be returned. This addresses issue #153. Change-Id: Ia6dfe20167f7077734a6058cbd1d794550346089
2010-08-31Replace sleep(0) calls in multi-threaded decoderYunqing Wang
This is a workaround for gLucid problem. Change-Id: I188a016a07e4c2ea212444c5a6284ff3c48a5caa
2010-08-31followup arm patchJohann
make the arm asm detokenizer work with the new structures Change-Id: I7cd92c2a018ec24032bb1cfd1bb9739bc84b444a
2010-08-31Changed above and left context data layoutScott LaVarnway
The main reason for the change was to reduce cycles in the token decoder. (~1.5% gain for 32 bit) This layout should be more cache friendly. As a result of this change, the encoder had to be updated. Change-Id: Id5e804169d8889da0378b3a519ac04dabd28c837 Note: dixie uses a similar layout
2010-08-27Fix harmless off-by-1 error.Timothy B. Terriberry
The memory being zeroed in vp8_update_mode_info_border() was just allocated with calloc, and so the entire function is actually redundant, but it should be made correct in case someone expects it to actually work in the future. Change-Id: If7a84e489157ab34ab77ec6e2fe034fb71cf8c79
2010-08-23Rework idct calling structure.Fritz Koenig
Moving the eob structure allows for a non-struct based function to handle decoding an entire mb of idct/dequant/recon data. This allows for SIMD functions to idct/dequant/recon multiple blocks at once. SSE2 implementation gives 3% gain on Atom. Change-Id: I8a8f3efd546ea4e0535f517d94f347cfb737c9c2
2010-08-19Revert "Removed ssse3 sixtap code"Jim Bankoski
This reverts commit 6ea5bb85cd1547b846f4c794e8684de5abcf9f62.
2010-08-19cleanup simple loop filterJohann
move some things around, reorder some instructions constant 0 is used several times. load it once per call in horiz, once per loop in vert. separate saturating instructions to avoid stalls. just use one usub8 call to set GE flags, rather than uqsub8 followed by usub8 w/ 0 document some stalls for further consideration Change-Id: Ic3877e0ddbe314bb8a17fd5db73501a7d64570ec
2010-08-19Merge "fix armv6 simpleloop filter"Johann
2010-08-19fix armv6 simpleloop filterJohann
test cases were causing a crash because the count was being read incorrectly. after fixing that, noticed that the output was not matching. fixed that. Change-Id: Idb0edb887736bd566a3cf6d4aa1a03ea8d20eb27
2010-08-18Removed ssse3 sixtap codeScott LaVarnway
Change-Id: I0f20fbb898ee31eb94a143471aa6f1ca17a229a4
2010-08-16store more vars than we removedJohann
only saved r4-11+lr, but were storing r4-r12+lr Change-Id: If77df1998af50e9badee7d99ef53543046434675
2010-08-13move segmentation_common to encoderJohn Koleszar
vp8_update_gf_useage_maps() is only used by the encoder. This patch fixes the ability to build in decode-only or encode-only configurations. Change-Id: I3a5211428e539886ba998e09e8abd747ac55c9aa
2010-08-12update structureJohann
mode_info_context->mbmi no longer gets copied up a level Change-Id: Icd2d27d381909721326c34594a1ccdc26d48a995
2010-08-12remove unused definitionJohann
asm_offsets contains some definitions which are no longer used. this was one of them. v6 build works now Change-Id: If370cfa8acd145de4fead2d9a11b048fccc090df
2010-08-12Removed unnecessary MB_MODE_INFO copiesScott LaVarnway
These copies occurred for each macroblock in the encoder and decoder. Thetemp MB_MODE_INFO mbmi was removed from MACROBLOCKD. As a result, a large number compile errors had to be fixed. Change-Id: I4cf0ffae3ce244f6db04a4c217d52dd256382cf3
2010-08-11Merge "Finished vp8_sixtap_predict4x4_ssse3 function"Scott LaVarnway
2010-08-11avoid negative array subscript warningsJohn Koleszar
The mv_ref and sub_mv_ref token encodings are indexed from NEARESTMV and LEFT4X4, respectively, rather than being zero-based like the other token encodings. Change-Id: I3699c3f84111209ecfb91097c4b900773e9a3ad5
2010-08-11Finished vp8_sixtap_predict4x4_ssse3 functionScott LaVarnway
Added vp8_filter_block1d4_h6_ssse3 and vp8_filter_block1d4_v6_ssse3 assembly routines. Also removed unused assembly. Change-Id: I01c1021835f2edda9da706822345f217087ca0d0
2010-08-11rename DETOK_[AL]Johann
everything else uses lowercase detok Change-Id: I9671e2e90eb2961208dfa81c00b3accb5749ec04