summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
AgeCommit message (Collapse)Author
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
2014-11-04Simplify interface of write_selected_tx_size and read_tx_sizeHui Su
Change-Id: Ia2b2a895deefaaf7b34bf26df86add56dbab082c
2014-10-27Refactor encoder tile data structureJingning Han
Make the common tile info as one element in the encoder tile data struct. Change-Id: I8c474b4ba67ee3e2c86ab164f353ff71ea9992be
2014-10-22vp9_ethread: allocate frame contexts outside VP9_COMMON structYunqing Wang
This patch allocated frame contexts outside VP9_COMMON. This allows multiple threads to share the same copy of frame contexts, and reduces the overhead. It also guarantees the correct update of these contexts during bitstream packing. This patch doesn't change encoding result. Change-Id: Ic181a2460b891d1d587278a6d02d8057b9dbd353
2014-10-17Remove the dependency in token storing locationsYunqing Wang
Currently, the tokens for a tile are stored immediately after its preceding tile, which causes a dependency. This is unnecessary since we always allocate enough memory for tokens. Removing the dependency allows token writing done in parallel. This patch doesn't change encoding result. Change-Id: I7365a6e5e2c2833eb14377c37e1503c9d0f26543
2014-10-16[spatial svc]Another workaround to avoid using prev_miMinghai Shang
We encode a empty invisible frame in front of the base layer frame to avoid using prev_mi. Since there's a restriction for reference frame scaling factor, we have to make it smaller and smaller gradually until its size is 16x16. Change remerged. Change-Id: I9efab38bba7da86e056fbe8f663e711c5df38449
2014-10-16Revert "[spatial svc]Another workaround to avoid using prev_mi"Paul Wilkins
This reverts commit c113457af9880b8e15a36cdaabfd414d1c245693. Temporary revert to allow clean revert of another commit. Change-Id: Ia9b7b755e6c48e1b6e383329f121fef175a24b27
2014-10-14[spatial svc]Another workaround to avoid using prev_miMinghai Shang
We encode a empty invisible frame in front of the base layer frame to avoid using prev_mi. Since there's a restriction for reference frame scaling factor, we have to make it smaller and smaller gradually until its size is 16x16. Change-Id: I60b680314e33a60b4093cafc296465ee18169c19
2014-10-07Take out repeated block width/height lookup functionsJingning Han
The functions b_width_log2 and b_height_log2 only do direct table fetch. This commit unifies such use cases by using the table directly and removes these functions. Change-Id: I3103fc6ba959c1182886a2799d21b8b77c8a7b6b
2014-09-25Adds various high bit-depth encode functionsDeb Mukherjee
Change-Id: I6f67b171022bbc8199c6d674190b57f6bab1b62f
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-09-03Merge "Removing clear_system_state() call from update_coef_probs()."Dmitry Kovalev