summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
AgeCommit message (Collapse)Author
2013-11-22Organizing all scan tables into lookup table.Dmitry Kovalev
Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
2013-11-21Merge "Removing plane_block_{width, height} functions."Dmitry Kovalev
2013-11-20Removing plane_block_{width, height} functions.Dmitry Kovalev
Change-Id: I29c0dfcf41a1253d5e2a0d2ff740c0c38ebaa5a2
2013-11-20Using is_inter_block() and has_second_ref() functions.Dmitry Kovalev
Change-Id: Iadd771a33c8874f3b774923bca4da3c8fe5429ee
2013-11-19Use restore_dst_buf in handle_inter_modeJingning Han
There are many places in handle_inter_mode that need to restore the dst buffer pointers, due to buffer pointer swap and early rd search breakout. This commit wraps these operations into an inline function for clean-up. Change-Id: I0462e8c41c8bc3cd8db07395489cac03d8e5be54
2013-11-18Removing raster_block_offset_uint8() function.Dmitry Kovalev
There is no need to use that function, it is much clear to pass offset directly to the buffer. Change-Id: I9026cb0c5094c46f97df5d7f7daeb952f2843b24
2013-11-18Fixed a bug in commit a4a5a210Yaowu Xu
Commit a4a5a210 enabled lossless coding, but the commit incorrectly disabled the usage of skip in encoder even when skip should be used. This commit make sure that skip is enabled even in lossless mode. Change-Id: I276954f952c6ac68f17a316ebc72f09001228a08
2013-11-15Removing vp9_encodeintra.{h, c} files.Dmitry Kovalev
There was only one function in *.c file, so moving it to vp9_encodemb.c. Change-Id: I728859d08b3d6c05c33c1c5b21f0ea1d0e0f83af
2013-11-13Dual buffer encoding for intra modesJingning Han
Overall change (using dual buffer scheme for superblocks of both inter and intra modes) reduces speed 2 runtime: bluesky_1080p at 6000kbps: 263553ms -> 257441ms riverbed_1080p at 8000kbps: 233230ms -> 225308ms. Change-Id: Idf8d70f768a4b0d97b2a8506372c57b7b4022119
2013-11-12Moving q_index from MACROBLOCKD to MACROBLOCK.Dmitry Kovalev
Moving because q_index is used only by encoder. Change-Id: I0b96175614ed4fd3d76ee56a0ba36258e1e896f6
2013-11-12Merge "Enable dual buffer rd search and encoding scheme"Jingning Han
2013-11-12Merge "Using max_tx_size instead of bsize when possible."Dmitry Kovalev
2013-11-12Merge "Moving {sb, mb, b, ab}_index from MACROBLOCKD to MACROBLOCK."Dmitry Kovalev
2013-11-11Enable dual buffer rd search and encoding schemeJingning Han
This commit enables the dual buffer rate-distortion optimization and encoding scheme. It stacks the original transform coefficients, quantized levels, and reconstructed coefficients, in the rate- distortion optimization search process, hence eliminates the need to re-run residual generation, forward transform, and quantization in the encoding stage. Change-Id: I011bfad3a59a380a869ee552e91dae0394ec492e
2013-11-11Merge "Allocate dual buffer sets for encoding"Jingning Han
2013-11-11Merge "Cleaning up joint_motion_search function."Dmitry Kovalev
2013-11-11Allocate dual buffer sets for encodingJingning Han
Allocate memory space of dual buffer sets that store the coeff, qcoeff, dqcoeff, and eobs. Connect the pointers of macroblock_plane and macroblockd_plane to the actual buffer in use accordingly. Change-Id: I2f0b5f482ca879fae39095013eaf8901db20a5a4
2013-11-11Cleaning up joint_motion_search function.Dmitry Kovalev
Change-Id: I70a0878b23bda0ac3ff8733b4c96d5c636bc551c
2013-11-11Moving {sb, mb, b, ab}_index from MACROBLOCKD to MACROBLOCK.Dmitry Kovalev
We use {sb, mb, b, ab}_index only inside encoder, so moving them into appropriate data structure. Change-Id: Ib5c1036716354d9d321e11a60c1634c1cb8f9716
2013-11-11Merge "Localizing NEARESTMV special cases in the code."Dmitry Kovalev
2013-11-08Disable zeroblock forcing for lossless coding modeYaowu Xu
This to make sure that prediction residue always get coded in lossless mode. This commit also fixed lossless unit test Change-Id: I537726ee55328d4e4cf0a0196393a67e12bfcde1
2013-11-05Using max_tx_size instead of bsize when possible.Dmitry Kovalev
Change-Id: I246364bc4270ca13aefb4bc3445bcf102b3170dc
2013-11-05Localizing NEARESTMV special cases in the code.Dmitry Kovalev
Removing special case handling from vp9_tree_probs_from_distribution(), tree_merge_probs(), and vp9_tokens_from_tree_offset() functions. Replacing inter_mode_offset() function with macro INTER_OFFSET which is used now for vp9_inter_mode_tree definition. Change-Id: Iff75a1499d460beb949ece543389c8754deaf178
2013-11-05Merge "Fix the use case of plane_block_idx in sub8x8 RD"Jingning Han
2013-11-05Merge "Avoid mv cost check for invalid mv values"Jingning Han
2013-11-04Avoid mv cost check for invalid mv valuesJingning Han
The compound inter prediction could potentially run with initial motion vectors of invalid value and check the mv_cost, which triggers overheap read. This commit resolves this issue by forcing a motion vector value check for compound inter modes of both superblock and sub8x8 block sizes. Change-Id: I4f4fc19ce83c8272782bc382f12c82a3f03212fc
2013-11-04Splitting partition_probs array into two arrays.Dmitry Kovalev
We only update partition_probs for inter frames but they are constant for key frames. It is not necessary to have constants inside frame context and copy them every time. This change reduces FRAME_CONTEXT size by at least 48 bytes. Change-Id: If70a53be51043f37fe7d113853217937710932a7
2013-11-03Fix the use case of plane_block_idx in sub8x8 RDJingning Han
This commit fixes the use case of plane_block_idx, which determines the plane (Y/U/V) index based on block index. When block idx >= 4 in sub8x8 block loop, it should be of chroma components. Change-Id: I072705aa7b35445524ac607089ca8ce54b7ba478
2013-11-03Add second ref frame check back in rdcost histJingning Han
Update best_inter_rd and best_inter_ref_frame only in single ref frame case. Change-Id: Id56825b231a62d6852bd83811410c05a7569f715
2013-10-31Merge "Removing is_intra_mode() function."Dmitry Kovalev
2013-10-31Merge "Fix x_offset_q4/y_offset_q4 calculation"Yunqing Wang
2013-10-30Merge "Enable all-zero coeff block index for sub8x8 blk"Jingning Han
2013-10-30Replacing (SWITCHABLE_FILTERS + 1) with SWITCHABLE_FILTER_CONTEXTS.Dmitry Kovalev
Change-Id: I9781a62bc1a4cd9176554d1271d87dbcafda9cb0
2013-10-30Enable all-zero coeff block index for sub8x8 blkJingning Han
This commit makes zcoeff_blk cache the case where the entire block is quantized to be zero (without applying zero-forcing) in the rate- distortion optimization loop, and skip the forward DCT, quantization, inverse DCT, and reconstruction process in the encode_block stage. It now works for all the block sizes, including sub8x8 blocks. Change-Id: I5ae60a9c436ba3637d11666733554bec4580ef98
2013-10-29Fix x_offset_q4/y_offset_q4 calculationYunqing Wang
"<< SUBPEL_BITS" needs to be added in the calculation. Call set_scaled_offsets() to calculate x_offset_q4 and y_offset_q4. Change-Id: Ied130ea771510e918f51cd1dc3abe57f4c0962b5
2013-10-29Fixing wrongly initialized tx_type variable.Dmitry Kovalev
Wrong value was used in get_tx_type_4x4() function, so making initialization before that call. Change-Id: Ief30bb1e0c03b2f23d993bbf9ae18d7150ba9a83
2013-10-28Removing is_intra_mode() function.Dmitry Kovalev
It is enough to check just block type: intra or inter. Intra block implies intra prediction mode, and inter block implies inter mode. Change-Id: I3cf98731a3935f670a3cd8e2b2443483eb944be4
2013-10-28Cleaning up vp9_regular_quantize_b_4x4.Dmitry Kovalev
Passing scan & iscan as parameters, adding useful local variables. Change-Id: Ia2a87906941db9557350d273669ce5c3cdb7235d
2013-10-28vp9: add TileInfoJames Zern
replaces use of cur_tile_mi_(row|col)_(start|end) by VP9_COMMON, making it less stateful and more reusable for parallel tile decoding Change-Id: I1df09382b4567a0e5f4434825d47c79afe2399be
2013-10-24Merge changes I1868fb75,I9ff504c6Dmitry Kovalev
* changes: Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE. Adding VP9_FRAME_MARKER constant.
2013-10-24Merge "Improve scale_factors struct"Yunqing Wang
2013-10-23Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.Dmitry Kovalev
Change-Id: I1868fb75ed88bfa65c1c2ca24677d65f2894d713
2013-10-23Merge "Use inter mode flag in super_block_yrd"Jingning Han
2013-10-23Use inter mode flag in super_block_yrdJingning Han
Use a flag variable to determine if coded in inter mode, thus avoiding multiple inter mode checks in super_block_yrd. Change-Id: I0ef998b2811c38e185a2e0583f0f636cee45d2cf
2013-10-22Improve scale_factors structYunqing Wang
The ref's scale_factors are set at frame level, and then copied for each partition block. Since the struct members are mostly constant, this patch separated the constant and non-constant members, and reduced struct copying. This gave 0.5% ~ 1.4% decoder speed gain. Change-Id: I94043bf5a6995c8042da52e5c661818dfa6f6d4c
2013-10-22Removing quantize_b_4x4 function pointer.Dmitry Kovalev
The pointer was asigned only once with vp9_regular_quantize_b_4x4, calling this function directly now. Also removing unused declarations: prototype_quantize_block prototype_quantize_block_pair prototype_quantize_mb vp9_regular_quantize_b_4x4_pair vp9_regular_quantize_b_8x8 Change-Id: I14325bc2f082336820671eafbc06126651b79f73
2013-10-22Merge "Using stride (# of elements) instead of pitch (bytes) in fdct4x4."Dmitry Kovalev
2013-10-22Merge "Removing NUM_ prefix from constant names."Dmitry Kovalev
2013-10-22Prevent left_block_mode stepping into left tileJingning Han
This commit uses left_available flag to decide if the left mode_info struct is available for left_block_mode. As discussed with James Zern (jzern@), this prevents the codec from fetching mode_info from blocks in the left tile, which although effectively not used might present concerns for multi-threaded tile decoding. This is NOT a bit-stream change. Change-Id: I1dc8cf1bcbf056688eee27c7bc5706ac4b4e0125
2013-10-21Using stride (# of elements) instead of pitch (bytes) in fdct4x4.Dmitry Kovalev
Just making fdct consistent with iht/idct/fht functions which all use stride (# of elements) as input argument. Change-Id: I0ba3c52513a5fdd194f1e7e2901092671398985b