summaryrefslogtreecommitdiff
path: root/vp8/encoder/bitstream.c
AgeCommit message (Collapse)Author
2011-07-21fix more merge issuesYaowu Xu
With this fix, the experimental branch now builds and encodes correctly with the following two configure options respectively: --enable-experimental --enable-t8x8 --enable-experimental Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
2011-07-20fixed a number of problems caused by auto mergesYaowu Xu
The auto merge process pull and merge commits from public git or master branch. These automerges while worked well most time, but has created a few problems. This commit fixed several issues existed long before the latest 8x8 transform commit. Change-Id: I895ca99713231b1aec521d57db5d9839f74aacfa
2011-07-20Add 8x8 transform to experimental branchDeb Mukherjee
Please refer to previous commit messages for detailed info: https://on2-git.corp.google.com/g/#change,5940 https://on2-git.corp.google.com/g/#change,6045 Change-Id: I8b16992f2f69c5a808ad40a3e32ef589cce7c59d
2011-07-20Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-07-19Moved vp8_encode_bool into boolhuff.hScott LaVarnway
allowing the compiler to inline this function. For real-time encodes, this gave a boost of 1% to 2.5%, depending on the speed setting. Change-Id: I3929d176cca086b4261267b848419d5bcff21c02
2011-06-30Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/bitstream.c Change-Id: I44c00f98dcb99eb728ce4f5256aefb135a711a74
2011-06-28Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistentlyJohn Koleszar
There were many instances in the code of vp8_coef_tokens and vp8_coef_tokens-1, which was a preprocessor macro despite the naming convention. Replace these with MAX_ENTROPY_TOKENS and ENTROPY_NODES, respectively. Change-Id: I72c4f6c7634c94e1fa066cd511471e5592c748da
2011-06-28New ways of passing encoded data between encoder and decoder.Stefan Holmer
With this commit frames can be received partition-by-partition from the encoder and passed partition-by-partition to the decoder. At the encoder-side this makes it easier to split encoded frames at partition boundaries, useful when packetizing frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled, several VPX_CODEC_CX_FRAME_PKT packets will be returned from vpx_codec_get_cx_data(), containing one partition each. The partition_id (starting at 0) specifies the decoding order of the partitions. All partitions but the last has the VPX_FRAME_IS_FRAGMENT flag set. At the decoder this opens up the possibility of decoding partition N even though partition N-1 was lost (given that independent partitioning has been enabled in the encoder) if more info about the missing parts of the stream is available through external signaling. Each partition is passed to the decoder through the vpx_codec_decode() function, with the data pointer pointing to the start of the partition, and with data_sz equal to the size of the partition. Missing partitions can be signaled to the decoder by setting data != NULL and data_sz = 0. When all partitions have been given to the decoder "end of data" should be signaled by calling vpx_codec_decode() with data = NULL and data_sz = 0. The first partition is the first partition according to the VP8 bitstream + the uncompressed data chunk + DCT address offsets if multiple residual partitions are used. Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
2011-06-28Adding support for independent partitionsStefan Holmer
Adding support in the encoder for generating independent residual partitions by forcing equal probabilities over the prev coef entropy contexts. Change-Id: I402f5c353255f3ca20eae2620af739f6a498cd21
2011-06-17Merge remote branch 'internal/upstream' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/rdopt.c Change-Id: I183fd3ce9e94617ec888c9f891055b9f1f8ca6c5
2011-06-07Wrapped asserts in critical code with CONFIG_DEBUGScott LaVarnway
Change-Id: I5b0aaca06f2e0f40588cb24fb0642b6865da8970
2011-06-06Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c Change-Id: Ibb5a3894ede08ed401ec6e974a8902d7393c9978
2011-06-02Removed B_MODE_INFOScott LaVarnway
Declared the bmi in BLOCKD as a union instead of B_MODE_INFO. Then removed B_MODE_INFO completely. Change-Id: Ieb7469899e265892c66f7aeac87b7f2bf38e7a67
2011-05-26Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-05-26Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-05-26Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/encoder/encodeframe.c vp8/encoder/ethreading.c Change-Id: I4becf6f101756923de6b98ca6a2132c3605c6ea5
2011-05-26Merge "Use int_mv instead of MV in vp8_mv_cont"Scott LaVarnway
2011-05-25remove code not in useYaowu Xu
Change-Id: I6e5e86235d341cce3b02abda26dbeb71940ed955
2011-05-24Use int_mv instead of MV in vp8_mv_contScott LaVarnway
Less operations. Change-Id: Ibb9cd5ae66b8c7c681c9a654d551c8729c31c3ae
2011-05-24MODE_INFO size reductionScott LaVarnway
Declared the bmi in MODE_INFO as a union instead of B_MODE_INFO. This reduced the memory footprint by 518,400 bytes for 1080 resolutions. The decoder performance improved by ~4% for the clip used and the encoder showed very small improvements. (0.5%) This reduction was first mentioned to me by John K. and in a later discussion by Yaowu. This is WIP. Change-Id: I8e175fdbc46d28c35277302a04bee4540efc8d29
2011-05-13Merge remote branch 'internal/upstream' into HEADJohn Koleszar
Conflicts: vp8/common/blockd.h vp8/decoder/decodemv.c Change-Id: Ib97c226d5b33b1ac1675d9c96eac1986af4dd579
2011-05-12Using int_mv instead of MVScott LaVarnway
The compiler produces better assembly when using int_mv for assignments. The compiler shifts and ors the two 16bit values when assigning MV. Change-Id: I52ce4bc2bfbfaf3f1151204b2f21e1e0654f960f
2011-03-18Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-03-11Fix "used uninitialized" warning in vp8_pack_bitstream()Attila Nagy
Change-Id: Iadcbdba717439f47a2c24e65fd69a3a1464174b5
2011-02-18Merge remote branch 'internal/upstream' into HEADJohn Koleszar
2011-02-17Use endian-neutral bitstream packing/unpackingJohn Koleszar
Eliminate unnecessary checks on target endianness and associated macros. Change-Id: I1d4e6a9dcee9bfc8940c8196838d31ed31b0e4aa
2011-02-10Fix relative include pathsJohn Koleszar
Allow compiling without adding vp8/{common,encoder,decoder} to the include paths. Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
2011-02-10Merge remote branch 'internal/upstream' into HEADJohn Koleszar
Conflicts: vp8/decoder/onyxd_int.h Change-Id: Id9aa577f03e37b4f406ba3b593c3c4330812a49e
2011-02-09Put more code under #if CONFIG_MULTITHREAD.Gaute Strokkenes
Change-Id: Icf4b692099d7d249fe3553852b1022b027b28e4b
2010-11-17FIXED bug in when CONFIG_SEGMENTATION NOT DEFINEDJim Bankoski
2010-11-16Merge branch 'experimental' of ssh://on2-git.corp.google.com:29418/libvpx ↵Suman Sunkara
into test Conflicts: vp8/common/blockd.h vp8/decoder/decodemv.c vp8/decoder/decodframe.c vp8/decoder/demode.c vp8/decoder/onyxd_if.c vp8/decoder/onyxd_int.h vp8/encoder/encodeframe.c Change-Id: Ic379f4dffaded9796dc19d56be304d3f8527c61f
2010-11-11Use of temporal context for encoding delta updates.Suman Sunkara
- Used three probability approach for temporal context as follows: P0 - probability of no change if both above and left not changed P1 - probability of no change if one of above and left has changed P2 - probability of no change if both above and left have changed In addition, a 1 bit/frame has been used to decide whether to use temporal context or to encode directly. The cost of using both the schemes is calculated ahead and the temporal_update flag is set if the cost of using temporal context is lower than encoding the segment ids directly. This approach has given around 20% reduction in cost of bits needed to encode segmentation ids. Change-Id: I44a5509599eded215ae5be9554314280d3d35405
2010-09-29Fix loopfilter delta zero transitionsJohn Koleszar
Loopfilter deltas are initialized to zero on keyframes in the decoder. The values then persist from the previous frame unless an update bit is set in the bitstream. This data is not included in the entropy data saved by the 'refresh entropy' bit in the bitstream, so it is effectively an additional contextual element beyond the 3 ref-frames and the entropy data. The encoder was treating this delta update bit as update-if-nonzero, meaning that the value would be refreshed even if it hadn't changed, and more significantly, if the correct value for the delta changed to zero, the update wouldn't be sent, and the decoder would preserve the last (presumably non-zero) value. This patch updates the encoder to send an update only if the value has changed from the previously transmitted value. It also forces the value to be transmitted in error resilient mode, to account for lost context in the event of lost frames. Change-Id: I56671d5b42965d0166ac226765dbfce3e5301868
2010-09-14Changed code to remove extra read/write loops when not necessarySuman Sunkara
Modified code so that: -When above and left contexts are same and not equal to current segment id, it needs to read a maximum of 2 segment_tree_probabilities. - When above and left contexts are different and not equal to current segment id, it needs to read only a single segment_tree_probability. Change-Id: Idc2cf2c4afcc6179b8162ac5a32c948ff5a9a2ba
2010-09-13Delta updates to segmentation map using left and above contexts.Suman Sunkara
-Updates by making use of spatial correlation. -Checks if the segment_id is same as above or left context and encodes only the update to the map instead of updating individual segment_ids. Change-Id: Ib861df97e8aa2b37516219eeddcdbaf552b6a249
2010-09-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-03Reduced the size of MB_MODE_INFOScott LaVarnway
Moved partition_bmi and partition_count out of MB_MODE_INFO and placed into MACROBLOCK. Also reduced the size of other members of the MB_MODE_INFO struct. For 1080p, the memory was reduced by 1,209,516 bytes. The decoder performance appeared to improve by 3% for the clip used. Note: The main goal for this change is to improve the decoder performance. The encoder will be revisited at a later date for further structure cleanup. Change-Id: I4733621292ee9cc3fffa4046cb3fd4d99bd14613
2010-08-11avoid negative array subscript warningsJohn Koleszar
The mv_ref and sub_mv_ref token encodings are indexed from NEARESTMV and LEFT4X4, respectively, rather than being zero-based like the other token encodings. Change-Id: I3699c3f84111209ecfb91097c4b900773e9a3ad5
2010-06-18cosmetics: trim trailing whitespaceJohn Koleszar
When the license headers were updated, they accidentally contained trailing whitespace, so unfortunately we have to touch all the files again. Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-19remove unneeded variablesPavol Rusnak
2010-05-18Initial WebM releaseJohn Koleszar