summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
AgeCommit message (Collapse)Author
2013-10-21Merge "Inlining set_partition_seg_context function."Dmitry Kovalev
2013-10-21Inlining set_partition_seg_context function.Dmitry Kovalev
We used set_partition_seg_context() only before calls to: 1. update_partition_context() 2. partition_plane_context() Moving these functions from vp9_blockd.h to vp9_onyxc_int.h and inlining set_partition_seg_context into them. After that it is not necessary to have {above, left}_seg_context fields in MACROBLOCKD struture, so removing them also. Change-Id: I4723f59e1c8f3788432b7f51185d8d747b3a97f9
2013-10-21Merge "Make memory alloc in pick_mode_context bsize aware"Jingning Han
2013-10-18Merge "Use lookup table to simplify logic"Yaowu Xu
2013-10-18Make memory alloc in pick_mode_context bsize awareJingning Han
This commit makes the buffer allocation of zcoeff_blk array in pick_mode_context block size aware. It calculates the number of 4x4 blocks in the partition and assigns the memory space accordingly. This process (and the uninitialization) is done once for each encoding pass. It allows memory copy of smaller buffer when possible. For football at 600kbps, the runtimes improve by about 1%: speed 1, 45961ms -> 45472ms speed 2, 23863ms -> 23598ms Change-Id: Id2ca24906fa89f46fa5fe742ec4b8efc2a61f877
2013-10-18Passing block index explicitly instead of using get_sb_index().Dmitry Kovalev
That makes decoder and encoder (only bitstream writing part) a little bit simpler and faster. Moving get_sb_index() function to the encoder. Change-Id: Ie91aaeefd69c84b085948267b33556a7666c6278
2013-10-17Use lookup table to simplify logicYaowu Xu
In deciding the transform size for a given block in a given TX_MODE. Change-Id: I1467da09853e69cd320695a24c04e19a2f3d04fb
2013-10-17Add missing calls to emms in the adaptive quantization codeGuillaume Martres
Also avoid using floating-point operations when adaptive quantization is disabled. Change-Id: I54936d7afb661df049cdb3ecd246d04ac2a9d8d3
2013-10-16Use a separate MODE_INFO stream for each tile columnGuillaume Martres
This should make parallel tiles decoding easier to implement. Change-Id: I6226456dd11f275fa991e4a7a930549da6675915
2013-10-16Get rid of "this_mi", use "mi_8x8[0]" everywhere insteadGuillaume Martres
The only case where they were intentionally pointing to different structures was in mbgraph, and this didn't have the expected behavior because both of these pointers are used interchangeably through the code Change-Id: I979251782f90885fe962305bcc845bc05907f80c
2013-10-16Implement variance-based adaptive quantizationGuillaume Martres
This should be similar to what x264 does with --aq-mode 1. It works well with clips like parkjoy and touhou (http://x264.nl/developers/Dark_Shikari/LosslessTouhou.mkv). At low bitrates, the segmentation signaling overhead may negate the benefits of this feature. (PGW) Default changed to feature OFF to allow provisional merge. Change-Id: I938abf9bb487e1d4ad3b0264ea03d9826275c70b
2013-10-15Merge "Updated encoder to handle intra-only frames"Adrian Grange
2013-10-15Merge "Make vp9_zero use cases of consistent format"Jingning Han
2013-10-15Updated encoder to handle intra-only framesAlexander Voronov
Updated the encoder to handle frames that are coded intra-only. Intra-only frames must be non-showable, that is, the "show frame" flag must be set to 0 in the frame header. Tested by forcing the ARF frames to be coded intra- only. Note: The rate control code will need to be modified to account for intra-only frames better than they are currently handled. Change-Id: I6a9dd5337deddcecc599d3a44a7431909ed21079
2013-10-15Merge "Remove unused variable vp9_64x64_zeros"Jingning Han
2013-10-15Merge "Remove unused comment"Jingning Han
2013-10-15Make vp9_zero use cases of consistent formatJingning Han
Remove the semicolon in the definition of vp9_zero macro. Make all the use cases of vp9_zero of consistent format. Change-Id: Ibaf9751e8595872b12766381a93d185a4d90df8f
2013-10-15Remove unused variable vp9_64x64_zerosJingning Han
Remove the unused variable vp9_64x64_zeros from vp9_encodeframe_. Change-Id: I34bfdcab9a9105440ad05154c1e0516e70258785
2013-10-15Remove unused commentJingning Han
Change-Id: I2d96940fae4c7a16661a43c2bf6907d8b1c1a127
2013-10-15Removing unused 8x4 transform from the encoder.Dmitry Kovalev
Change-Id: Icbcf68b5b685a56f255ebc3859c9692accdadf9e
2013-10-10Merge "Removing inv_txm4x4_1_add and inv_txm4x4_add function pointers."Dmitry Kovalev
2013-10-09Deprecate the use of PARTITION_INFO from encoderJingning Han
Use b_mode_info to store the inter prediction mode of sub8x8 block, in replacement of the use of partition_info. Remove redundant buffer update for partition_info. For bus_cif at 2000 kbps, this seem to make speed 0 about 1% faster. Change-Id: Id1b3be45e75a24fb4b42335ac480c23e440978f6
2013-10-08Removing inv_txm4x4_1_add and inv_txm4x4_add function pointers.Dmitry Kovalev
We already have itxm_add member in MACROBLOCKD structure. Both inv_txm4x4_1_add and inv_txm4x4_add are just its special cases for different eob values. But eob logic is already implemented in vp9_iwht4x4_add and vp9_idct4x4_add (that's why also removing inverse_transform_b_4x4_add). Change-Id: I80bec9b6f7d40c5e5033c613faca5c819c3e6326
2013-10-05Merge "Giving consistent names to IDCT/IWHT functions."Dmitry Kovalev
2013-10-04vp9_encodeframe.c cpplint issues resolvedJim Bankoski
Change-Id: Id9d837e062d9c4a94def4b4ed1f49a67c75d3618
2013-10-04Giving consistent names to IDCT/IWHT functions.Dmitry Kovalev
The idea is to have the following names for each transform size: vp9_idct4x4_add vp9_idct4x4_1_add vp9_idct4x4_10_add vp9_idct4x4_16_add vp9_idct8x8_add vp9_idct8x8_1_add vp9_idct8x8_10_add vp9_idct8x8_64_add etc for 16x16, 32x32 The actual list of renames in this patch: vp9_idct_add_lossless -> vp9_iwht4x4_add vp9_short_iwalsh4x4_add -> vp9_iwht4x4_16_add vp9_short_iwalsh4x4_1_add -> vp9_iwht4x4_1_add vp9_idct_add -> vp9_idct4x4_add vp9_short_idct4x4_add -> vp9_idct4x4_16_add vp9_short_idct4x4_1_add -> vp9_idct4x4_1_add Change-Id: I6f43f7437c68dd30cdd05d72e213765578ed30b1
2013-10-03Merge "Refactor inter mode rate-distortion search"Jingning Han
2013-10-03Refactor inter mode rate-distortion searchJingning Han
This commit separates the rate-distortion optimization loop of superblocks from that of sub8x8 blocks. This allows better design rate-distortion optimization search loop for each setting. It also removes the use of SPLITMV and I4X4_PRED therein. No performance change in speed 0 settings. For bus@CIF at 2000kbps, the speed 1 runtime goes from 48009ms to 43894ms (about 10% faster). The overall compression performance on derf changed by -0.021%. Speed 2 runtime goes from 27114ms to 28700ms (6% slower), while the overall coding efficiency goes up by 1.629% for derf, 1.236% for yt. Change-Id: Ie6bdfa0a370148dd60bd800961077f7e97e67dd4
2013-10-03Using vp9_zero instead of vpx_memset.Dmitry Kovalev
Change-Id: I9a0d0e9c3459954aa7b9c68f92cc5d56385ebd18
2013-10-03Speed setting review.Paul Wilkins
Substantial reworking of the speed vs quality trade offs for speed 1 and 2. In this patch I am attempting to freeze the "quality" meaning of speeds 1 and 2 relative to speed 0 so that in future we can better evaluate progress. I am targeting : Speed 1 quality ~-5% vs speed 0. Speed 2 quality ~-10% vs speed 0 It is inevitable that quality will still fluctuate a little as we adjust settings and add new features, but we will attempt to keep as close as possible to these values. Above speed 2 things will remain a bit more fluid for now. In this patch speed 1 is approximately 4-5x as fast as speed 0. This is similar to before but the quality hit is a lot less. Likewise speed 2 is approximately 2x as fast as speed 1 but is similar in quality to the previous speed 1 configuration. Also slight change to behavior of FLAG_EARLY_TERMINATE to insure all reference frames get at least one rd test. Important for very low variance regions. WIP :- Added a new speed level with old speed 4 becoming speed 5. Speed 3 and 4 tradeoffs still WIP Change-Id: Ic7a38dd7b5b63ab1501f9352411972f480ac6264
2013-10-03make use last partition consider motionJim Bankoski
This commit causes use last partition to consider whether a 64x64 has motion that might make a new partitioning worth while. Change-Id: I3a57bedef4f3cd961fadbfa96651c206fa36da4a
2013-10-03Merge "Improved auto_partition_range."Paul Wilkins
2013-10-01Moving get_token_alloc function from common to the encoder.Dmitry Kovalev
Also renaming mb_row -> mi_row, mb_col -> mi_col arguments and calculate mb_rows/mb_cols values from mi_rows/mi_cols. Change-Id: I6919a279f560648e23bc9a12f507d17c21ffd5d7
2013-09-30Fix rectangular partition check in speed 1Jingning Han
Make encoder skip rectangular partition check in speed 1 and above, when early termination was triggered in partition split. Thanks Guillaume (gmartres@) for catching this issue. This change makes bus_cif at 2000kbps speed 1 runtime goes down from 25612ms to 23438ms (about 9% speed-up), at the expense of -0.235% performance down. Change-Id: I98613fad081a261d30d5fa206f934ca70601c180
2013-09-30Improved auto_partition_range.Paul Wilkins
The code now takes into account temporal and spatial information to determine the partition size range, but the frequency counts have been removed. The net effect is similar in quality but about 10% faster. Change-Id: I39a513fb79cec9177b73b2a7218f0da70963ae95
2013-09-30Alter Speed 3.Paul Wilkins
This patch deletes the variance based speed three partitioning. Speed 3 now uses the same partitioning method as speed 2 but with some stricter conditions. The speed and quality are now somewhere between speeds 2 and 4 whereas before it was worse in both than speed 4. Change-Id: Ia142e7007299d79db3ceee6ca8670540db6f7a41
2013-09-25Using is_inter_block and has_second_ref functions.Dmitry Kovalev
Change-Id: I60dee58a4fd24d3c4f3c101a49d30e217309f43a
2013-09-24Replacing txfm with tx.Dmitry Kovalev
Renaming txfm_stepdown_count to tx_stepdown_count and max_txfm_size to max_tx_size. Change-Id: Ifc173e22c78240e561a57c4c741b64b1b8fc6fef
2013-09-24Cleaning up vp9_update_nmv_count function.Dmitry Kovalev
Using best_mv[2] array instead of two separate variables. Change-Id: Iefa0a41f5c42c42f2c66cef26750da68405f0f25
2013-09-24Merge "Change to prevent invalid memory access"Yaowu Xu
2013-09-24Merge "Adding best_mv[2] array instead of two variables."Dmitry Kovalev
2013-09-24Change to prevent invalid memory accessYaowu Xu
After change of MI context storage , mi_8x8[] pointer may be null for a block outside of image border. The commit changes to access the data only after validation of mi_row and mi_col. Change-Id: I039c4eb486a228ea9d8e5f35ab9ae6717d718bf3
2013-09-23Enable per transformed block zero coeffs forcingJingning Han
This commit enables forcing all coefficients zero per transformed block, when its rate-distortion cost is lower than regular coeff quantization. The overall performance improvement (including its parent patch on calculating rd cost per transformed block) at speed 1: derf: 0.298% yt: 0.452% hd: 0.741% stdhd: 0.006% Change-Id: I66005fe0fd7af192c3eba32e02fd6d77952accb5
2013-09-20Adding best_mv[2] array instead of two variables.Dmitry Kovalev
Change-Id: I584fe50f73879f6a72fada45714ef80893b6d549
2013-09-19fix integer overflow errorsYaowu Xu
Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
2013-09-17Silence a bunch of MSVC warningsYaowu Xu
Change-Id: I16633269582a640809dca27572bbe99efa6369fc
2013-09-16fix a problem where an invalid mv used in searchYaowu Xu
The commit added reset of pred_mv at the beginning of each SB64x64 partition mv search, also limited the usage of pred_mv only when search on the largest partition is already done. This is to fix a crash at speed 1/2 encoder where an invalid mv is used in mv search. Change-Id: I39010177da76d054e3c90b7899a44feb2e3a5b1b
2013-09-13Adaptive motion search controlJingning Han
This commit enables adaptive constraint on motion search range for smaller partitions, given the motion vectors of collocated larger partition as a candidate initial search point. It makes speed 0 runtime of bus at CIF and 2000 kbps goes from 167s down to 162s (3% speed-up), at 0.01dB performance gains. In the settings of speed 1, this makes the runtime goes from 33687 ms to 32142 ms (4.5% speed-up), at 0.03dB performance gains. Compression performance wise, it gains at speed 1: derf 0.118% yt 0.237% hd 0.203% stdhd 0.438% Change-Id: Ic8b34c67810d9504a9579bef2825d3fa54b69454
2013-09-13Merge "New mode_info_context storage -- undo revert"Scott LaVarnway
2013-09-11Merge "resolve clang issue : implicit convert tx_mode -> tx_size"Jim Bankoski