summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodemb.h
AgeCommit message (Collapse)Author
2014-10-28Combine vp9_encode_block_intra and encode_block_intraHui Su
Change-Id: I79091fb677b64892ecca2fb466fde14602d8cdfc
2014-10-01Remove unused header files from vp9_encodemb.hJingning Han
Change-Id: Icfc3fb62cc0b05e435814035bfe1f2e2870442b4
2014-08-04uint8_t segment and skip to avoid signed / unsigned warningsJim Bankoski
Change-Id: I2e2765b851fb0a1b15351c2aa0e079197cbee373
2014-07-01Re-design quantization processJingning Han
This commit re-designs the quantization process for transform coefficient blocks of size 4x4 to 16x16. It improves compression performance for speed 7 by 3.85%. The SSSE3 version for the new quantization process is included. The average runtime of the 8x8 block quantization is reduced from 285 cycles -> 255 cycles, i.e., over 10% faster. Change-Id: I61278aa02efc70599b962d3314671db5b0446a50
2014-06-12Fast computation path for forward transform and quantizationJingning Han
This commit enables a fast path computational flow for forward transformation. It checks the sse and variance of prediction residuals and decides if the quantized coefficients are all zero, dc only, or more. It then selects the corresponding coding path in the forward transformation and quantization stage. It is currently enabled in rtc coding mode. Will do it for rd coding mode next. In speed -6, the runtime for pedestrian_area 1080p at 1000 kbps goes down from 14234 ms to 13704 ms, i.e., about 4% speed-up. Overall coding performance for rtc set is changed by -0.18%. Change-Id: I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1
2014-04-29Removing unused alt_activity_measure() function.Dmitry Kovalev
Change-Id: I6b520553cb5334b44356dc4651a2dbc1cb93cca5
2014-04-22Renaming "onyx" to "encoder".Dmitry Kovalev
Actual renames: vp9_onyx_if.c -> vp9_encoder.c vp9_onyx_int.h -> vp9_encoder.h Change-Id: I80532a80b118d0060518e6c6a0d640e3f411783c
2014-02-26Cleaning up vp9_encodemb.c file.Dmitry Kovalev
Usage of encode_b_args is unnecessary because encode_block_pass1() doesn't use them. That's why optimize_init_b() call is also not required. Change-Id: Ib6cfe4916c2ca85749c90bb0adcba6fea592f9ac
2014-02-17Using vp9_subtract_plane instead of vp9_subtract_{sb, sby, sbuv}.Dmitry Kovalev
Change-Id: I67a82a347245076b6c3b0bc41b587f9961a29943
2014-02-12Renaming skip_coeff to skip for consistency.Dmitry Kovalev
Change-Id: I036e815ca63d00cba71202ae09ba0f6ef745dcb8
2014-02-11Removing vp9_foreach_transformed_block_uv() function.Dmitry Kovalev
Change-Id: I35ec77b71e6fd686865cead9281e4dd9e9bc9e86
2014-02-08Hiding encode_b_args struct inside vp9_encodemb.c.Dmitry Kovalev
Change-Id: I5bcd32874f8a8a693e3eb68ef6728dfbf5475bda
2014-01-29Finally removing vp9_setup_interp_filters() function.Dmitry Kovalev
Change-Id: If446225afbb49f6033c2a4516a37c377de6f70f7
2014-01-24Renaming INTERPOLATION_TYPE to INTERP_FILTER.Dmitry Kovalev
Corresponding renames: subpel_kernel => interp_kernel vp9_get_filter_kernel() => vp9_get_interp_kernel() pred_filter_type => pred_interp_filter adaptive_pred_filter_type => adaptive_pred_interp_filter mcomp_filter_type => interp_filter read_interp_filter_type() => read_interp_filter() write_interp_filter_type() => write_interp_filter() fix_mcomp_filter_type() => fix_interp_filter() Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-23vp9/encoder: add extern "C" to headersJames Zern
Change-Id: I4f51ce859a97bf1b8fd2b37ac585b7c643232b69
2014-01-14As you go mbmi->skip_coeffJim Bankoski
Calculate the skip_coeff as part of the encode process, rather than checking the eobs after the fact with another pass. Change-Id: Ib41b139e96a97dee30e4b993b4cc53d86337128d
2014-01-06Combining ref_frame and second_ref_frame into ref_frames[2].Dmitry Kovalev
Change-Id: I007d66a1cb1b44751dcceafbaa64649ed9a34562
2013-11-19Move vp9_setup_interp_filter() to encoderYaowu Xu
As it is used in encoder only. Change-Id: I5f2a8abbe72bb18cbf6ce36a3dc7e132aeae8ec2
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-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-09-11clang warnings : remove split and i4x4_pred fake modesJim Bankoski
Change-Id: I8ef3c7c0f08f0f1f4ccb8ea4deca4cd8143526ee
2013-08-27Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the encoder.Dmitry Kovalev
Change-Id: I62bb07c377f947cb72fac68add7a6b199e42c6b9
2013-08-19Passing plane_bsize to foreach_transformed_block_visitor.Dmitry Kovalev
Updating all foreach_transformed_block_visitor functions to work with plane block size instead of general block. Removing a lot of duplicated code. Change-Id: I6a9069e27528c611f5a648e1da0c5a5fd17f1bb4
2013-08-19Using plane_bsize instead of bsize.Dmitry Kovalev
This change set is intermediate. The next one will remove all repetitive plane_bsize calculations, because it will be passed as argument to foreach_transformed_block_visitor. Change-Id: Ifc12e0b330e017c6851a28746b3a5460b9bf7f0b
2013-08-16Removing unused or redundant arguments from *_args structures.Dmitry Kovalev
Redundant dst, pre[2] from build_inter_predictors_args, unused cm from encode_b_args. Change-Id: I2c476cd328c5c0cca4c78ba451ca6ba2a2c37e2d
2013-08-15Moving from ss_txfrm_size to tx_size.Dmitry Kovalev
Updating foreach_transformed_block_visitor and corresponding functions to accept tx_size instead of ss_txfrm_size. List of functions per file: vp9_decodframe.c decode_block decode_block_intra vp9_detokenize.c decode_block vp9_encodemb.c optimize_block vp9_xform_quant vp9_encode_block_intra vp9_rdopt.c dist_block rate_block block_yrd_txfm vp9_tokenize.c set_entropy_context_b tokenize_b is_skippable Change-Id: I351bf563eb36cf34db71c3f06b9bbc9a61b55b73
2013-08-15Converting code from using ss_txfrm_size to tx_size.Dmitry Kovalev
Updated function signatures: txfrm_block_to_raster_block txfrm_block_to_raster_xy extend_for_intra vp9_optimize_b Change-Id: I7213f4c4b1b9ec802f90621d5ba61d5e4dac5e0a
2013-08-01Cleanup: removing unused function arguments.Dmitry Kovalev
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-07-25Make coeff_optimize initialized per-planeJingning Han
This commit makes the initialization of trellis coeff optimization a per-plane operation, thereby eliminating the redundant steps in encode_sby and encode_sbuv. It makes the encoder at speed 0 slightly faster. Change-Id: Iffe9faca6a109dafc0dd69dc7273cbdec19b17cd
2013-07-02Calculate rd cost per transformed blockJingning Han
Compute the rate-distortion cost per transformed block, and cumulate the cost through all blocks inside a partition. This allows encoder to detect if the cumulative rd cost is already above the best rd cost, thereby enabling early termination in the rate-distortion optimization search. Change-Id: I0a856367a9a7b6dd0b466e7b767f54d5018d09ac
2013-06-21Add subtract_block SSE2 version and unit test.Ronald S. Bultje
3% faster overall (3min35.0 to 3min28.5). Change-Id: I5ff8a5c2c91586b6632ca5009ad1ea51ce94af5e
2013-05-31Adding plane_block_width and plane_block_height functions.Dmitry Kovalev
Change-Id: I02c17fb733c0f3c22dc3167c3d3182797415f1ae
2013-05-03Separate transform and quant from vp9_encode_sbJohn Koleszar
This allows removing a large number of transform size specific functions, as well as supporting 444/alpha by routing all code through the subsampling-aware path. Change-Id: Ieb085cebe9f37f24fc24de179898b22abfda08a4
2013-05-02Create common vp9_encode_sb{,y}John Koleszar
Creates a common encode (subtract, transform, quantize, optimize, inverse transform, reconstruct) function for all sb sizes, including the old 16x16 path. Change-Id: I964dff1ea7a0a5c378046a069ad83495f54df007
2013-04-30Make vp9_optimize_sb* commonJohn Koleszar
Unify the various vp9_optimize_sb functions into one that handles all transform sizes. Change-Id: I48b642fbfb3e72cc2e0bcf1d0317a80a80547882
2013-04-30sb8x8 integration in rd loop.Ronald S. Bultje
Work-in-progress, not yet ready for review. TODO items: - bitstream writing (encoder) and reading (decoder) - decoder reconstruction Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
2013-04-23Move src_diff to per-plane MACROBLOCK dataJohn Koleszar
First in a series of commits making certain MACROBLOCK members addressable per-plane. This commit also refactors the block subtraction functions vp9_subtract_b, vp9_subtract_sby_c, etc to be loops-over-planes and variable subsampling aware. Change-Id: I371d092b914ae0a495dfd852ea1a3d2467be6ec3
2013-04-18Make the use of pred buffers consistent in MB/SBJingning Han
Use in-place buffers (dst of MACROBLOCKD) for macroblock prediction. This makes the macroblock buffer handling consistent with those of superblock. Remove predictor buffer MACROBLOCKD. Change-Id: Id1bcd898961097b1e6230c10f0130753a59fc6df
2013-04-11Remove unused macroblock versions of reconstruction functions.Ronald S. Bultje
More specifically, remove vp9_quantize_mb*, vp9_optimize_mb*, vp9_inverse_transform_mb* and vp9_transform_mb*. Instead, use the generic _sb* functions that take a size argument, and call them with BLOCK_SIZE_MB16X16. Change-Id: I33024afea95d3a23ffbc1df7da426e4645110f29
2013-04-09Make SB coding size-independent.Ronald S. Bultje
Merge sb32x32 and sb64x64 functions; allow for rectangular sizes. Code gives identical encoder results before and after. There are a few macros for rectangular block sizes under the sbsegment experiment; this experiment is not yet functional and should not yet be used. Change-Id: I71f93b5d2a1596e99a6f01f29c3f0a456694d728
2013-03-07Coding con-zero count rather than EOB for coeffsDeb Mukherjee
This patch revamps the entropy coding of coefficients to code first a non-zero count per coded block and correspondingly remove the EOB token from the token set. STATUS: Main encode/decode code achieving encode/decode sync - done. Forward and backward probability updates to the nzcs - done. Rd costing updates for nzcs - done. Note: The dynamic progrmaming apporach used in trellis quantization is not exactly compatible with nzcs. A suboptimal approach has been used instead where branch costs are updated to account for changes in the nzcs. TODO: Training the default probs/counts for nzcs Change-Id: I951bc1e22f47885077a7453a09b0493daa77883d
2013-03-06Merge "Code cleanup." into experimentalDmitry Kovalev
2013-03-05Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keywords, fixing formatting and #include order, code simplification. Change-Id: I0e5fdc8009010f3f885f13b5d76859b9da511758
2013-03-04Make superblocks independent of macroblock code and data.Ronald S. Bultje
Split macroblock and superblock tokenization and detokenization functions and coefficient-related data structs so that the bitstream layout and related code of superblock coefficients looks less like it's a hack to fit macroblocks in superblocks. In addition, unify chroma transform size selection from luma transform size (i.e. always use the same size, as long as it fits the predictor); in practice, this means 32x32 and 64x64 superblocks using the 16x16 luma transform will now use the 16x16 (instead of the 8x8) chroma transform, and 64x64 superblocks using the 32x32 luma transform will now use the 32x32 (instead of the 16x16) chroma transform. Lastly, add a trellis optimize function for 32x32 transform blocks. HD gains about 0.3%, STDHD about 0.15% and derf about 0.1%. There's a few negative points here and there that I might want to analyze a little closer. Change-Id: Ibad7c3ddfe1acfc52771dfc27c03e9783e054430
2013-02-26Spatial resamping of ZEROMV predictorsJohn Koleszar
This patch allows coding frames using references of different resolution, in ZEROMV mode. For compound prediction, either reference may be scaled. To test, I use the resize_test and enable WRITE_RECON_BUFFER in vp9_onyxd_if.c. It's also useful to apply this patch to test/i420_video_source.h: --- a/test/i420_video_source.h +++ b/test/i420_video_source.h @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource { virtual void FillFrame() { // Read a frame from input_file. + if (frame_ != 3) if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) { limit_ = frame_; } This forces the frame that the resolution changes on to be coded with no motion, only scaling, and improves the quality of the result. Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
2013-01-10Merge tx32x32 experiment.Ronald S. Bultje
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
2013-01-09New prediction filterAdrian Grange
This patch removes the old pred-filter experiment and replaces it with one that is implemented using the switchable filter framework. If the pred-filter experiment is enabled, three interopolation filters are tested during mode selection; the standard 8-tap interpolation filter, a sharp 8-tap filter and a (new) 8-tap smoothing filter. The 6-tap filter code has been preserved for now and if the enable-6tap experiment is enabled (in addition to the pred-filter experiment) the original 6-tap filter replaces the new 8-tap smooth filter in the switchable mode. The new experiment applies the prediction filter in cases of a fractional-pel motion vector. Future patches will apply the filter where the mv is pel-aligned and also to intra predicted blocks. Change-Id: I08e8cba978f2bbf3019f8413f376b8e2cd85eba4
2013-01-08Merge superblocks (32x32) experiment.Ronald S. Bultje
Change-Id: I0df99742029834a85c4933652b0587cf5b6b2587
2013-01-08Merge vp9-preview changes into experimental branchJohn Koleszar
Incorportate vp9-preview changes by merging master branch into experimental. Conflicts: test/test.mk vp9/common/vp9_filter.c vp9/common/vp9_idctllm.c vp9/common/vp9_invtrans.h vp9/common/vp9_mbpitch.c vp9/common/vp9_rtcd_defs.sh vp9/common/vp9_systemdependent.h vp9/common/vp9_type_aliases.h vp9/common/x86/vp9_asm_stubs.c vp9/common/x86/vp9_subpixel_mmx.asm vp9/decoder/vp9_decodframe.c vp9/decoder/vp9_dequantize.c vp9/decoder/vp9_dequantize.h vp9/decoder/vp9_onyxd_int.h vp9/encoder/vp9_bitstream.c vp9/encoder/vp9_encodeframe.c vp9/encoder/vp9_rdopt.c Change-Id: I17f51c3666d1b59cf1a699f87607cbc5d30a87c5
2012-12-26Build fixes to merge vp9-preview into masterJohn Koleszar
Various fixups to resolve issues when building vp9-preview under the more stringent checks placed on the experimental branch. Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07