summaryrefslogtreecommitdiff
path: root/vp8/encoder/picklpf.c
AgeCommit message (Collapse)Author
2012-06-11Fix pedantic compiler warningsJohn Koleszar
Allows building the library with the gcc -pedantic option, for improved portabilty. In particular, this commit removes usage of C99/C++ style single-line comments and dynamic struct initializers. This is a continuation of the work done in commit 97b766a46, which removed most of these warnings for decode only builds. Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-05-04Make global data constAttila Nagy
Removes all runtime initialization of global data. This commit is a squashed version of the following series cherry-picked from master. This is necessary because of a change that was merged to the tester that depends on the scaler being moved to the RTCD framework, which is a worthwhile thing to include in Eider anyway. - a91b42f02 Makes all global data in entropy.c const - b35a0db0e Makes all global data in tokenize.c const - 441cac8ea Makes all mode token tables const - 5948a0210 Ports vpx_xcaler to new RTCD method - 317d4244c Makes all mode token tables const part 2 Change-Id: Ifeaea24df2b731e7c509fa6c6ef6891a374afc26
2012-05-02Fix compiler warningsAttila Nagy
Fix code for following warnings: -Wimplicit-function-declaration -Wuninitialized -Wunused-but-set-variable -Wunused-variable Change-Id: I2be434f22fdecb903198e8b0711255b4c1a2947a
2012-01-30RTCD: finalize removal of old RTCD systemJohn Koleszar
This is the final commit in the series converting to the new RTCD system. It removes the encoder csystemdependent files and the remaining global function pointers that didn't conform to the old RTCD system. Change-Id: I9649706f1bb89f0cbf431ab0e3e7552d37be4d8e
2012-01-30RTCD: add arnr functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. It removes the last of the VP8_ENCODER_RTCD struct references. Change-Id: I2a44f52d7cccf5177e1ca98a028ead570d045395
2012-01-30RTCD: add variance functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538
2011-12-22Remove unnecessary ternary constructsJohn Koleszar
The code had a number of constructs like (condition)?1:0, which is redundant with C's semantics. In the cases where a boolean operator was used in the condition, simply remove the ternary part. Otherwise adjust the surrounding expression to remove the condition (eg, for rounding up. See pickinter.c and rdopt.c) Change-Id: Icb2372defa3783cf31857d90b2630d06b2c7e1be
2011-12-16fix: make sure ss_err is large enoughJames Berry
increase size of ss_err by one to make sure there is room for 64 elements. Change-Id: I355cb8c499aa7da3b9675f2326a8d25a74bb88d2
2011-12-14Avoid multiple test for same lvl in auto filter lvl pickAttila Nagy
Sometimes same level is tested 2-3 times; store and reuse the calculated error value. Change-Id: Ia1c04a2568232edf9a5a62c4e2d8e8a50d85e00e
2011-12-07Reduce mem copies in encoder loopfilter level pickingAttila Nagy
Do the test filtering in the existing backup frame buffer instead of the original. Copy the original data into extra buffer before doing the filtering. This way there is no need to restore the original unfiltered frame at the end of level picking process. This came up in some discussions with Johann. Thanks! Change-Id: I495f4301d983854673276c34ec0ddf9a9d622122
2011-10-26Reduce partial frame copy in encoder's pick_filter_level_fastAttila Nagy
The partial frame copy function used to copy an extra 8 lines above and below. The partial frame filtering can only modify 3 pixel rows above the partial frame. Reduce copy to bare minimum needed, which is 4 lines, so that partial filtering on copied frame is possible. Define the "magic" fraction number for partial filtering in loopfilter.h . Change-Id: I4791ffc541b6884b12759a0d0714a8faf16147ec
2011-10-19Don't copy borders for loop_filter_pickJohann
During the _pick only the Y plane is examined. In addition, data beyond the borders of the frame is not read. Change-Id: Ic549adfca70fc6e0b55f8aab0efe81f0afac89f9
2011-07-29Correctly track sharpness in vp8cx_pick_filter_level_fastJohn Koleszar
Make sure to update last_sharpness_level from the current sharpness_level whenever it changes. Change-Id: I0258d2f5b11a407abf6176a8d4c4994d925943f0
2011-07-22fix sharpness bug and clean upJohann
sharpness was not recalculated in vp8cx_pick_filter_level_fast remove last_filter_type. all values are calculated, don't need to update the lfi data when it changes. always use cm->sharpness_level. the extra indirection was annoying. don't track last frame_type or sharpness_level manually. frame type only matters for motion search and sharpness_level is taken care of in frame_init move function declarations to their proper header Change-Id: I7ef037bd4bf8cf5e37d2d36bd03b5e22a2ad91db
2011-06-29remove incorrect initializationJohann
Values were set, then reset. Only set them once. Change-Id: Iaf43c8467129f2f261f04fa9188b603aa46216b5
2011-05-19cleanup: collect twopass variablesJohn Koleszar
This patch collects the twopass specific memebers of VP8_COMP into a dedicated struct. This is a first step towards isolating the two pass rate control and aids readability by decorating these variables with the 'twopass.' namespace. This makes it clear to the reader in what contexts the variable will be valid, and is a hint that a section of code might be a good candidate to move to firstpass.c in later refactoring. There likely will be other rate control modes that need their own specific data as well. This notation is probably overly verbose in firstpass.c, so an alternative would be to access this struct through a pointer like 'rc->' instead of 'cpi->firstpass.' in that file. Feel free to make a review comment to that effect if you prefer. Change-Id: I0ab8254647cb4b493a77c16b5d236d0d4a94ca4d
2011-05-19Remove unused members of VP8_COMPJohn Koleszar
Various members that were either completely unreferenced or written and not read. Change-Id: Ie41ebac0ff0364a76f287586e4fe09a68907806e
2011-02-10Fix relative include pathsJohn Koleszar
Allow compiling without adding vp8/{common,encoder,decoder} to the include paths. Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
2011-01-31Removed last_auto_filter_prediction_errorScott LaVarnway
last_auto_filter_prediction_error is not really used. Change-Id: Ic6e56c4076bbd250ef783ee1be46964c85f62864
2010-10-25Add runtime CPU detection support for ARM.Timothy B. Terriberry
The primary goal is to allow a binary to be built which supports NEON, but can fall back to non-NEON routines, since some Android devices do not have NEON, even if they are otherwise ARMv7 (e.g., Tegra). The configure-generated flags HAVE_ARMV7, etc., are used to decide which versions of each function to build, and when CONFIG_RUNTIME_CPU_DETECT is enabled, the correct version is chosen at run time. In order for this to work, the CFLAGS must be set to something appropriate (e.g., without -mfpu=neon for ARMv7, and with appropriate -march and -mcpu for even earlier configurations), or the native C code will not be able to run. The ASFLAGS must remain set for the most advanced instruction set required at build time, since the ARM assembler will refuse to emit them otherwise. I have not attempted to make any changes to configure to do this automatically. Doing so will probably require the addition of new configure options. Many of the hooks for RTCD on ARM were already there, but a lot of the code had bit-rotted, and a good deal of the ARM-specific code is not integrated into the RTCD structs at all. I did not try to resolve the latter, merely to add the minimal amount of protection around them to allow RTCD to work. Those functions that were called based on an ifdef at the calling site were expanded to check the RTCD flags at that site, but they should be added to an RTCD struct somewhere in the future. The functions invoked with global function pointers still are, but these should be moved into an RTCD struct for thread safety (I believe every platform currently supported has atomic pointer stores, but this is not guaranteed). The encoder's boolhuff functions did not even have _c and armv7 suffixes, and the correct version was resolved at link time. The token packing functions did have appropriate suffixes, but the version was selected with a define, with no associated RTCD struct. However, for both of these, the only armv7 instruction they actually used was rbit, and this was completely superfluous, so I reworked them to avoid it. The only non-ARMv4 instruction remaining in them is clz, which is ARMv5 (not even ARMv5TE is required). Considering that there are no ARM-specific configs which are not at least ARMv5TE, I did not try to detect these at runtime, and simply enable them for ARMv5 and above. Finally, the NEON register saving code was completely non-reentrant, since it saved the registers to a global, static variable. I moved the storage for this onto the stack. A single binary built with this code was tested on an ARM11 (ARMv6) and a Cortex A8 (ARMv7 w/NEON), for both the encoder and decoder, and produced identical output, while using the correct accelerated functions on each. I did not test on any earlier processors. Change-Id: I45cbd63a614f4554c3b325c45d46c0806f009eaa
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-06-18cosmetics: trim trailing whitespaceJohn Koleszar
When the license headers were updated, they accidentally contained trailing whitespace, so unfortunately we have to touch all the files again. Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-18Initial WebM releaseJohn Koleszar