summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
AgeCommit message (Collapse)Author
2016-10-21vp9_bitstream: Encode tiles in parallelVignesh Venkatasubramanian
Re-use the tile worker threads to pack the bitstream in parallel on a per-tile basis. Restricting this to real-time only for now (further testing is needed to ensure this does not make 2-pass worse in any case). BUG=webm:1309 Change-Id: I8a80da7c5089b837d0df79a5c49d5e3022dfc8ec
2016-10-18Revert "vp9_bitstream: Encode tiles in parallel"James Zern
This reverts commit 9e8efa5b189a5abf78b1bcbc8076893728129d1e. this change causes ubsan warnings, failures in vpxenc_vp9_webm_rt_multithread_tiled BUG=webm:1309 Change-Id: I020c7be985c771bfff4b3de1afe51cc8edb980da
2016-10-17vp9_bitstream: Encode tiles in parallelVignesh Venkatasubramanian
Re-use the tile worker threads to pack the bitstream in parallel on a per-tile basis. Restricting this to real-time only for now (further testing is needed to ensure this does not make 2-pass worse in any case). BUG=webm:1309 Change-Id: Ia2c982da56697756e12f02643f589189b3271d98
2016-10-12vp9_bitstream: Parameterize interp_filter_selectedVignesh Venkatasubramanian
Facilitates encoding tiles in parallel. BUG=webm:1309 Change-Id: I37aa336d47babffc8352188dc767eebdb8a99474
2016-10-12vp9_bitstream: Parameterize max_mv_magnitudeVignesh Venkatasubramanian
Facilitates encoding tiles in parallel. BUG=webm:1309 Change-Id: I614a5a492c30b6773c30e7294cd6a6f456e02ab4
2016-10-07write_modes: add MACROBLOCKD as a parameterVignesh Venkatasubramanian
This will enable bit stream packing of each tile column in parallel. BUG=webm:1309 Change-Id: Ie349d8cc5825326218ffda893a50730b2e68ed34
2016-10-01Fix warning when building with GCC 5.Geza Lore
These caused the following warning with GCC 5: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] assert(!is_compound == (cm->reference_mode == SINGLE_REFERENCE)); Change-Id: If296aabb2311ceb7d903b395c1549ef81c2cbf9b (cherry picked from commit c6cf7a6111f6539f01a34865aaedd179a5ae062c)
2016-08-02vp9/encoder: apply clang-formatclang-format
Change-Id: I45d9fb4013f50766b24363a86365e8063e8954c2
2016-07-21VP9: get_pred_context_switchable_interp() -- encoder sideScott LaVarnway
Change-Id: I7217c90d5cf38c51b76759a2dc4f10070f3a40ac
2016-06-15Add vp9 encoder API VP9E_GET_LEVEL to provide bitstream levelhui su
Change-Id: I1ef3df0192491035728fe9d5eb25cc66dc2965de
2016-05-25Refactor probability savings search.Alex Converse
- Avoid excessive copying - Don't both searching if no update can possibly offer savings - Simplify the interface - Remove the confusing vp9_cost_upd256 macro Change-Id: Id9d9676a361fd1203b27e930cd29c23b2813ce59
2016-01-19VP9: Eliminate MB_MODE_INFOScott LaVarnway
Change-Id: Ifa607dd2bb366ce09fa16dfcad3cc45a2440c185
2015-11-06Expand unconstrained nodes in pack_mb_tokens and loop on zeros.Alex Converse
Reduces Linux perf estimated cycle count for pack_mb_tokens on a lossless encode on my desktop from 61858501855 to 48154040219 or from 26% of the overall profile to 21%. Change-Id: I9ca3426d7e3272bc7f7030abda4f0d0cec87fb4a
2015-10-06vp9: simplify extrabits encodingAlex Converse
Change-Id: I5a2abd35cb303d8f6354b3119ab95acf90405116
2015-09-25Rename display_{size,width,height} to render_*.Ronald S. Bultje
The name "display_*" (or "d_*") is used for non-compatible information (that is, the cropped frame dimensions in pixels, as opposed to the intended screen rendering surface size). Therefore, continuing to use display_* would be confusing to end users. Instead, rename the field to render_*, so that struct vpx_image can include it. Change-Id: Iab8d2eae96492b71c4ea60c4bce8121cb2a1fe2d
2015-09-16Add support for color-range.Ronald S. Bultje
In decoder, export (eventually) into vpx_image_t.range field. In encoder, use oxcf->color_range to set it (same way as for color_space). See issue 1059. Change-Id: Ieabbb2a785fa58cc4044bd54eee66f328f3906ce
2015-08-31Include vpx_dsp_common.h when using VPXMIN/MAXJohann
Change-Id: I2e387a06484a06301f3cd6600c4ba2f4335b61ee
2015-08-26vpx_dsp_common: add VPX prefix to MIN/MAXJames Zern
prevents redeclaration warnings; vp8 has its own define which will be resolved in a future commit Change-Id: Ic941fef3dd4262fcdce48b73075fe6b375f11c9c
2015-08-10Move vp9_systemdependent.h to vpx_ports bitops.h and system_state.hAlex Converse
Use system_state.h in vpx_dsp and remove unneeded includes of vp9_systemdependent.h. Change-Id: I92557ec6dd5aa790160b4f31fe7967db0d7ec3c4
2015-07-20vpx_dsp/bitwriter_buffer.h: vp9_ -> vpx_Yaowu Xu
Change-Id: I0ac7beaa160a6c2a60a019f6b8ce85e6537bed7d
2015-07-20vpx_dsp/bitwriter.h: vp9_->vpx_Yaowu Xu
changes prefix vp9_ to vpx_ for non codec specific functions and data structures. Change-Id: I91a21548e39bd24d2c7caaaa223ae47240bb78c8
2015-07-20vpx_dsp/prob.h: vp9_ -> vpx_Yaowu Xu
change prefix vp9_ to vpx_ for non codec specific functions and data structures. Change-Id: I97c7e6422eceea99212b93f4942bc2187763a07c
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-07-20Remove vp9_ prefix from bit writer filesYaowu Xu
Change-Id: I07647c7482b9ec498fbad3a9c9901f72b2336500
2015-07-20Move bit writer files to vpx_dsp/Yaowu Xu
Change-Id: Id27e0007a0feac821ca66bcecbf3a723305da82d
2015-06-29VP9: Move ref_mvs[][] and mode_context[] from MB_MODE_INFOScott LaVarnway
to MB_MODE_INFO_EXT. This saves 36 bytes per 8x8 area for both the decoder and encoder. (encoder has two MODE_INFO buffers) Change-Id: If006abb2224acaf326df3c2be09e77e967662107
2015-06-16Merge "Eliminated frame_type check in get_partition_probs()"Scott LaVarnway
2015-06-16Eliminated frame_type check in get_partition_probs()Scott LaVarnway
Moved the frame_type check to the tile level and stored the prob ptr in MACROBLOCKD. Change-Id: I10b5a4abd58213dc7610e3ade1a1583c01526842
2015-06-11inline vp9_get_segdata()Scott LaVarnway
and change name. Change-Id: I706645cf9d9dc04f1b3b6ac80df80edb7f101854
2015-06-11inline vp9_segfeature_active()Scott LaVarnway
and changed name. Change-Id: Ie023ca66cc2c823032f58d4faeb53fd1863c94f3
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-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
2015-03-23Simplify skip check.Alex Converse
SEG_LVL_SKIP implies skip. This is enforced by skip = write_skip(). Change-Id: I61c79581c9c53deae36685c2bcf388cb4d8827d3
2015-03-04Make encoder buffer allocation dynamicAdrian Grange
Frame buffers are now allocated dynamically on-demand. Entries in the reference frame map, cm->ref_frame_map, may now be set to -1 (INVALID_IDX) to indicate that there is not a valid reference buffer in that "slot". All slots in the reference frame map are now initialized to the empty state (-1) and each buffer is initialized to have a reference count of 0. Change-Id: Id1afe98de98db4ae8b2dfefed7889c3b28c68582
2015-02-02adjust rtc setting and thresholdYaowu Xu
1. Adjusted the threshold for coef update computation based on counts of tx used, avoid coef update computation when count is low (<20) 2. Move sf->lpf_pick = LPF_PICK_MINIMAL_LPF to speed 8. Change-Id: I02b44309e40fcdbf135c7934ae067a3f42502d30
2015-01-30Optimize coef updateYaowu Xu
1. move the check of search method of USE_TX_8X8 up one level to avoid operations of build_tree_distributions() 2. count tx used and avoid computaton for coef udpate when one size is not used at all. Change-Id: Ia3e54a2588aa531c41377a1bfaa64385d04a592c
2015-01-28Simplify update_coef_probs()Yaowu Xu
1. reduce the size of temporaray arrays on stack 2. avoid build_tree_distribution for tx size that is not used at all. Change-Id: I0f8d7124e16a3789d3c15ad24cf02c1c12789e2c
2015-01-14Add encoder control for setting color spaceYaowu Xu
This commit adds encoder side control for vp9 to set color space info in the output compressed bitstream. It also amends the "vp9_encoder_params_get_to_decoder" test to verify the correct color space information is passed from the encoder end to decoder end. Change-Id: Ibf5fba2edcb2a8dc37557f6fae5c7816efa52650
2015-01-06Moves inter mode count updates to update_statsDeb Mukherjee
This makes the inter_mode counts update consistent with other symbols. Also, forward updates should work corerctly now. Change-Id: Id98be26fd08875162e644bb8f1de6f0918f85396
2014-12-22Merge "remove static initializers for partition tree"Jim Bankoski
2014-12-17remove static initializers for partition treeJim Bankoski
Could have problem with 2 encoders. Change-Id: I92d326933c00fee688f77b54acf467ca5a8516bc see: https://code.google.com/p/webm/issues/detail?id=900&thanks=900&ts=1418843841
2014-12-12vp9: move encoder-only member from commonJames Zern
allow_comp_inter_inter VP9_COMMON -> VP9_COMP Change-Id: I6d9dc25d1cdd7e2ab62f5be69cd9fa883d21dbb6
2014-12-05Improve the performance by caching the left_mi and right_mi in macroblockd.hkuang
This improve the deocde performance by ~2% on Nexus 7 2013. Change-Id: Ie9c4ba0371a149eb7fddc687a6a291c17298d6c3
2014-12-03Remove unused ONE_LOOP entry from speed featureJingning Han
Change-Id: I56ead0ebc2491144c4e79e5859b05e126176702c
2014-12-03Rework coeff probability model update for rtc codingJingning Han
This commit reworks the ONE_LOOP_REDUCED coefficient probability model update process. It allows model update for every coefficient across the spectrum at a coarser resolution, instead of performing precise update only for certain subset of probability models. The overall runtime remains nearly same (<1% change) for speed -6. The compression performance is improved by 7.5% in PSNR for speed -5 and 4.57% for speed -6, respectively. Change-Id: Ifb17136382ee7e39a9f34ff4a4f09a753125c8d1
2014-11-25vp9_ethread: calculate and save the tok starting address for tilesYunqing Wang
Each tile's tok starting address is calculated before the encoding process. These addresses are stored so that the same calculation won't be done again in packing bit stream. Change-Id: I0a3be0301f002260c19a850303f2f73ebc47aa50
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: combine encoder counts in separate structYunqing Wang
Several frame counters in encoder are updated at SB level. Combine those counters and put them in a separate struct, which allows us to allocate one copy for each thread. Change-Id: I00366296a13c0ada4d8fa12f5e07728388b6cab7
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