summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_int.h
AgeCommit message (Collapse)Author
2011-01-27Merge "Removed unused members from VP8_COMP"Scott LaVarnway
2011-01-26Remove copies of same functionsYunqing Wang
Reduce the code size. Change-Id: I2e1998557a3c8776e262c442fd758c25e17aff7a
2011-01-26Removed unused members from VP8_COMPScott LaVarnway
Change-Id: I8f3f2642b02975fbdb14982984a29821f80d30d3
2011-01-18Further CQ, Key frame and ARF changesPaul Wilkins
This code fixes a bug in the calculation of the minimum Q for alt ref frames. It also allows an extended gf/arf interval for sections of clips that completely static (or nearly so). Change-Id: I1a21aaa16d4f0578e5f99b13bebd78d59403c73b
2011-01-17Fix CQ range and experimental KF sizing changes.Paul Wilkins
The CQ level was not using the q_trans[] array to convert to a 0-127 range as per min and maxq Experimental change to try and match the reconstruction error for forced key frames approximately to that of the previous frame by means of the recode loop. Though this may cause extra recodes and the recode behavior has not been optimized, it can only happen on forced key frames. Change-Id: I1f7e42d526f1b1cb556dd461eff1a692bd1b5b2f
2011-01-12Limit key frame quantizer for forced key frames.Paul Wilkins
Where a key frame occurs because of a minimum interval selected by the user, then these forced key frames ideally need to be more closely matched in quality to the surrounding frame. Change-Id: Ia55b1f047e77dc7fbd78379c45869554f25b3df7
2011-01-11Add no_skip_block4x4_search flag in SPLITMV modeYunqing Wang
Add a flag to always enable block4x4 search for speed=0 (good quality) to guarantee no quality loss for speed0. Change-Id: Ie04bbc25f7e6a33a7bfa30e05775d33148731c81
2011-01-07Merge "CQ Mode"Paul Wilkins
2011-01-07CQ ModePaul Wilkins
The merge includes hooks to for CQ mode and other code changes merged from the test branch. CQ mode attempts to maintain a more stable quantizer within a clip whilst also trying to adhere to a guidline maximum bitrate. The existing target data rate parameter is used to specify the guideline maximum bitrate. A new parameter allows the user to specify a target CQ level. For normal (non kf/gf/arf) frames, the quantizer will not drop BELOW the user specified value (0-63). However, in some cases the encoder may choose to impose a target CQ that is above that specified by the user, if it estimates that consistent use of the target value is not compatible with guideline maximum bitrate. Change-Id: I2221f9eecae8cc3c431d36caf83503941b25e4c1
2011-01-07Merge "Limit Q variability in two pass."Paul Wilkins
2011-01-07Limit Q variability in two pass.Paul Wilkins
In two pass encoding each frame is given an active Q range to work with. This change limits how much this Q range can be altered over time from the initial estimate made for the clip as a whole. There is some danger this could lead to overshoot or undershoot in some corner cases but it helps considerably in regard to clips where either there is a glut or famine of bits in some sections, particularly near the end of a clip. Change-Id: I34fcd1af31d2ee3d5444f93e334645254043026e
2011-01-07Merge "Removed cpi->target_bits_per_mb"Scott LaVarnway
2011-01-07Removed cpi->target_bits_per_mbScott LaVarnway
cpi->target_bits_per_mb is currently not being used, so delete it. Also removed other unused code in rdopt.c. Change-Id: I98449f9030bcd2f15451d9b7a3b9b93dd1409923
2011-01-04Adjustment to boost calculation in two pass.Paul Wilkins
Calculate a minimum intra value to be used in determining the IIratio scores used in two pass, second pass. This is to make sure sections that are low complexity" in the intra domain are still boosted appropriately for KF/GF/ARF. For now I have commented out the Q based adjustment of KF boost. Change-Id: I15deb09c5bd9b53180a2ddd3e5f575b2aba244b3
2010-12-28Use the fast quantizer for inter mode selectionScott LaVarnway
Use the fast quantizer for inter mode selection and the regular quantizer for the rest of the encode for good quality, speed 1. Both performance and quality were improved. The quality gains will make up for the quality loss mentioned in I9dc089007ca08129fb6c11fe7692777ebb8647b0. Change-Id: Ia90bc9cf326a7c65d60d31fa32f6465ab6984d21
2010-12-22abstract apply_temporal_filterJohann
allow for optimized versions of apply_temporal_filter (now vp8_apply_temporal_filter_c) the function was previously declared as static and appears to have been inlined. with this change, that's no longer possible. performance takes a small hit. the declaration for vp8_cx_temp_filter_c was moved to onyx_if.c because of a circular dependency. for rtcd, temporal_filter.h holds the definition for the rtcd table, so it needs to be included by onyx_int.h. however, onyx_int.h holds the definition for VP8_COMP which is needed for the function prototype. blah. Change-Id: I499c055fdc652ac4659c21c5a55fe10ceb7e95e3
2010-12-13remove unused temporal preproc codeJohn Koleszar
This code is unused, as the current preproc implementation uses the same spatial filter that postproc uses. Change-Id: Ia06d5664917d67283f279e2480016bebed602ea7
2010-12-06Merge "Improve MV prediction accuracy to achieve performance gain"Scott LaVarnway
2010-12-03Improve MV prediction accuracy to achieve performance gainYunqing Wang
Add vp8_mv_pred() to better predict starting MV for NEWMV mode in vp8_rd_pick_inter_mode(). Set different search ranges according to MV prediction accuracy, which improves encoder performance without hurting the quality. Also, as Yaowu suggested, using diamond search result as full search starting point and therefore adjusting(reducing) full search range helps the performance. Change-Id: Ie4a3c8df87e697c1f4f6e2ddb693766bba1b77b6
2010-12-03Merge 'Add simple version of activity masking.'John Koleszar
Merge commit 'refs/changes/79/779/2' of https://review.webmproject.org/p/libvpx Conflicts: vp8/encoder/encodeintra.c vp8/encoder/encodemb.c Change-Id: Id607063fabe92d99eeb3c380e8ca670b01bfb3ef
2010-11-19Added extra two pass stats gathering.Paul Wilkins
Added code to record spend so far against planed budget. Change-Id: I5a3335346fa1771b2b1219df9f6127f9993d2594
2010-11-16Comments for alt ref flags.Fritz Koenig
Clarify what the alt ref flags do when encoding. Change-Id: I71f78e0f42edae633fb91840f29dfbe64362c44c
2010-11-10Relax rate control for last few framesPaul Wilkins
VBR rate control can become very noisy for the last few frames. If there are a few bits to spare or a small overshoot then the target rate and hence quantizer may start to fluctuate wildly. This patch prevents further adjustment of the active Q limits for the last few frames. Patch also removes some redundant variables and makes one small bug fix. Change-Id: Ic167831bec79acc9f0d7e4698bcc4bb188840c45
2010-11-10Tuning for the more exact quantizer.Paul Wilkins
Small changes to the default zero bin and rounding tables. Though the tables are currently the same for the Y1 and Y2 cases I have left them as separate tables in case we want to tune this later. There is now some adjustment of the zbin based on the prediction mode. Previously this was restricted to an adjustment for gf/arf 0,0 MV. The exact quantizer now marginal outperforms and is the default. The overall average gain is about 0.5% Change-Id: I5e4353f3d5326dde4e86823684b236a1e9ea7f47
2010-11-05improve average framerate calculationJohn Koleszar
Change Ice204e86 identified a problem with bitrate undershoot due to low precision in the timestamps passed to the library. This patch takes a different approach by calculating the duration of this frame and passing it to the library, rather than using a fixed duration and letting the library average it out with higher precision timestamps. This part of the fix only applies to vpxenc. This patch also attempts to fix the problem for generic applications that may have made the same mistake vpxenc did. Instead of calculating this frame's duration by the difference of this frame's and the last frame's start time, we use the end times instead. This allows the framerate calculation to scavenge "unclaimed" time from the last frame. For instance: start | end | calculated duration ======+=======+==================== 0ms 33ms 33ms 33ms 66ms 33ms 66ms 99ms 33ms 100ms 133ms 34ms Change-Id: I92be4b3518e0bd530e97f90e69e75330a4c413fc
2010-10-26Add half-pixel variance RTCD functionsJohn Koleszar
NEON has optimized 16x16 half-pixel variance functions, but they were not part of the RTCD framework. Add these functions to RTCD, so that other platforms can make use of this optimization in the future and special-case ARM code can be removed. A number of functions were taking two variance functions as parameters. These functions were changed to take a single parameter, a pointer to a struct containing all the variance functions for that block size. This provides additional flexibility for calling additional variance functions (the half-pixel special case, for example) and by initializing the table for all block sizes, we don't have to construct this function pointer table for each macroblock. Change-Id: I78289ff36b2715f9a7aa04d5f6fbe3d23acdc29c
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-21Move firstpass motion map to stats packetJohn Koleszar
The first implementation of the firstpass motion map for motion compensated temporal filtering created a file, fpmotionmap.stt, in the current working directory. This was not safe for multiple encoder instances. This patch merges this data into the first pass stats packet interface, so that it is handled like the other (numerical) firstpass stats. The new stats packet is defined as follows: Numerical Stats (16 doubles) -- 128 bytes Motion Map -- 1 byte / Macroblock Padding -- to align packet to 8 bytes The fpmotionmap.stt file can still be generated for debugging purposes in the same way that the textual version of the stats are available (defining OUTPUT_FPF in firstpass.c) Change-Id: I083ffbfd95e7d6a42bb4039ba0e81f678c8183ca
2010-10-15change to make use of more trellis quantizationYaowu Xu
when a subsequent frame is encoded as an alt reference frame, it is unlikely that any mb in current frame will be used as reference for future frames, so we can enable quantization optimization even when the RD constant is slightly rate-biased. The change has an overall benefit between 0.1% to 0.2% bit savings on the test sets based on vpxssim scores. Change-Id: I9aa7bc5cd573ea84e3ee655d2834c18c4460ceea
2010-10-12Add simple version of activity masking.Timothy B. Terriberry
This uses MB variance to change the RDO weight for mode decision and quantization. Activity is normalized against the average for the frame, which is currently tracked using feed-forward statistics. This could also be used to adjust the quantizer for the entire frame, but that requires more extensive rate control changes. This does not yet attempt to adapt the quantizer within the frame, but the signaling cost means that will likely only be useful at very high rates. Change-Id: I26cd7c755cac3ff33cfe0688b1da50b2b87b9c93
2010-10-11Remove INTRARDOPT #define and intra_rd_opt option.Timothy B. Terriberry
This is just eliminating some cruft. Although a number of variables are declared only when INTRARDOPT is defined, they are used elsewhere without that protection, and no longer just for intra RDO. The intra_rd_opt flag was hard-coded to 1 and never checked. Change-Id: I83a81554ecee8053e7b4ccd8aa04e18fa60f8e4f
2010-09-28Made AltRef filter adaptive & added motion compensationAdrian Grange
Modified AltRef temporal filter to adapt filter length based on macroblock coding modes selected during first-pass encode. Also added sub-pixel motion compensation to the AltRef filter.
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-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-23Merge commit 'refs/changes/51/351/1' of ↵Paul Wilkins
ssh://review.webmproject.org:29418/libvpx into KfRateBugMerged
2010-07-23Rate control bug with long key frame interval.Paul Wilkins
In two pass encodes, the calculation of the number of bits allocated to a KF group had the potential to overflow for high data rates if the interval is very long. We observed the problem in one test clip where there was one section where there was an 8000 frame gap between key frames. Change-Id: Ic48eb86271775d7573b4afd166b567b64f25b787
2010-07-23Make the quantizer exact.Timothy B. Terriberry
This replaces the approximate division-by-multiplication in the quantizer with an exact one that costs just one add and one shift extra. The asm versions have not been updated in this patch, and thus have been disabled, since the new method requires different multipliers which are not compatible with the old method. Change-Id: I53ac887af0f969d906e464c88b1f4be69c6b1206
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-12Make this/next iiratio unsigned.John Koleszar
This patch addresses issue #79, which is a regression since commit 28de670 "Fix RD bug." If the coded error value is zero, the iiratio calculation effectively multiplies by 1000000 by the DOUBLE_DIVIDE_CHECK macro. This can result in a value larger than INT_MAX, giving a negative ratio. Since the error values are conceptually unsigned (though they're stored in a double) this patch makes the iiratio values unsigned, which allows the clamping to work as expected.
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
2010-05-18Initial WebM releaseJohn Koleszar