summaryrefslogtreecommitdiff
path: root/vp9/decoder/vp9_detokenize.c
AgeCommit message (Collapse)Author
2015-02-19Optimize the dequantization process on decoder side.Hangyu Kuang
Change-Id: I00621ff7165bbe86a18794b4a816976c9effaf78
2015-02-03vp9_dthread: pass frame counts to decoder functionsYunqing Wang
The current multi-threaded tile decoder requires that the videoes are encoded with frame_parallel_decoding_mode = 1. This requirement is not necessary, and is better to be removed. This patch includes the first part of the work. Change-Id: Ic7695fb3cfe13f9022582c9f0edd2aa6e2e36d28
2015-01-06Enable coefficient range checking for 10-/12-bitDeb Mukherjee
Also fixes a broken build with --enable-coefficient-range-checking configuration option. Change-Id: Icc536f53088e8cec59dfb8f635668555fdb9125e
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-07Add range checking for decoded coefficients.Yaowu Xu
The coefficient range checking is enabled when configured with --enable-debug --enable-coefficient-range-checking for vpxdec to detect ill-formed input stream. This addresses the problem raised by issue #792. Change-Id: I3f9ea541de4dc742dd64389d6c5f543fb1c4f052
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-19High bit-depth coefficient coding functionsDeb Mukherjee
Tokenization and Detokenization enhancements for 10/12 bit Change-Id: I3c269ec30f8eb160ee024905638a193975237559
2014-09-16Speeding up decode_coeffs().Dmitry Kovalev
1080p decoding speedup -- 1.25%, 4K decoding speedup -- 2.5%. Change-Id: I5f02f521cbf7758d4d1886a93bc5b074abdff03d
2014-09-11Adds high bitdepth transform functions and testsDeb Mukherjee
Adds various high bitdepth transform functions and tests. Much of the changes are related to using typedefs tran_low_t and tran_high_t for the final transform cofficients and intermediate stages of the transform computation respectively rather than fixed types int16_t/int. When vp9_highbitdepth configure flag is off, these map tp int16_t/int32_t, but when the flag is on, they map to int32_t/int64_t to make space for needed extra precision. Change-Id: I3c56de79e15b904d6f655b62ffae170729befdd8
2014-07-11Some extra bit probability cleanupsDeb Mukherjee
Refactoring to remove some duplication of probability tables between tokenization and detokenization. Change-Id: I2fc6a6497f9c0410021a9b41f828bc58a864e466
2014-04-01Renaming two members in MACROBLOCKD struct.Dmitry Kovalev
Renames: mi_8x8 -> mi mode_info_stride -> mi_stride Change-Id: I66f3e5fd1e7b7f46f108af5bb711c5fd9493c1be
2014-01-31static function convert to inline or global vp9_blockd.hJim Bankoski
Change-Id: Ifdd951f24932839f06d1c700371662511dde6ebe
2014-01-03Moving get_scan() call out of decode_coeffs() function.Dmitry Kovalev
Change-Id: I5db2e5a6c36e6c503dea2e07d9d2e0daf4ac9d89
2013-12-05Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS.Dmitry Kovalev
Also adding BAND_COEFF_CONTEXTS macro to simplify for loop logic. Change-Id: I12a78a49cf1addf81e6b3fe2a3736ec2b79bd79e
2013-12-04Cleaning up vp9_detokenize.c file.Dmitry Kovalev
Using consistent names (block_idx => block, dqcoeff_ptr => dqcoeff, pt => ctx), inlining get_tx_eob() call. Change-Id: I05208e57df81bbb8f25b8274684a48192e9de464
2013-12-04Merge "Cleaning up vp9_entropy.h file."Dmitry Kovalev
2013-12-03Moving eob array to the encoder.Dmitry Kovalev
In the decoder we don't need to save eobs, we can pass eob as an argument. That's why removing eob arrays from VP9Decompressor and TileWorkerData, and moving eob pointer from macroblockd_plane to macroblock_plane. Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
2013-12-03Cleaning up vp9_entropy.h file.Dmitry Kovalev
Renaming constants for consistency: DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN DCT_EOB_TOKEN => EOB_TOKEN DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN MAX_ENTROPY_TOKENS => ENTROPY_TOKENS Moving constants: INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h. EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-12-03Merge "Removing token_to_counttoken array."Dmitry Kovalev
2013-12-02Removing token_to_counttoken array.Dmitry Kovalev
Change-Id: I02050bcca4c9fd68a00abdea5aba0c3f8993d9a9
2013-12-02Using local variable for token_cache.Dmitry Kovalev
The difference with the old code is that originally the whole token_cache was initialized with zeros at the beginning of decode_coefs() function. Now we set several zero values explicitly with "token_cache[scan[c]] = 0". Change-Id: I88cc5031f01d13012d1a4491739c36cb44f9401e
2013-12-02Cleaning up decode_coefs() function.Dmitry Kovalev
Removing goto and using while loop instead, renaming seg_eob to max_eob, moving eob token counter increment. Change-Id: Idcc4b3a45e4f313596a71776aef56691a6647e5f
2013-11-26Deleting vp9_treereader.h file.Dmitry Kovalev
Renaming treed_read() to consistent vp9_read_tree() and moving it from deleted vp9_treereader.h to vp9_dboolhuff.h file. Change-Id: Iedd8655acbe25e4fcf62b79e5a13bdea69b6b004
2013-11-22Organizing all scan tables into lookup table.Dmitry Kovalev
Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
2013-11-21detokenization speedupsJim Bankoski
removed unnecessary ifs and branches .. Change-Id: Id1698a35292659388f48926791024d1400f2cea9
2013-11-21Don't write 0's to token_cacheJim Bankoski
This code only updates the token_cache if the result is non0. Change-Id: Idcabd0b993a926fea9c29dbec134b9c5c4859b40
2013-11-19scan order table lookup same for encoder and decoderJim Bankoski
Change-Id: I473947b5ca70b7a81151926284bff86f8555492a
2013-11-19entropy code speedupJim Bankoski
Change-Id: Ic316d3374ff9a2b43897272260947d56765a0fdd
2013-11-19scan order / neighbors converted to lookupJim Bankoski
Change-Id: I64b189dfeee1cf3e90134a1a93497072f3361e5e
2013-11-13Simplifies band-getting with a static arrayDeb Mukherjee
Simplifies the code by implementing band mapping with static arrays. A lot of the code complexity introduced in a previous patch disappears. Change-Id: Ia3fac36e594fb5ad2d55ae141c58bba4c55c2d28
2013-11-13Cleaning up decode_coefs() function.Dmitry Kovalev
Removing vp9_read_and_apply_sign macro which was used only once. Change-Id: I6a1625b720d89fc1291c99deccd6638b705f9b06
2013-11-12Calculating transform block offsets (x and y) only once.Dmitry Kovalev
Change-Id: I4b5106bdc08fd4551339b968c13428a8f43122e2
2013-11-12Removes conditional statements from band gettingDeb Mukherjee
Implements scan order to band map with arrays in both the encoder and decoder to remove conditional statements. Encoding seems to be about 1% faster at speed 0, tested on football. Decoding seems to be about 0.5-1% faster on a set of 25 videos. Change-Id: Idb233ca0b9e0efd790e30880642e8717e1c5c8dd
2013-11-07Merge "Miscelleneous changes in detokenize for speed"Deb Mukherjee
2013-11-06Using pd->dqcoeff instead of pd->qcoeff in the decoder.Dmitry Kovalev
It is more logical to use dqcoeff buffer to put there *dequantized* transform coefficients (inside inverse_transform_block and decode_coefs functions). Dequantization happens inside WRITE_COEF_CONTINUE macro. qcoeff buffer should be only used in the encoder for *quantized* transform coefficients. Change-Id: Ifd54bef272bbf5311ced6669c4f1079f998af5d7
2013-11-05Simply a macroYaowu Xu
Change-Id: I1c0c1b92aab33b1e4321b8e584a934fe58e0b324
2013-11-05Miscelleneous changes in detokenize for speedDeb Mukherjee
Changes to reduce branching in detokenization in order to improve decode speed. Change-Id: I23a74d072cc14d99f6fc054c1e6a72021e777903
2013-11-05token_cache changes in decoderDeb Mukherjee
Removes stack-alocation of token_cache in decode_coefs function Seems to achieve about 1% decode speed improvement as tested on 25 480p videos. Change-Id: I8e7eb3361fa09d9654dfad0677a6d606701fdc6e
2013-10-31Reducing the number of foreach_transformed_block() calls.Dmitry Kovalev
The change doesn't affect the bitstream. It changes the order or function calls and affects how we reconstruct intra- and inter-blocks. Speed up is about 1...1.5%. For intra-blocks: Before: for each transform block read tokens for each transform block do prediction for each transform block do inverse transform Now: for each transform block read tokens do prediction do inverse transform For inter-blocks: Before: for each transform block read tokens for each transform block do inverse transform Now: for each transform block read tokens do inverse transform Change-Id: I12a79bf1aa5a18c351b8010369bd3ff1deae1570
2013-10-21vp9 dec/com: only update frame counts when necessary (2)James Zern
missed one in vp9_detokenize.c in the last + add some asserts in vp9_decode_frame() to catch regressions Change-Id: Ide67505114ee17efdafb13694aed0c09039e5a16
2013-10-21vp9_decode_tokens: limit scope of function paramsJames Zern
replace VP9D_COMP usage with the (slightly) more targeted VP9_COMMON/MACROBLCKD/struct segmentation structures. Change-Id: Iabb3616e231417b0e17b7e4b384ea63167a81745
2013-10-18vp9 dec/com: only update frame counts when necessaryJames Zern
don't update them when frame_parallel_mode is true Change-Id: I22ff131a6c6eea238415d10b729f195c7d6dc60d
2013-10-16Merge changes I6226456d,I97925178,I766c4b74Guillaume Martres
* changes: Use a separate MODE_INFO stream for each tile column Get rid of "this_mi", use "mi_8x8[0]" everywhere instead Make the static_segmentation feature work again
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-16Adding get_band_translate() function.Dmitry Kovalev
Moving code that gets band_translate array from get_scan_and_band() function to get_band_translate() function. Renaming get_scan_and_band() to get_scan(). Change-Id: I43047c205a1ca2a6e24be44db39dc04b7a385008
2013-10-14Cleanup of decode_coefs() function.Dmitry Kovalev
Moving entropy context calculation to outer scope and adding consts to pointers. Change-Id: I25d0987e97495326ab1e8046e3fa3082c0584485
2013-10-08Remove extra line in decode_coefsJingning Han
Change-Id: Id1fde9920d60c6991a8ef6de5103ae3e578312ed
2013-10-07Removing redundant vp9_pt_energy_class declarations.Dmitry Kovalev
Declaring vp9_pt_energy_class in vp9_entropy.h instead of many external places. Change-Id: I66e8a3fc119a43f88d130d0dae4133c825a047a3
2013-09-29Merge changes ↵Jim Bankoski
I29b5bbb9,Iaa6b8ac9,Ibf996de7,Ie1b544e4,I9dea60e3,If71923f4,I6498d2ee * changes: cpplint issue extra line in decodemv.c cpplint issue - vp9_idct_blk.c cpplint issue in vp9_detokenize.c fixed cpplint issue vp9_onyxd_int.h cpplint issue in vp9_read_bit_buffer resolved cpplint issue vp9_decodeframe.c fix cpplint issue in vp9_onyxd.h
2013-09-29cpplint issue in vp9_detokenize.cJim Bankoski
Change-Id: Ibf996de79e9c9bbe03b2202d4af11aebc58f9bcc