summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_mbgraph.c
AgeCommit message (Collapse)Author
2013-11-22Refactoring of rate control - part 1Deb Mukherjee
Moves all rate control variables to a separate structure, removes some currently unused variables, moves some rate control functions to vp9_ratectrl.c, and splits the encode_frame_to_data_rate function. Change-Id: I4ed54c24764b3b6de2dd676484f01473724ab52b
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-24Adding get_frame_new_buffer() function to replace duplicated code.Dmitry Kovalev
Change-Id: I6e0e19231a48364c1de7dfab730b121ab227f111
2013-10-21Moving allow_high_precision_mv from MACROBLOCKD to VP9_COMMON.Dmitry Kovalev
This value is a global frame-level flag, not a macroblock-level. Change-Id: Ie8c5790a931150741c2167c00c3e3dd2cf26744d
2013-10-17Adding allow_hp as an argument to mv search functions.Dmitry Kovalev
Making this change in order to move allow_high_precision_mv field from MACROBLOCKD structure to VP9_COMMON (because it is a frame level flag). Change-Id: I1d006ba36d938e0caf4d40fa051e2e38df9c1108
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-16Make the static_segmentation feature work againGuillaume Martres
Change-Id: I766c4b74db526efa4ff6dd2d95ef3e0beb45b6e5
2013-10-04cpplint issues vp9_mbgraphJim Bankoski
Change-Id: Iedf9ac460edb31d7c072e2bebd26f2afe8e6089b
2013-09-29Merge "Moving from int_mv* to MV* (3)."Dmitry Kovalev
2013-09-25Merge "Limit mv search range for first pass and mbgraph"Yaowu Xu
2013-09-25Moving from int_mv* to MV* (3).Dmitry Kovalev
Change-Id: I9795d0937bc07793c13d067281995e0750f694d9
2013-09-24Limit mv search range for first pass and mbgraphYaowu Xu
Both first pass and mbgraph search use block size 16x16 for motion estimation. This commit put a limit of motion vector range. The effective range allows the entire 16x16 with required subpel interpolation input to be completely outside image border, but not any further away from image border. Change-Id: Id70a5ed08be49e70959f064859d72adc7d775d08
2013-09-24Moving from int_mv* to MV* (2).Dmitry Kovalev
Updating fractional_mv_step_fp and fractional_mv_step_comp_fp function types. Change-Id: I601c4378bc39ac3ffd4e295d9cbd8e1f74829d46
2013-09-11New mode_info_context storage -- undo revertScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of pointers to MODE_INFO structs. The MODE_INFO structs are now stored as a stream (decoder only), eliminating unnecessary copies and is a little more cache friendly. Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
2013-09-09Revert "New mode_info_context storage"James Zern
This reverts commit dae17734ece414091ba1184f7becd0aa6c0004f1 Encode crashes, leaks and increases integer overflow errors. Change-Id: I595aa2649bb8d0b6552ff91652837a74c103fda2
2013-09-06New mode_info_context storageScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of a pointer to a MODE_INFO struct and a "in the image" flag. The MODE_INFO structs are now stored as a stream, eliminating unnecessary copies and is a little more cache friendly. For the test clips used, the decoder performance improved by ~4.3% (1080p) and ~9.7% (720p). Patch Set 2: Re-encoded clips with latest. Now ~1.7% (1080p) and 5.9% (720p). Change-Id: I846f29e88610fce2523ca697a9a9ef2a182e9256
2013-08-15Using { 0 } for initialization instead of memset.Dmitry Kovalev
Change-Id: I4fad357465022d14bfc7e13b348c6da267587314
2013-08-12Using MV* instead of int_mv* as argument of vp9_clamp_mv_min_max.Dmitry Kovalev
Change-Id: I3c45916a9059f11b41e9d798e34ffee052969a44
2013-08-06Clean ups of the subpel search functionsDeb Mukherjee
Removes some unused code and speed features, and organizes the interfaces for fractional mv step functions for use in new speed features to come. In the process a new speed feature - number of iterations per step during the subpel search - is exposed. No change when this parameter is set as the original value of 3. Results: subpel_iters_per_step = 3: baseline subpel_iters_per_step = 2: psnr -0.067%, 1% speedup subpel_iters_per_step = 1: psnr -0.331%, 3-4% speedup Change-Id: I2eba8a21f6461be8caf56af04a5337257a5693a8
2013-08-06Flexible support for various pattern searchesDeb Mukherjee
Adds a few pattern searches to achieve various tradeoffs between motion estimation complexity and performance. The search framework is unified across these searches so that a common pattern search function is used for all. Besides it will be easier to experiment with various patterns or combinations thereof at different scales in the future. The new pattern search is multi-scale and is capable of using different patterns at different scales. The new hex search uses 8 points at the smallest scale and 6 points at other scales. Two other pattern searches - big-diamond and square are also added. Big diamond uses 4 points at the smallest scale and 8 points in diamond shape at the larger scales. Square is very similar conceptually to the default n-step search but is somewhat faster since it keeps only one survivor across all scales. Psnr/speed-up results on derf300: hex: -1.6% psnr%, 6-8% speed-up big-diamond: -0.96% psnr, 4-5% speedup square: -0.93% psnr, 4-5% speedup Change-Id: I02a7ef5193f762601e0994e2c99399a3535a43d2
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-01Cleanup: removing unused function arguments.Dmitry Kovalev
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-07-25General cleanups.Dmitry Kovalev
Removing unused constants, macros, and function declarations. Using ROUND_POWER_OF_TWO macro, vp9_zero, vp9_copy where possible. Moving #include from *.h to *.c. Merging for loops for motion vectors. Change-Id: Ic3bf841764a2bb177128bb3a6d7aa8f68229cd13
2013-07-18VP[89]_COMMON: remove golden/altref frame countsJames Zern
these are only used in the encoder. frames_since_golden / frames_till_alt_ref_frame -> VP[89]_COMP Change-Id: Ie14a6f46987bced685ddb449b85dc261caba6dfe
2013-07-08Make intra prediction pointers RTCD-based.Ronald S. Bultje
This probably has a mildly negative impact on performance, but will (in future commits - or possibly merged with this one) allow SIMD implementations of individual intra prediction functions. We may perhaps want to consider having separate functions per txfm-size also (i.e. 4x4, 8x8, 16x16 and 32x32 intra prediction functions for each intra prediction mode), but I haven't played much with that yet. Change-Id: Ie739985eee0a3fcbb7aed29ee6910fdb653ea269
2013-06-28Removing CONFIG_DEBUG checks on assertions.Dmitry Kovalev
Adding CHECK_MEM_ERROR macro to vp9_common.h and removing two duplicated ones from vp9_onyx_int.h and vp9_onyxd_int.h. Change-Id: I916afec61b3019f18193135dac7c35ed0f89b8b6
2013-06-26Change meaning of cpi->sf.first_step and rename.Paul Wilkins
Renamed cpi->sf.first_step to cpi->sf.reduce_first_step_size and changed its meaning such that it is a delta applied to reduce the default first step size (>> x) in the motion search rather than an absolute value. The default first step size is already changed according to the image dimensions (smaller for smaller images). cpi->sf.reduce_first_step_size now applies a further correction from the default. Change-Id: Ia94e08bc24c67b604831f980909af7e982fcd16d
2013-06-07Fix mv range border in pixelsJingning Han
WIP: trying to resolve the mismatch issue in extending frame dimension into multiples of 8. Change-Id: I24e7638ab3c50e21e6969c1eeed4f607d6f11f65
2013-06-07Fix static segmentation feature.Ronald S. Bultje
Change-Id: Ia36f626b9b3c2fe7eb89bb9acddf4701db1baef2
2013-05-08Merge "Removing unused YV12_BUFFER_CONFIG arguments from motion search ↵Dmitry Kovalev
functions." into experimental
2013-05-08Renaming 'Speed' to 'speed' inside VP9_COMP struct.Dmitry Kovalev
Change-Id: I4374b5af40ee9082ddf7956a9756a15ad9ad5436
2013-05-08Removing unused YV12_BUFFER_CONFIG arguments from motion search functions.Dmitry Kovalev
Also doing a little bit of cleanup inside vp9_mbgraph.c. Change-Id: I9c6711b73810969d2d8fdb19f8edf9ed6e49d1e3
2013-05-07Merge "Merge SB8X8 into the codebase" into experimentalJingning Han
2013-05-07Merge SB8X8 into the codebaseJingning Han
Pull sb8x8 out of experimental list. verified via borg run tests. Fixed unit test failures. Change-Id: I12a4bbd17395930580c048ab68becad1ffe46e76
2013-05-06Removed vp9_setup_intra_recon()Scott LaVarnway
This setup is now handled by vp9_build_intra_predictors() when left_available and/or up_available is zero. Change-Id: I59cec0ab95f8be69ce885fd20727510e4deef8a0
2013-04-29Cleaning up encoder segmentation code.Dmitry Kovalev
Moving code from vp9_pack_bitstream to new function encode_segmentation. Change-Id: I1f1e59a1f038618ad95162b7db4b6f8164850ea8
2013-04-26Grow MODE_INFO array to use an 8x8 basis.Ronald S. Bultje
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-26Remove BLOCKD structureJohn Koleszar
All members can be referenced from their per-plane counterparts, and removes assumptions about 24 blocks per macroblock. Change-Id: I7ff2fa72d22c29163eb558981c8193765a8113d9
2013-04-25Remove predictor pointers from BLOCKDJohn Koleszar
Access these members from MACROBLOCKD instead. Change-Id: I2574622e577bb9feede47f6b7ccbb11f3e928ca8
2013-04-25Remove BLOCK structureJohn Koleszar
All members can be referenced from their per-plane counterparts, and removes assumptions about 24 blocks per macroblock. Change-Id: I593fb0715e74cd84b48facd1c9b18c3ae1185d4b
2013-04-22Move pre, second_pre to per-plane MACROBLOCKD dataJohn Koleszar
Continue moving framebuffers to per-plane data. Change-Id: I237e5a998b364c4ec20316e7249206c0bff8631a
2013-04-22reconinter: remove unnecessary functions, paramsJohn Koleszar
Removes the redundant dst pointers from vp9_build_inter_predictors_sb{y,uv} and the remaining mb specific functions. Change-Id: I7b6bf439d9394b85ea79b4fe61a3ffc1025720da
2013-04-19Move dst to per-plane MACROBLOCKD dataJohn Koleszar
First in a series of commits moving the framebuffers pointers to per-plane data, so that they can be indexed numerically rather than by name. Change-Id: I6e0d60fd4d51e6375c384eb7321776564df21775
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-03-08Extend diff MV limit from +/-256 to +/-1024Jingning Han
Increase the motion search range by 4x. Change MV_CLASS tree of the entropy coding to allow two additional mv classes to cover the extended motion vector limit. The codec determines the effective motion search range conditioned on the actual frame dimension. It provides coding gains: stdhd 0.39% yt 0.56% hd 0.47% Major coding performance gains are packed in several sequences with intense motion activities, e.g., ped_1080p gains 7% at high bit-rates, and on average 3%. TODO: Need to further tune the rate control and motion search units. Change-Id: Ib842540a6796fbee5a797809433ef6a477c6d78d
2013-02-28Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keyword, better formatting, code simplification. Change-Id: I132fea14f08c706ee9ea147d19464d03f833f25b
2013-02-27Use ref_frame_map vice active_ref_idx on the encoderJohn Koleszar
This patch makes the encoder's use of ref_frame_map and active_ref_idx consistent with the decoder. ref_frame_map[] maps a reference buffer index to its actual location in the yv12_fb array, since many references may share an underlying buffer. active_ref_idx[] mirrors cpi->{lst,gld,alt}_fb_idx, holding the active references in each slot. This also fixes a bug in setup_buffer_inter() where the incorrect reference was used to populate the scaling factors. Change-Id: Id3728f6d77cffcd27c248903bf51f9c3e594287e
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-02-26Refactor inter recon functions to support scalingJohn Koleszar
Ensure that all inter prediction goes through a common code path that takes scaling into account. Removes a bunch of duplicate 1st/2nd predictor code. Also introduces a 16x8 mode for 8x8 MVs, similar to the 8x4 trick we were doing before. This has an unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that case for now. Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba
2013-01-16Start to anonymize reference framesJohn Koleszar
Remove lst_fb_idx, gld_fb_idx, alt_fb_idx, refresh_last_frame, refresh_golden_frame, refresh_alt_ref_frame from common. Gold/Alt are encode side conventions. From the decoder's perspective, we want to be dealing with numbered references. Updates to active_ref 2 signal mode context switches, vestigial from refresh_alt_ref_frame. This needs some clean up to make sense with increased numbers of reference frames, as well as reimplementing the swapping of alt/golden which was previously done using the buffer-to-buffer copy mechanism removed in an earlier commit. Change-Id: I7334445158b7666f9295d2a2dd22aa03f4485f58