summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_segmentation.c
AgeCommit message (Collapse)Author
2015-07-20vpx_dsp/bitreader.h: vp9_->vpx_Yaowu Xu
Replace vp9_ in names to vpx_ as they are not codec specific. Change-Id: I2e583aa63dee769353ada4b42417aa15c4074ebb
2015-06-15vp9_pred_common: inline vp9_get_segment_idJames Zern
+ drop 'vp9_' prefix Change-Id: Id5a3c8d416dbdf93d9f4f1bde662f7b2c2290168
2015-04-28vpx_mem: remove vpx_memsetJames Zern
vestigial. replace instances with memset() which they already were being defined to. Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28vpx_mem: remove vpx_memcpyJames Zern
vestigial. replace instances with memcpy() which they already were being defined to. Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-21Revert "Remove mi_grid_* structures."Scott LaVarnway
(see I3a05cf1610679fed26e0b2eadd315a9ae91afdd6) For the test clip used, the decoder performance improved by ~2%. This is also an intermediate step towards adding back the mode_info streams. Change-Id: Idddc4a3f46e4180fbebddc156c4bbf177d5c2e0d
2014-11-24vp9_ethread: modify VP9_COMP structureYunqing Wang
This patch modified struct VP9_COMP. Created a struct ThreadData to include data that need to be copied for each thread. In multiple thread case, one thread processes one tile. all threads share one copy of VP9_COMP, (refer to VP9_COMP *cpi in the code) but each thread has its own copy of ThreadData, (refer to ThreadData *td in the code). Therefore, within the scope of encode_tiles(), both cpi and td need to be passed as function parameters. In single thread case, the FRAME_COUNTS pointer in ThreadData points to "counts" in VP9_COMMON. Change-Id: Ib37908b2d8e2c0f4f9c18f38017df5ce60e8b13e
2014-11-20Revert "vp9_ethread: include a pointer to mb in VP9_COMP"Yunqing Wang
This reverts commit 6906d218ddd1af97228a797f4558e402231d94f1. Another way will be used to handle mb struct. Change-Id: Ic1111a46b2b1ee00f8f9e3fcd4cf3eb6030b2dc4
2014-11-14vp9_ethread: include a pointer to mb in VP9_COMPYunqing Wang
Modified VP9_COMP struct to include MACROBLOCK *mb. This change makes it feasible in multi-thread case to allocate a mb for each thread. Change-Id: I624d6d1aa9c132362200753e5d90b581b1738d6e
2014-09-19Remove mi_grid_* structures.hkuang
mi_grid_* are arrays of pointer to pointer. They save the pointers that point to the MIs in cm->mi. But they are unnecessary and complicated. The original goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer inside MODE_INFO_t, same goal could be achieved. This commit totally removes the mi_grid_* structures. But there are still many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit will do on-demand MODE_INFO_t allocation in order to save these memories. Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
2014-08-06Removing direct references to VP9_COMP.Dmitry Kovalev
Change-Id: Ic37624d807884e71f08b50fd04892f03f2708ba7
2014-07-02Adapt strength of AQ2.Paul Wilkins
Adapt the use of segmentation in AQ mode 2 based on the ambient kf/arf/gf Q. Disable segmentation where the rate per SB is very low and overheads are likely to outweigh the benefits. This patch reduces the -ve average metrics impact of AQ mode 2 while allowing stronger 3 segment AQ in some cases. Average improvement ~0.5-1.0%. Change-Id: I5892dfcc7507c5cc6444531cc7fe17554cf8d0c7
2014-05-15Removing redundant "8x8" suffix from MODE_INFO vars.Dmitry Kovalev
Change-Id: I7ed7fecc959c6598ff98895f1a5cf7e11ac1615f
2014-04-21Inlining vp9_set_segmentation_map() function.Dmitry Kovalev
Change-Id: I82f23f0f91a0be8329e20fcd2a5918c6a096dacc
2014-04-01Renaming two members in MACROBLOCKD struct.Dmitry Kovalev
Renames: mi_8x8 -> mi mode_info_stride -> mi_stride Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-03-05Adding vp9_cost.{h, c} files.Dmitry Kovalev
Change-Id: If90c1bc822873156d4e38fca1938e4907f6c95f0
2014-02-28Removing unnecessary casts from quantization code.Dmitry Kovalev
Change-Id: I64172710654e95a90ee754d14d7104337d28010f
2014-01-06Moving reset_segment_features() to encoder/vp9_segmentation.h.Dmitry Kovalev
Change-Id: I0db4b31cb2382d4f6249eae0a8f42d227ad0ac57
2013-12-16Move two functions to encoderYaowu Xu
As they are used by encoder only. Change-Id: I7b1e6955b218aba66fe156523521a8121c9a84a4
2013-11-22Inlining and removing vp9_set_pred_flag_seg_id() function.Dmitry Kovalev
Change-Id: I0fd76937e847f78378a7ab3fa0af00a7c2c52b42
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-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-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-09-24Correctly set the segment_id prediction flag and contextGuillaume Martres
This fix a bug introduced by ac6093d179d8488f90bf10c6d0abcc48be327d28 Change-Id: I0700a4daf7a6a2471074f81a4596352287fb2ac9
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-27Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the encoder.Dmitry Kovalev
Change-Id: I62bb07c377f947cb72fac68add7a6b199e42c6b9
2013-08-26Using num_8x8_* lookup tables instead of mi_*_log2.Dmitry Kovalev
Change-Id: I8a246b3d056c98be614d05a90bc261e2441ffc10
2013-08-15Merge "Moving segmentation struct from MACROBLOCKD to VP9_COMMON."Dmitry Kovalev
2013-08-15Using { 0 } for initialization instead of memset.Dmitry Kovalev
Change-Id: I4fad357465022d14bfc7e13b348c6da267587314
2013-08-15Moving segmentation struct from MACROBLOCKD to VP9_COMMON.Dmitry Kovalev
VP9_COMMON is the right place to segmentatation struct because it has global segmentation parameters, not something specific to macroblock processing. Change-Id: Ib9ada0c06c253996eb3b5f6cccf6a323fbbba708
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-02Replacing long block size enum values with shorter ones.Dmitry Kovalev
Change-Id: I0e9329490828684a4fd46f540d89114cc68e8407
2013-08-01Cleanup: removing unused function arguments.Dmitry Kovalev
Change-Id: I27471768980fc631916069f24bc7c482a5c9ca17
2013-07-23Renaming of segment constants.Paul Wilkins
Renamed: MAX_MB_SEGMENTS to MAX_SEGMENTS MB_SEG_TREE_PROBS to SEG_TREE_PROBS The minimum unit for segmentation in the segment map is now 8x8 so it is misleading to use MB_ as macro-block traditionally refers to a 16x16 region. Change-Id: I0b55a6f0426bb46dd13435fcfa5bae0a30a7fa22
2013-07-16Cleaning up tile code.Dmitry Kovalev
Removing tile_rows and tile_columns from VP9Common, removing redundant constants MIN_TILE_WIDTH and MAX_TILE_WIDTH, changing signature of vp9_get_tile_n_bits. Change-Id: I8ff3104a38179b2c6900df965c144c1d6f602267
2013-07-16Rewriting vp9_set_pred_flag_{seg_id, mbskip}.Dmitry Kovalev
Making implementation of vp9_set_pred_flag_{seg_id, mbskip} consistent with vp9_get_segment_id without using confusing sub(a, b) macro. Passing mi_row and mi_col to functions explicitly instead of replying on mb_to_right_edge and mb_to_bottom_edge. Change-Id: I54c1087dd2ba9036f8ba7eb165b073e807d00435
2013-07-11Removing redundant code mostly from vp9_pred_common.{h, c}.Dmitry Kovalev
Removing redundant function arguments and curly braces. Change-Id: I46e02561f33fe02e84a3b19756f03b9504bd6a1b
2013-07-11Moving segmentation related vars into separate struct.Dmitry Kovalev
Adding segmentation struct to vp9_seg_common.h. Struct members are from macroblockd and VP9Common structs. Moving segmentation related constants and enums to vp9_seg_common.h. Change-Id: I23fabc33f11a359249f5f80d161daf569d02ec03
2013-07-09removing case statements around prediction entropy codingJim Bankoski
Removes SEG_ID Removes MBSKIP Removes SWITCHABLE_INTERP Removes INTRA_INTER Removes COMP_INTER_INTER Removes COMP_REF_P Removes SINGLE_REF_P1 Removes SINGLE_REF_P2 Removes TX_SIZE Change-Id: Ie4520ae1f65c8cac312432c0616cc80dea5bf34b
2013-06-27Decoder's code cleanup.Dmitry Kovalev
Using vp9_set_pred_flag function instead of custom code, adding decode_tokens function which is now called from decode_atom, decode_sb_intra, and decode_sb. Change-Id: Ie163a7106c0241099da9c5fe03069bd71f9d9ff8
2013-06-26General cleanup in segmentation-related code.Dmitry Kovalev
Using consistent function and variable names. Change-Id: I2deb3fded8797453a2081836c9ce2e79ade06eb7
2013-06-21Removing find_seg_id and using vp9_get_pred_mi_segid instead.Dmitry Kovalev
Change-Id: Ia40229903c08f14020e90e94cfdf494aba1be827
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-02vp9/count_segs: fix out of bounds readJames Zern
don't access mi until mi_{row,col} validation has been done Change-Id: Ie1be052612cfccb2730dff9281c222bca28bf2c6
2013-05-02Merge "Using treed_read/treed_write functions for segment ids." into ↵Dmitry Kovalev
experimental
2013-04-30Merge "Cleaning up encoder segmentation code." into experimentalDmitry Kovalev
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-30Using treed_read/treed_write functions for segment ids.Dmitry Kovalev
Changing the order of probabilities inside mb_segment_tree_probs in order to use treed_read/treed_write function instead of custom code. Change-Id: I843487d5057913b9358db73da270893eefecc6c8
2013-04-29Cleaning up encoder segmentation code.Dmitry Kovalev
Moving code from vp9_pack_bitstream to new function encode_segmentation. Change-Id: I1f1e59a1f038618ad95162b7db4b6f8164850ea8