summaryrefslogtreecommitdiff
path: root/vp8/common/onyxc_int.h
AgeCommit message (Collapse)Author
2014-01-23vp8/common: add extern "C" to headersJames Zern
Change-Id: I13b434b1e6621e31962b08831c3587c039368c83
2013-12-16vp8/common: normalize include guardsJames Zern
Change-Id: Ia8789a8f864e0edc0bf94f00f6430846f86911c3
2013-07-18VP[89]_COMMON: remove golden/altref frame countsJames Zern
these are only used in the encoder. frames_since_golden / frames_till_alt_ref_frame -> VP[89]_COMP Change-Id: Ie14a6f46987bced685ddb449b85dc261caba6dfe
2013-07-16Merge "VP[89]_COMMON: remove unused near_boffset"James Zern
2013-07-16Merge "VP9_COMMON: remove unused framerate/bitrate"James Zern
2013-07-12VP9_COMMON: remove unused framerate/bitrateJames Zern
+ VP8_COMMON: place them under CONFIG_POSTPROC_VISUALIZER Change-Id: I2702d5a3e1134b9c5f7ddc14b4173955a400f2cf
2013-07-12VP[89]_COMMON: remove unused near_boffsetJames Zern
Change-Id: If9b9ca703b997312df85241a0758d414cfdc5228
2013-07-12yv12config: remove YUV_TYPEJames Zern
this was never fleshed out in the context of VP8, for which it was added. for VP9 it has no meaning. Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff
2013-01-25Bug fix: error-concealment enabled changed postproc outputScott LaVarnway
When error concealment is enabled, it swaps the mi and prev_mi ptrs after each frame is decoded. The postproc uses the mi ptr for the mode info context. Now the postproc will use the correct mode info context. Change-Id: I537ae5450f319c624999b44525bb52bb30047b7b
2012-11-15support building vp8 and vp9 into a single libJohn Koleszar
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-10-10post-proc: fix 0 or negative threshold handlingYunqing Wang
If the threshold(limits) <= 0, skipped filtering and copied the frame directly. Also, fixed memory allocation checking. Change-Id: If3d79d5b2bcb71b9777e6eb5cba1384585131e22
2012-09-13Removed pre_mvcScott LaVarnway
Not used. Change-Id: Ifbd97c9ad537d5184f7e305fa8acf6f027978b6b
2012-08-02Removed last_kf_gf_qScott LaVarnway
Not used. Change-Id: I7595cb21db73bd56ee4d9280ecb7ab9b1240f4e2
2012-04-26Moves error concealment allocations from common parts to decoderAttila Nagy
The backup MODE_INFO buffer used in the error concealment was allocated in the codec common parts allocation even though this is a decoder only resource. Moved the allocation to the decoder side. No need to update_mode_info_border as mode_info buffers are zero allocated. This fixes also a potential memory leak as the EC overlaps buffer was not properly released before reallocation after a frame size change. Change-Id: I12803d3e012308d95669069980b1c95973fb775f
2012-04-23Removed mcomp_filter_typeScott LaVarnway
and replaced with use_bilinear_mc_filter. Change-Id: Ie9e9f0bccca4ab7d3e23ae045aefed33536103ff
2012-04-23Removes duplication of key frame mode probabilitiesAttila Nagy
Key frame macrobock and block mode probabilities are constant. Remove the allocation of tables for each codec instance and use instead the default const prob tables. Change-Id: I8361798ac491f9b3889e86925a494c58647c753f
2012-04-19Makes all mode token tables constAttila Nagy
Mode token tabels precalculated in entropymode.c. Removes vp8_initialize_common()as all common global data is precalculated const now. Change-Id: I9b2ccc883e4f618069e1bc180dad3a823394eb73
2012-03-22Miscellaneous changes in mfqe and postproc modulesDeb Mukherjee
Adds logic to disable mfqe for the first frame after a configuration change such as change in resolution. Also adds some missing if CONFIG_POSTPROC macro checks. Change-Id: If29053dad50b676bd29189ab7f9fe250eb5d30b3
2012-01-30RTCD: add subpixel functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I6c519ab61e4f4e0ebcc796f2df061f945c48cefe
2012-01-30RTCD: add postproc functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: If54eb5cb5d1b0cac6c4c0633a9e99c93ca860ba2
2012-01-30RTCD: add recon functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I9bfcf9bef65c3d4ba0fb9a3e1532bad1463a10d6
2012-01-30RTCD: add remaining IDCT functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I03c4dbf30dfd3558b0e256ff9d3ff4c012aadc80
2012-01-30RTCD: add loopfilter functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Ic8a4047d72ff3a54ec98977dd90e70c13213db71
2012-01-30New RTCD implementationJohn Koleszar
This is a proof of concept RTCD implementation to replace the current system of nested includes, prototypes, INVOKE macros, etc. Currently only the decoder specific functions are implemented in the new system. Additional functions will be added in subsequent commits. Overview: RTCD "functions" are implemented as either a global function pointer or a macro (when only one eligible specialization available). Functions which have RTCD specializations are listed using a simple DSL identifying the function's base name, its prototype, and the architecture extensions that specializations are available for. Advantages over the old system: - No INVOKE macros. A call to an RTCD function looks like an ordinary function call. - No need to pass vtables around. - If there is only one eligible function to call, the function is called directly, rather than indirecting through a function pointer. - Supports the notion of "required" extensions, so in combination with the above, on x86_64 if the best function available is sse2 or lower it will be called directly, since all x86_64 platforms implement sse2. - Elides all references to functions which will never be called, which could reduce binary size. For example if sse2 is required and there are both mmx and sse2 implementations of a certain function, the code will have no link time references to the mmx code. - Significantly easier to add a new function, just one file to edit. Disadvantages: - Requires global writable data (though this is not a new requirement) - 1 new generated source file. Change-Id: Iae6edab65315f79c168485c96872641c5aa09d55
2012-01-10Allowing the mfqe post-processing filter to be used in conjunctionDeb Mukherjee
with deblock or demacroblock filters. When --mfqe is used together with --demacroblock or --deblock, mfqe is applied first and then demacroblock/deblock is applied to the mfqe result. Change-Id: Id83ee01f1b4a33a116f071dcf26d59c7f3497c32
2012-01-06Reduced the size of Y1Dequant and friends to [128][2]Scott LaVarnway
This patch removes the local copies of the dequantize constants and implements John's idea as described in "Make a local copy of the dequantized data" commit. Change-Id: Ic6b7d681f00bf63263f71ff1e39ab2f80729e8b2
2011-12-15Moved dequant idct into commonScott LaVarnway
These functions are now used by the encoder. This is WIP with the goal of creating a common idct/add for the encoder and decoder. A boost of 1.8% was seen for the HD rt test clip used. [Tero] Added needed changes to ARM side. Change-Id: Ibbb8000be09034203d7adffc457d3c3f8b06a5bf
2011-08-01Fix building with --disable-postprocJohn Koleszar
Change-Id: I7e6bc28e7974a376da747300744e0dd5dc1d21e9
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-07-08New loop filter interfaceAttila Nagy
Separate simple filter with reduced no. of parameters. MB filter level picking based on precalculated table. Level table updated for each frame. Inside and edge limits precalculated and updated just when sharpness changes. HEV threshhold is constant. ARM targets use scalars and others vectors. Change works only with --target=generic-gnu All other targets have to be updated! Change-Id: I6b73aca6b525075b20129a371699b2561bd4d51c
2011-06-28Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistentlyJohn Koleszar
There were many instances in the code of vp8_coef_tokens and vp8_coef_tokens-1, which was a preprocessor macro despite the naming convention. Replace these with MAX_ENTROPY_TOKENS and ENTROPY_NODES, respectively. Change-Id: I72c4f6c7634c94e1fa066cd511471e5592c748da
2011-06-28New ways of passing encoded data between encoder and decoder.Stefan Holmer
With this commit frames can be received partition-by-partition from the encoder and passed partition-by-partition to the decoder. At the encoder-side this makes it easier to split encoded frames at partition boundaries, useful when packetizing frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled, several VPX_CODEC_CX_FRAME_PKT packets will be returned from vpx_codec_get_cx_data(), containing one partition each. The partition_id (starting at 0) specifies the decoding order of the partitions. All partitions but the last has the VPX_FRAME_IS_FRAGMENT flag set. At the decoder this opens up the possibility of decoding partition N even though partition N-1 was lost (given that independent partitioning has been enabled in the encoder) if more info about the missing parts of the stream is available through external signaling. Each partition is passed to the decoder through the vpx_codec_decode() function, with the data pointer pointing to the start of the partition, and with data_sz equal to the size of the partition. Missing partitions can be signaled to the decoder by setting data != NULL and data_sz = 0. When all partitions have been given to the decoder "end of data" should be signaled by calling vpx_codec_decode() with data = NULL and data_sz = 0. The first partition is the first partition according to the VP8 bitstream + the uncompressed data chunk + DCT address offsets if multiple residual partitions are used. Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
2011-05-19Adding error-concealment to the decoder.Stefan Holmer
The error-concealer is plugged in after any motion vectors have been decoded. It tries to estimate any missing motion vectors from the motion vectors of the previous frame. Intra blocks with missing residual are replaced with inter blocks with estimated motion vectors. This feature was developed in a separate sandbox (sandbox/holmer/error-concealment). Change-Id: I5c8917b031078d79dbafd90f6006680e84a23412
2011-05-05Merge "Runtime detection of available processor cores."Yunqing Wang
2011-04-25remove simpler_lpfJohann
the decision to run the regular or simple loopfilter is made outside the function and managed with pointers stop tracking the option in two places. use filter_type exclusively Change-Id: I39d7b5d1352885efc632c0a94aaf56b72cc2fe15
2011-03-31Runtime detection of available processor cores.Attila Nagy
Detect the number of available cores and limit the thread allocation accordingly. On decoder side limit the number of threads to the max number of token partition. Core detetction works on Windows and Posix platforms, which define _SC_NPROCESSORS_ONLN or _SC_NPROC_ONLN. Change-Id: I76cbe37c18d3b8035e508b7a1795577674efc078
2011-02-03Make vp8_adjust_mb_lf_value return the updated value rather thanGaute Strokkenes
manipulating it in situ via a pointer. Change-Id: If4a87a4eccd84f39577c0e91e171245f4954c5cf
2010-12-29Always update last_frame_typeYunqing Wang
Scott pointed out that last_frame_type only gets updated while loopfilter exists. Since last_frame_type is also needed in motion search now, it needs to be updated every frame. Change-Id: I9203532fd67361588d4024628d9ddb8e391ad912
2010-10-27Eliminate more warnings.Timothy B. Terriberry
This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
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-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-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-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-11Moved gf_active code to encoder onlyScott LaVarnway
The gf_active code is only used by the encoder, so it was moved from common and decoder. Change-Id: Iada15acd5b2b33ff70c34668ca87d4cfd0d05025
2010-07-23Swap alt/gold/new/last frame buffer ptrs instead of copying.Fritz Koenig
At the end of the decode, frame buffers were being copied. The frames are not updated after the copy, they are just for reference on later frames. This change allows multiple references to the same frame buffer instead of copying it. Changes needed to be made to the encoder to handle this. The encoder is still doing frame buffer copies in similar places where pointer reference could be done. Change-Id: I7c38be4d23979cc49b5f17241ca3a78703803e66
2010-07-07Fix misspelled "skiped" in onyxc_int.h to "skipped".Michael Kohler
Signed-off-by: Michael Kohler <michaelkohler@live.com>
2010-06-30Add loopfilter initialization fix in multithreading codeYunqing Wang
Modified loopfilter initialization to avoid unnecessary operations. Change-Id: I9fd1a5a49edc1cb8116c2a72a6908b1e437459ec
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-24install includes in DIST_DIR/include/vpx, move vpx_codec/ to vpx/John Koleszar
This renames the vpx_codec/ directory to vpx/, to allow applications to more consistently reference these includes with the vpx/ prefix. This allows the includes to be installed in /usr/local/include/vpx rather than polluting the system includes directory with an excessive number of includes. Change-Id: I7b0652a20543d93f38f421c60b0bbccde4d61b4f