summaryrefslogtreecommitdiff
path: root/vp8/encoder
AgeCommit message (Collapse)Author
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-04Merge "enable trellis quantization for 2nd order blocks"Yaowu Xu
2010-10-02enable trellis quantization for 2nd order blocksYaowu Xu
Experimented with different value for Y2_RD_MULT ranging f[1, 32], without adapting the value to MB coding mode/frame type/Q value, 4 works out best among all values, providing overall 0.1% coding gain on the test set. Change-Id: I6b2583a8aa5db5e7e5c65c646301909c0c58f876
2010-10-01Made temporal filter default to use centered modeAdrian Grange
If temporal filtering is enabled but a filter type is not specified centered filter mode is used by default. Change-Id: I87306f267c1390074c806c506a69b4ba914d92a2
2010-09-29Rename mode_ref_lf_test_functionJohn Koleszar
This function graduated from being a test func to something that's on by default. Rename it and remove some spurious comments that confuse its status. Change-Id: I689695a3ad29c35e9a72a43ec93766733ac6c20b
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-29Change to coefficient optimization rules.Paul Wilkins
Allow coefficient optimization for good quality speed 0. Change-Id: Id0cb363df6823c6798671584fbba097916a7df2c
2010-09-29Merge "Moved row-specific computation of MV bounds out of col loop"Adrian Grange
2010-09-29Moved row-specific computation of MV bounds out of col loopAdrian Grange
Moved the bounds computation on vertical MV component out of the loop that processes MBs within a MB row.
2010-09-29Control of active min quantizer for two pass.Paul Wilkins
Create look up tables for controlling the active quantizer range. Some initial tuning to improve quality circa 0.5% on test set. Clean up of some stats output code Change-Id: Ia698a8525f8b8129a503cadace3ee73fe888f543
2010-09-28Enabled AltRef motion map creationAdrian Grange
Enabled the first-pass encode to output the map of macroblock coding modes required by the AltRef filter.
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-27Badly placed initialization of rolling rate monitors.Paul Wilkins
This affects control of the active quantizer range. Change-Id: I30511fc81ac9f75ff20d9f1372382423d56739da
2010-09-24disable compilation of debugging codeJohn Koleszar
This patch avoids compiling some debugging code in onyx_if.c. The most significant fix is to avoid generating code for vp8_write_yuv_frame, which is never called. Some other code was removed by the dead code elimination performed by the compiler, and this patch does it with the preprocessor instead. There are advantages both ways. Change-Id: I044fd43179d2e947553f0d6f2cad5b40907ac458
2010-09-16Reduce size of tokenizer tablesJohn Koleszar
This patch reduces the size of the global tables maintained by the tokenizer to 16k from 80k-96k. See issue #177. Change-Id: If0275d5f28389af11ac83c5d929d1157cde90fbe
2010-09-09Fix GF interval for non-lagged ARFsJohn Koleszar
When ARFs are enabled in non-lagged compress modes, the GF interval was being reset to zero. Non-lagged ARF updates were enabled in commit 63ccfbd, but this incorrect GF interval caused a quality regression. Change-Id: I615c3b493f4ce2127044f4e68d0bcb07d6b730c3
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-08Skip unnecessary search of identical framesJim Bankoski
vp8_get_compressed_data() was defeating logic in encode_frame_to_datarate() that determined the reference buffers to search and forcing all frames to be eligible to search. In cases where buffers have identical contents, this is unnecessary extra work. Change-Id: I9e667ac39128ae32dc455a3db4c62e3efce6f114
2010-09-08Enable ARFs for non-lagged compressJim Bankoski
ARFs were explicitly disabled except in lagged compress mode. New ARF logic allows for the ARF buffer to hold an older golden frame, which does not require lagged compress. Change-Id: I1dff82b6f53e8311f1e0514b1794ae05919d5f79
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-02Whitespace: nuke CRLFsJohn Koleszar
Change-Id: I8b9fdf9875a8fcff4cb49a3357ce44f18108c2e7
2010-09-02added separate rounding/zbin constants for 2nd orderYaowu Xu
This allows experiments of using different rounding and zerobin constants for 2nd order blocks. Change-Id: Idd829adba3edd1f713c66151a8d29bb245e33a71
2010-08-31Improved Force Key Frame BehaviourPaul Wilkins
These changes improve the behaviour of the code with forced key frames sent in by a calling application. The sizing of the frames is still suboptimal for two pass in particular but the behaviour is much better than it was. Change-Id: I35fae610c67688ccc69d11f385e87dfc884e65a1
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-20increase rate control buffer level precisionJohn Koleszar
The external API exposes the RC initial/optimal/full buffer level in milliseconds, but this value was truncated internally to seconds. This patch allows the use of the full precision during the conversion from time to bits. Change-Id: If8dd2a87614c05747f81432cbe75dd9e6ed2f04e
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-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-11cosmetics: add missing 2D array bracesJohn Koleszar
Silences compile warning. Change-Id: I4b207d97f8570fe29aa2710e4ce4f02e7e43b57a
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-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-08-10Removed duplicate functionsYaowu Xu
Change-Id: Ie587972ccefd3c762b8cdf8ef39345cd22924b9b
2010-08-10Normalize quantizer's zero bin and rounding factorsYaowu Xu
This patch changes a few numbers in the two constant arrays for quantizer's zerobin and rounding factors, in general to make the sum of the two factors for any Q to be 128. While it might be beneficial to calibrate the two arrays for best quantizer performance, it is not the purpose of this patch. Normalizing the two arrays will enable quick optimization of the current faster quantizer, i.e .zerobin check can be removed. Change-Id: If9abfd7929bf4b8e9ecd64a79d817c6728c820bd
2010-08-10Add trellis quantization.Timothy B. Terriberry
Replace the exponential search for optimal rounding during quantization with a linear Viterbi trellis and enable it by default when using --best. Right now this operates on top of the output of the adaptive zero-bin quantizer in vp8_regular_quantize_b() and gives a small gain. It can be tested as a replacement for that quantizer by enabling the call to vp8_strict_quantize_b(), which uses normal rounding and no zero bin offset. Ultimately, the quantizer will have to become a function of lambda in order to take advantage of activity masking, since there is limited ability to change the quantization factor itself. However, currently vp8_strict_quantize_b() plus the trellis quantizer (which is lambda-dependent) loses to vp8_regular_quantize_b() alone (which is not) on my test clip. Patch Set 3: Fix an issue related to the cost evaluation of successor states when a coefficient is reduced to zero. With this issue fixed, now the trellis search almost exactly matches the exponential search. Patch Set 2: Overall, the goal of this patch set is to make "trellis" search to produce encodings that match the exponential search version. There are three main differences between Patch Set 2 and 1: a. Patch set 1 did not properly account for the scale of 2nd order error, so patch set 2 disable it all together for 2nd blocks. b. Patch set 1 was not consistent on when to enable the the quantization optimization. Patch set 2 restore the condition to be consistent. c. Patch set 1 checks quantized level L-1, and L for any input coefficient was quantized to L. Patch set 2 limits the candidate coefficient to those that were rounded up to L. It is worth noting here that a strategy to check L and L+1 for coefficients that were truncated down to L might work. (a and b get trellis quant to basically match the exponential search on all mid/low rate encodings on cif set, without a, b, trellis quant can hurt the psnr by 0.2 to .3db at 200kbps for some cif clips) (c gets trellis quant to match the exponential search to match at Q0 encoding, without c, trellis quant can be 1.5 to 2db lower for encodings with fixed Q at 0 on most derf cif clips) Change-Id: Ib1a043b665d75fbf00cb0257b7c18e90eebab95e
2010-08-02nasm: end labels with colon (':')Jan Kratochvil
Labels should end by colon (':'), nasm requires it. 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: I0b2ec6f01afb061d92841887affb5ca0084f936f
2010-08-02nasm: use OWORD vs DQWORDJan Kratochvil
nasm knows only OWORD. yasm knows both OWORD and DQWORD. 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: I62151390089e90df9a7667822fa594ac20b00e78
2010-07-28Enable the switch between two versions of quantizerYaowu Xu
To facilitate more testing related to quantizer and rate control, the old version quantizer is added back. old and new quantizer can be switched back and forth by define or un-define the macro "EXACT_QUANT". Change-Id: Ia77e687622421550f10e9d65a9884128a79a65ff
2010-07-27x86/sse2: disable asm quantizerJohann
follow up to Change I0e51492d: neon: disable asm quantizer Now x86 doesn't segfault with --disable-runtime-cpu-detect and -p=2 Change-Id: I8ca127bb299198efebbcbd5a661e81788361933f
2010-07-27neon: disable asm quantizerJohn Koleszar
The assembly version of the quantizer has not been updated to match the new exact quantizer introduced in commit e04e2935. That commit tried to disable this code but missed the non-RTCD case. Thanks to David Baker <david.baker at openmarket.com> for isolating the issue and testing this fix. Change-Id: I0e51492dc6f8e44d2c10b587427448bf94135c65
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-23Merge commit 'refs/changes/51/351/1' of ↵Paul Wilkins
ssh://review.webmproject.org:29418/libvpx into KfRateBugMerged
2010-07-23Merge "Make the quantizer exact."Yaowu Xu
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-07-2380 character line length on Arnr LUTPaul Wilkins
Tweaked table to fit to 80 characters. Change-Id: Ie6ba80e0b31b33e23d2bf78599abe223369fcefb
2010-07-19Merge "Improve the accuracy of forward walsh-hadamard transform"Yaowu Xu
2010-07-19ARNR Lookup Table.Paul Wilkins
Change submitted for Adrian Grange. Convert threshold calculation in ARNR filter to a lookup table. Change-Id: I12a4bbb96b9ce6231ce2a6ecc2d295610d49e7ec
2010-07-19Rate control fix for ARNR filtered frames.Paul Wilkins
Previously we had assumed that it was necessary to give a full frame's bit allocation to the alt ref frame if it has been created through temporal filtering. This is not the case. The active max quantizer control insures that sufficient bits are allocated if needed and allocating a full frame's worth of bits creates an excessive overhead for the ARF. Change-Id: I83c95ed7bc7ce0e53ccae6ff32db5a97f145937a
2010-07-16Fix: Incorrect 'cols' calculation in temporal filter.Paul Wilkins
Change-Id: I37f10fbe4fbb505c1d34980a59af3e817c287e22
2010-07-07Fix a compiling error on armv6Yaowu Xu
The issue was caused by a bad merge in Change I5559d1e8 Change-Id: I6563f652bc1500202de361f8f51d11cc6ddf3331