Commit Graph

407 Commits

Author SHA1 Message Date
Paul Wilkins
8487a68baf Further work on extended Q range.
Fixed some further QIndex related issues and replaced some tables
(eg zbin and rounding)

Also Added function (currently disabled by default) to populate the
main AC and DC quantizer tables. Using the original AC range the
resulting computed DC values give behavior broadly comparable
on the DERF set. That is not to say that the equations will hold good
over a more extended range. The purpose of this code is to make it
easier to experiment with further alterations to the Q range and distribution
of Q values plus the relative weights given to AC and DC.

The function find_fp_qindex() ensures that changes to the Q tables
are reflected in the value passed in to the first pass code.

Slight experimental adjustment to static segment Q offset.

Change-Id: I36186267d55dfc2a3d565d0cff7218ef300d1cd5
2011-12-02 15:30:01 +00:00
Yaowu Xu
bba710fcbd added transform type to MB_MODE_INFO
this commit is to add an variable in the macroblock level mode
info structure to track the transform size used in each MB, so
the information can be used later in the loop filter to change
how loop filter works on MBs with different transform sizes.

Change-Id: Id0eeaba6cc854c6d1be00ed8d237b3d9e250e447
2011-12-01 07:34:27 -08:00
Yaowu Xu
643238a3e0 changed find_near_mvs search to include a mb from last frame
This is an experiment to include a mv contribution from last frame to
nearest and near mv definition. Initial test showed some small though
consistent gain.

latest patch slightly better result ~.13%-~.18%.

TODO: the entropy used to encode the mode choice, i.e. the mv counts
based conditional distribution of modes should be re-collected to
reflect this change, it is expected that there is some further gain
from that.

Change-Id: Ief1e284a36d8aa56b49ae5b360c91419ec494fa4
2011-11-28 08:52:08 -08:00
Paul Wilkins
54f090b119 Cosmetic clean up.
Clean up of vp8_kfread_modes().
Remove unnecessary indentation and enforce line length.

Change-Id: I0864d1aff55368126db01bb23efa815786b5245d
2011-11-21 15:51:21 +00:00
Paul Wilkins
19d87e8ed7 Decoder segmentation bug.
Fix decoder segmentation bug for temporal coding where the segment map
was first initialized on a key frame.

in vp8_kfread_modes() after reading the segment id it must be written to
the  pbi->segmentation_map[] for use in temporal coding on subsequent frames.

Change-Id: I1489305efc376564e734a216f69c2844646ee3d3
2011-11-21 15:49:47 +00:00
Paul Wilkins
3cdfdb55e4 Merge CONFIGURE_SEGMENTATION experiment.
Removal of CONFIGURE_SEGMENTATION ifdefs.

Removal of legacy support code fo the old coding mechanism.

Use local reference "xd" for MACROBLOCKD structure in
encode_frame_to_data_rate()

Moved call to choose_segmap_coding_method() out of encode
loop as the cost of segmentation is not properly accounted
in the loop anyway. If this is desirable in the future it
can be moved back. The use of this function to do all the
analysis and set the probabilities also removes the need
to track segment useage in threading code.

Change-Id: I85bc8fd63440e7176c73d26cb742698f9b70cade
2011-11-15 16:15:23 +00:00
Paul Wilkins
6394ef28d7 Further clean up of Segmentation experiment code
Changed name and sense of segment_flag to "seg_id_predicted"
Added some additional comments and retested.

I also did some experimentation with a spatial prediction option
using a similar strategy to the temporal mode implemented.
This helps in some cases where temporal prediction is bad but
I suspect there is more overlap here with work on a larger scale
block structure and spatial correlation will likely be better
handled through that mechanism.

Next check in will remove #ifdefs and legacy mode code.

Change-Id: I3b382b65ed2a57bd7775ac0f3a01a9508a209cbc
2011-11-15 15:22:26 +00:00
Paul Wilkins
661b2c2dcf Further work on Segmentation Experiment:
This check in includes quite a lot of clean up and refactoring.

Most of the analysis and set up for the different coding options for the
segment map (currently simple distribution based coding or temporaly
predicted coding), has been moved to one location (the function
choose_segmap_coding_method() in segmenation.c). This code was previously
scattered around in various locations making integration with other
experiments and modification / debug more difficult.

Currently the functionality is as it was with the exception that the
prediction probabilities are now only transmitted when the temporal
prediction mode is selected.

There is still quite a bit more clean up work that will be possible
when the #ifdef is removed. Also at that time I may rename and alter
the sense of macroblock based variable "segment_flag" which indicates
(1 that the segmnet id is not predicted vs 0 that it is predicted).

I also intend to experiment with a spatial prediction mode that can be
used when coding a key frame segment map or in cases where temporal
prediction does not work well but there is spatial correlation.

In a later check in when the ifdefs have gone I may also move the call
to choose_segmap_coding_method() to just before where the bitsream is
packed (currently it is in vp8_encode_frame()) to further reduce the
possibility of clashes with other experiments and prevent it being called
on each itteration of the recode loop.

Change-Id: I3d4aba2a2826ec21f367678d5b07c1d1c36db168
2011-11-15 11:13:33 +00:00
Paul Wilkins
bf25d4ad7f SEGMENTATION experiment:
Some initial cleanup to aid testing and debug.

Pull code to choose temporal or spatial encoding
out of encodeframe.c into a dedicated function
in segmentation.c.

For now disable broken temporal mode.

Move the coding of "temporal_update" flag and
only transmit if segment map update is indicated.

Rename the functions read_mb_features() and
write_mb_features() to read_mb_segid() and
read_mb_segid() as they only read and write
the macroblock segment id not any of the
features.

Change-Id: Ib75118520b1144c24d35fdfc6ce46106803cabcf
2011-11-11 18:31:21 +00:00
Yaowu Xu
e01b39254b changed function name for clarity
The dequantizer functions for 2nd order haar block had confusing 8x8
in their names. this commit fixed their name to avoid confusion.

Change-Id: I6ae4e7888330865f831436313637d4395b1fc273
2011-11-11 09:01:16 -08:00
Yaowu Xu
0c846f6602 Merge "fixed the decoder when using 8x8 transform" into experimental 2011-11-11 15:38:42 +00:00
Yaowu Xu
982b061dc2 Make 8x8 and extend_qrange to work together
This commit added scaling factors to 8x8 transform, quant, dequant and
inverse transform pipeline to make 8x8 transform to work when configed
with enable-extend_qrange. This commit also disabled the trellis-quant
when extend_qrange is configured.

Change-Id: Icfb3192e4746f70a4bb35ad18b7b47705b657e52
2011-11-11 07:31:00 -08:00
Yaowu Xu
7189198d53 fixed the decoder when using 8x8 transform
updated the decode_macroblock logic to reflect that 8x8 transform is
not used for "SPLITMV". Also fixed an issue where 2nd order haar block
has wrong dequant/idct process.

Change-Id: I1e373f6535c009dfec503b6362c8a5cfc196e1da
2011-11-10 17:15:06 -08:00
Paul Wilkins
a9df4183a6 Segment signaling of TX size
Initial attempt at using new segment feature signaling
to indicate 4x4 or 8x8 transform.

needs --enable-experimental --enable-t8x8

Note this is work in progress.

Change-Id: Ib160d46a5d810307bfcbc79853ce1a65b5b870b7
2011-11-08 12:21:08 +00:00
Paul Wilkins
a258bba1fb Segment Feature Data Access
No change to functionality or output.

Updates to the segment feature data structure now all done
through functions such as set_segdata() and get_segdata()
in seg_common.c.

The reason for this is to make changing the structures (if needed)
and debug easier.

In addition it provides a single location for subsequent addition
of range and validity checks. For  example valid combination of
mode and reference frame.

Change-Id: I2e866505562db4e4cb6f17a472b25b4465f01add
2011-11-04 10:42:12 +00:00
Yaowu Xu
2bbde25003 make uv intra mode coding adaptive to Y mode
This commit tries to do UV intra mode coding adaptive to Y intra mode.
Entropy context is defined as conditional PDF of uv intra mode given
the Y mode. All constants are normalized with 256 to be fit in 8 bits.

This provides further coding efficiency beyond the quantizer adaptive
y intra mode coding. Consistent gains were observed on all clips and
all bit rates for HD all key encoding tests.

To test, configure with
--enable-experimental --enable-uvintra

Change-Id: I2d78d73f143127f063e19bd0bac3b68c418d756a
2011-11-03 21:48:08 -07:00
Paul Wilkins
a10a268e58 Segment Features. Removal of #ifdefs
Removal of configure #ifdefs so that segment features
always available. Removal of code supporting old
segment feature method.

Still a good deal of tidying up to do.

Change-Id: I397855f086f8c09ab1fae0a5f65d9e06d2e3e39f
2011-11-03 17:14:26 +00:00
Paul Wilkins
87ff8620b2 Segmentation: Reference frames
Modify reference frame segmentation so that ONE or MORE
reference frames may be marked as a available for a given
segment.

Fixed bugs relating to segment coding of INTRA and some
INTER modes at the segment level.

Modified Q boost for static areas based on ambient average Q.

Strong results now on clips with significant static areas.
(some data points in derf set as high as 9% and some static &
slide show type content in YT set > 20%)

Change-Id: Ia79f912efa84b977f35a23683ae3643251e24f0c
2011-11-02 13:31:54 +00:00
Paul Wilkins
23701f4f87 Segmentation Features;
Only encode sign bit for feature data that can have a sign.

Tweaks to the test segmentation rules so that it now actually gives
a net benefit on the derf set of about 0.4% though much higher
on some clips at the low end.

Change-Id: I8e61f1aebf41c9037db7e67e2f8975aa18a0c986
2011-10-24 17:06:29 +01:00
Paul Wilkins
01ce04bc06 Further segment feature extensions.
This quite large check in includes the following:

Merge in some code from Ronald (mbgraph.c) that scans a Gf/arf group.
This is used as a basis for a simple segmentation for the normal frames
in a gf/arf group. This code also uses satd functions from Yaowu.

Adds functionality for coding the latest possible position of an EOB for
blocks in the segment. (Currently 0-15 only, hence just for 4x4 dct).
Where the EOB position is 0 this acts like "skip" and the normal coding
of skip at the per mb level is disabled.

Added functions (seg_common.c) for setting and reading segment feature
elements. These may want to be optimized away at some point but while the
mecahnism is in a state of flux they provide a single location for making
changes and keep things a bit cleaner.

This is still proof of concept code. Currently the tested feature set:-

Quantizer,
Loop Filter level,
Reference frame,
Prediction Mode,
EOB end stop.

TBD:-

Add functions for setting and reading the feature data with range
and validity checking.

Handling of signed and unsigned feature data. At the moment all is assumed
to be signed and a sign bit is coded but many cannot be negative.

Correct handling of EOB feature with intra coded blocks.

Testing/trapping of legal/illegal ref frame and mode combinations.

Transform size switch plus merge and test with 8c8 DCT work

Merge and test with Sumans Segmenation coding optimizations

Change-Id: Iee12e83661c7abbd1e0ce6810915eb4ec35e2d8e
2011-10-24 15:52:18 +01:00
Yaowu Xu
3ca849691c fixed a decoder bug
When 8x8 transform is enabled, the decoder does an extra reconstruct
on MBs that are coded using 8x8. This commit fixed the logic around
the decoding of mb encoded with 8x8 transform.

Change-Id: I6926557c9ef00eecb375f62946f7e140c660bf6f
2011-10-08 15:48:53 -07:00
Paul Wilkins
156b221a7f Segment coding of mode and reference frame.
Proof of concept test code that encodes mode and reference
frame data at the segment level.

Decode-able bit stream but some issues not yet resolved.
As it this helps a little on a couple of clips but hurts on most as
the basis for segmentation is unsound.

To build and test, configure with
--enable-experimental --enable-segfeatures

Change-Id: I22a60774f69273523fb152db8c31f4b10b07c7f4
2011-09-30 16:45:16 +01:00
Paul Wilkins
45e49e6e19 Experimental: segfeature added.
New setting added to configure script
2011-09-30 16:08:37 +01:00
John Koleszar
feea724296 Merge remote branch 'internal/upstream' into HEAD 2011-09-20 00:05:04 -04:00
Stefan Holmer
e529a825f7 Fix necessary for input partitions iface to match the RTP profile
These changes fixes a glitch between the RTP profile and the input
partitions interface. Since there's no way for the user to know the
actual number of partitions, the decoder have to read the
multi_token_paritition bits also when input partitions mode is
enabled.

Included are also a couple of fixes for issues with independent
partitions and uninitialized memory reads.

Change-Id: I6f93b15287d291169ed681898ed3fbcc5dc81837
2011-09-19 15:00:21 +02:00
John Koleszar
f3fce80954 Merge remote branch 'internal/upstream' into HEAD 2011-09-17 00:05:04 -04:00
Yaowu Xu
1d44e7ce1f enable selecting&transmitting to for intra mode entropy
This commit added a 3 bit index to the bitstream, the index is used to
look into the intra mode coding entropy context table. The commit uses
the mode stats to calculate the cost of transmitting modes using 8
possible entropy distributions, and selects the distribution that
provides the lowest cost to do the actual mode coding.

Initial test show this provides additional .2%~.3% gain over quantizer
adaptive intra mode coding. So the adaptive intra mode coding provides
a total of .5%(psnr) to .6% gain(ssim) combined for all-key-encoding

To build and test, configure with
--enable-experimental --enable-qimode

Change-Id: I7c41cd8bfb352bc1fe7c5da1848a58faea5ed74a
2011-09-16 16:33:19 -07:00
Yaowu Xu
aac2c12663 add quantizer adaptive intra mb mode encoding
make intra mode coding entropy distribution adaptive to baseQindex, an
encoding test on hd clips with all key frame shows universal gain on
all clips in both .2%(psnr) and (ssim).3%.

To build and test, configure with
--enable-experimental --enable-qimode

Change-Id: Iaa69241b984d4fdd8baa6d77ee78c0140f5ac00a
2011-09-16 16:26:35 -07:00
Yaowu Xu
ca6b85aa4e add 8x8 intra prediction modes
Patch 1 to Patch 3 is an initial implementation of 8x8 intra prediction
modes, here are with the following assumptions:
a. 8x8 has 4 prediction modes DC, H, V and TM
b. UV 4x4 block use the same mode as corresponding 8x8 area
c. i8x8 modes are enabled for key frame only for now
Patch 4:
d. removed debug code from previous patches
Patch 5:
e. added stats code to collect entropy stats and further cleaned up
Patch 6:
f. changed mode stats code to collect finer stats of modes
Patch 7:
g. normalized i8x8 modes distribution to total at 256 (8bits).
Patch 8:
h. fixed a bug in decoder and removed debug printf output.
Patch 9:
i. more cleanups to address paul's comment
Patch 10:
j. messy rebase/merges to bring the commit up to date.

Tests on HD clips encoded with all key frame showing consistent gain
on all clips and all metrics:~0.5%(psnr) and 0.6%(ssim):
http://www.corp.google.com/~yaowu/no_crawl/i8x8hd_allkey_fixedq.html

To build and test, configure with:
--enable-experimental --enable-i8x8

Change-Id: I9813fe07ae48cab5fdb5d904bca022514ad01e7f
2011-09-16 15:55:19 -07:00
John Koleszar
35ce4eb01d Merge "Fixes the boundary checks for extrapolated and interpolated MVs." 2011-09-16 08:09:44 -07:00
John Koleszar
62371d382a Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/decoder/decodframe.c
	vp8/encoder/encodeframe.c
	vp8/encoder/encodemb.c

Change-Id: I6e0d1669e4409a2dfd73ba2c7038d730842d3953
2011-09-16 09:22:29 -04:00
Stefan Holmer
b854bbd844 Fixes the boundary checks for extrapolated and interpolated MVs.
Change-Id: I5b47d39d1604f2650d2f2d1ca2a3f40843c8e1ea
2011-09-16 11:58:57 +02:00
Paul Wilkins
ceb5174205 Segment Feature Signaling
Plumbing for tuning new segment features on and off.

Change-Id: If86cd6f103296b73030e8af7cf85c5b9bbffdbaf
2011-09-15 10:19:09 +01:00
Paul Wilkins
1741cc7ab9 Reverse coding order for segment features:
Code all the features for one segment (grouped together)
then all for the next etc. etc. rather than grouping the
data by feature.

Change-Id: I2a65193b3a70aca78f92e855e35d8969d857b6dd
2011-09-13 16:57:17 +01:00
Paul Wilkins
1c24442a07 Change to segment_feature_data[][] structure.
This data structure is  now [Segment ID][Features]
rather than [Features][Segment_ID]

I propose as a separate modification to make the experimental
bit stream reflect this such that all the features for a segment
are coded together.

Change-Id: I581e4e3ca2033bdbdef3d9300977a8202f55b4fb
2011-09-13 12:58:04 +01:00
Paul Wilkins
dfbc61f3ab Segment Features:
Some basic plumbing added for a range of segment level features.
MB_LVL_* changed to SEG_LVL_* to better reflect meaning.

Change-Id: Iac96da36990aa0e40afc0d86e990df337fd0c50b
2011-09-13 11:26:39 +01:00
Yaowu Xu
1fa77e28a1 fixed a decoder bug
the bug appears to be introduced from a merge at Commit:62400028..

Change-Id: I332d78b673f12e5ef2b0cdd6bab57dc2c8af7a72
2011-09-03 13:12:13 -07:00
Scott LaVarnway
222c72e50f Merge "Removed bmi copy to/from BLOCKD" 2011-08-31 06:57:20 -07:00
John Koleszar
180b0306cc Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/common/defaultcoefcounts.h
	vp8/common/entropy.c
	vp8/encoder/bitstream.c

Change-Id: Idd4990c80d5b5494ac036254694015fab449bc08
2011-08-25 08:36:19 -04:00
Scott LaVarnway
b870947d42 Removed bmi copy to/from BLOCKD
for SPLITMV and B_PRED modes.  Modified code to use the bmi
found in mode_info_context instead of BLOCKD.  On the decode
side, the uvmvs are calculated only when required, instead of
every macroblock.  This is WIP. (bmi should eventually be
removed from BLOCKD)
Small performance gains noticed for RT encodes and decodes.(VGA)

Change-Id: I2ed7f0fd5ca733655df684aa82da575c77a973e7
2011-08-24 14:42:26 -04:00
Fritz Koenig
112bd4e2b4 Fix naming of sse2 idct functions.
Prepend idct function names with vp8_
so that under profiling they show up
associated with libvpx.

Change-Id: I4fe357b50236cb7730a4cc00164c0a3487a1d8b4
2011-08-24 10:25:32 -07:00
John Koleszar
f54d561fa8 Merge remote branch 'internal/upstream' into HEAD 2011-08-16 00:05:05 -04:00
Stefan Holmer
99d870a472 Don't set the bmi mode when doing error concealment
Since the block will be interpreted as an inter block, the mode will
be interpreted as a motion vector, resulting in bad concealment.

Change-Id: Ifcc685ae1cc883492bce6dbd61e418d91a89b053
2011-08-15 11:46:04 -04:00
John Koleszar
8f60186502 Merge remote branch 'internal/upstream' into HEAD 2011-08-13 00:05:06 -04:00
John Koleszar
a4c2211ea3 Propagate macroblock MV to subblocks for error concealment
EC expects the subblock MVs to be populated, but
f1d6cc79e4 removed this code. This
commit restores it, protected by CONFIG_ERROR_CONCEALMENT. May move this
to the EC code more directly in the future.

Change-Id: I44f8f985720cb9a1bf222e59143f9e69abf56ad2
2011-08-12 14:49:35 -04:00
Stefan Holmer
a609be5633 Disable error concealment until first key frame is decoded
When error concealment is enabled the first key frame must
be successfully received before error concealment is activated.
Error concealment will be activated when the delta following
delta frame is received.

Also fixed a couple of bugs related to error tracking in
multi-threading. And avoiding decoding corrupt residual
when we have multiple non-resilient partitions.

Change-Id: I45c4bb296e2f05f57624aef500a874faf431a60d
2011-08-12 14:49:34 -04:00
John Koleszar
cdae03a4eb Fix potential OOB read with Error Concealment
This patch fixes an OOB read when error concealment is enabled and the
partition sizes are corrupt. The partition size read from the bitstream
was not being validated in EC mode.

Change-Id: Ia81dfd4bce1ab29ee78e42320abe52cee8318974
2011-08-12 14:49:34 -04:00
John Koleszar
4645c89889 Merge "Disable error concealment until first key frame is decoded" 2011-08-12 11:45:26 -07:00
John Koleszar
91206793c2 Propagate macroblock MV to subblocks for error concealment
EC expects the subblock MVs to be populated, but
f1d6cc79e4 removed this code. This
commit restores it, protected by CONFIG_ERROR_CONCEALMENT. May move this
to the EC code more directly in the future.

Change-Id: I44f8f985720cb9a1bf222e59143f9e69abf56ad2
2011-08-12 11:34:40 -04:00
Stefan Holmer
3e10be93f2 Disable error concealment until first key frame is decoded
When error concealment is enabled the first key frame must
be successfully received before error concealment is activated.
Error concealment will be activated when the delta following
delta frame is received.

Also fixed a couple of bugs related to error tracking in
multi-threading. And avoiding decoding corrupt residual
when we have multiple non-resilient partitions.

Change-Id: I45c4bb296e2f05f57624aef500a874faf431a60d
2011-08-12 16:10:04 +02:00
John Koleszar
810a06b12c Fix potential OOB read with Error Concealment
This patch fixes an OOB read when error concealment is enabled and the
partition sizes are corrupt. The partition size read from the bitstream
was not being validated in EC mode.

Change-Id: Ia81dfd4bce1ab29ee78e42320abe52cee8318974
2011-08-11 18:07:03 -04:00
John Koleszar
a16cd74ba1 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/decoder/detokenize.c
	vp8/decoder/onyxd_if.c
	vp8/vp8_common.mk

Change-Id: Ifca1108186a8bc715da86a44021ee2fa5550b5b8
2011-08-11 13:01:45 -04:00
John Koleszar
712762b508 Merge remote branch 'origin/master' into experimental
Change-Id: Ic698ea5f5b31a5faf467eb0da4b762f9586df938
2011-08-05 00:05:05 -04:00
John Koleszar
06c3d5bb9a Fix building with --disable-postproc
Change-Id: I7e6bc28e7974a376da747300744e0dd5dc1d21e9
2011-08-01 17:50:23 -04:00
John Koleszar
9fbb1d4350 Merge remote branch 'origin/master' into experimental
Change-Id: I1ae82458536ba2f0969e1bea78f41cd16fe96b79
2011-07-27 00:05:06 -04:00
John Koleszar
db8f0d2ca9 Merge "cosmetics: consistently use [u]int64_t" 2011-07-26 12:57:43 -07:00
James Zern
b45065d38b cosmetics: consistently use [u]int64_t
Removes mixed usage of (unsigned) long long and INT64.
Fixes Issue #208.

Change-Id: I220d3ed5ce4bb1280cd38bb3715f208ce23cf83a
2011-07-26 11:34:36 -07:00
John Koleszar
eccfca5165 Make cat6 probs properly dependent on CONFIG_EXTEND_QRANGE
Change-Id: I2ac5d8818acb50f9db38de8cb562f337e51006b2
2011-07-26 10:30:33 -04:00
John Koleszar
62400028e2 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/decoder/detokenize.c
	vp8/decoder/onyxd_int.h

Change-Id: Ib9b516b939358ac8bf694200a8425fdd62c8d149
2011-07-26 10:22:42 -04:00
John Koleszar
3c4a39e71c Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/decoder/detokenize.c
	vp8/decoder/onyxd_int.h

Change-Id: Idc301ae630dc1aedeb85674ecfdcf1eb28420f81
2011-07-26 10:04:36 -04:00
Scott LaVarnway
a11624497c "Eliminated TOKENEXTRABITS" broke the windows build.
Fixed.

Change-Id: I3348e8dbcaee6ace263af413701101d77636e5df
2011-07-26 09:33:16 -04:00
Scott LaVarnway
76eb402668 Eliminated TOKENEXTRABITS
Noticed small performance gains, depending on material.

Change-Id: I334369f6312bc19aa73481fc3f790ab181e11867
2011-07-25 17:11:24 -04:00
John Koleszar
664cd5ac91 Merge remote branch 'internal/upstream' into HEAD 2011-07-23 00:05:14 -04:00
John Koleszar
e14ad46efa Merge remote branch 'origin/master' into experimental
Change-Id: I0a24d6762598e5fee30f264de1dcd10331c01eac
2011-07-23 00:05:13 -04:00
Johann
a04ed0e8f3 fix sharpness bug and clean up
sharpness was not recalculated in vp8cx_pick_filter_level_fast

remove last_filter_type. all values are calculated, don't need to update
the lfi data when it changes.

always use cm->sharpness_level. the extra indirection was annoying.

don't track last frame_type or sharpness_level manually. frame type
only matters for motion search and sharpness_level is taken care of in
frame_init

move function declarations to their proper header

Change-Id: I7ef037bd4bf8cf5e37d2d36bd03b5e22a2ad91db
2011-07-22 12:33:57 -04:00
Yaowu Xu
8c31484ea1 fix more merge issues
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-21 09:01:53 -07:00
Yaowu Xu
1c24eb2b7b fixed a number of problems caused by auto merges
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-20 12:45:35 -07:00
Deb Mukherjee
08f6471890 Add 8x8 transform to experimental branch
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-20 09:49:22 -07:00
John Koleszar
6907117175 Merge remote branch 'origin/master' into experimental
Change-Id: I956822324c046c254806dd712a2d3be4dcf8564b
2011-07-20 00:05:17 -04:00
John Koleszar
8e464cc4c2 Merge remote branch 'internal/upstream' into HEAD 2011-07-20 00:05:09 -04:00
Scott LaVarnway
b2d9700f53 Merge "Moved vp8_encode_bool into boolhuff.h" 2011-07-19 08:15:14 -07:00
Johann
6afafc313c remove old armv5 code
armv5 dequantizer is not referenced

Change-Id: Id1cc617dcee35ebd6a406816ec6aaa26e8bbc8ad
2011-07-19 09:20:38 -04:00
Scott LaVarnway
a25f6a9c88 Moved vp8_encode_bool into boolhuff.h
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-07-19 09:17:25 -04:00
John Koleszar
86edcb0cc7 Merge remote branch 'origin/master' into experimental
Change-Id: I3f64e220b78738e5261a9fda3c270d51613f4faa
2011-07-14 00:05:12 -04:00
John Koleszar
6901105e99 Merge remote branch 'internal/upstream' into HEAD 2011-07-14 00:05:04 -04:00
Yunqing Wang
f1f28535c3 Merge "Fix unnecessary casting of B_PREDICTION_MODE (issue 349)" 2011-07-13 13:32:57 -07:00
Yunqing Wang
139577f937 Fix unnecessary casting of B_PREDICTION_MODE (issue 349)
Minor fix.

Change-Id: Iaf93f6e47e882a33c479e57c7a0d0bf321e291c0
2011-07-13 15:52:07 -04:00
Johann
d9b825cff2 Merge "New loop filter interface" 2011-07-13 04:09:26 -07:00
John Koleszar
6058c9ce0c Merge remote branch 'origin/master' into experimental
Change-Id: Ica63d16cb39e2d65a3414f0b9f86c8a64112dfa3
2011-07-09 00:05:09 -04:00
John Koleszar
c24479e870 Merge remote branch 'internal/upstream' into HEAD 2011-07-09 00:05:04 -04:00
Attila Nagy
622958449b New loop filter interface
Separate simple filter with reduced no. of parameters.
MB filter level picking based on precalculated table. Level table updated for
each frame. Inside and edge limits precalculated and updated just when
sharpness changes. HEV threshhold is constant.
ARM targets use scalars and others vectors.

Change works only with --target=generic-gnu
All other targets have to be updated!

Change-Id: I6b73aca6b525075b20129a371699b2561bd4d51c
2011-07-08 09:31:41 +03:00
John Koleszar
9dfd006017 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/encoder/bitstream.c

Change-Id: I44c00f98dcb99eb728ce4f5256aefb135a711a74
2011-06-30 08:46:49 -04:00
John Koleszar
6251e9e5ce Merge remote branch 'origin/master' into experimental
Change-Id: I35c9ca116aecd0d03e762942d9cf1289edb4f23d
2011-06-30 00:05:10 -04:00
Johann
6611f66978 clean up warnings when building arm with rtcd
Change-Id: I3683cb87e9cb7c36fc22c1d70f0799c7c46a21df
2011-06-29 10:51:41 -04:00
John Koleszar
f3a13cb236 Merge "Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistently" 2011-06-29 07:29:59 -07:00
John Koleszar
fe5765a5f3 Merge remote branch 'origin/master' into experimental
Change-Id: I68e604e4a731f6703fdec7eff2c2c9b9e36879ea
2011-06-29 00:05:10 -04:00
Johann
dc004e8c17 Merge "Avoid text relocations in ARM vp8 decoder" 2011-06-28 16:34:10 -07:00
John Koleszar
b32da7c3da Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistently
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-28 17:03:55 -04:00
John Koleszar
9bcf07ae4a Merge "Simplify decode_macroblock." 2011-06-28 12:54:25 -07:00
Gaute Strokkenes
81c0546407 Simplify decode_macroblock.
Change-Id: Ieb2f3827ae7896ae594203b702b3e8fa8fb63d37
2011-06-28 17:01:14 +01:00
Stefan Holmer
7296b3f922 New ways of passing encoded data between encoder and decoder.
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-28 11:10:17 -04:00
Mike Hommey
e3f850ee05 Avoid text relocations in ARM vp8 decoder
The current code stores pointers to coefficient tables and loads them to
access the tables contents. As these pointers are stored in the code
sections, it means we end up with text relocations. eu-findtextrel will
thus complain about code not compiled with -fpic/-fPIC.

Since the pointers are stored in the code sections, we can actually cheat
and let the assembler generate relative addressing when accessing the
coefficient tables, and just load their location with adr.

Change-Id: Ib74ae2d3f2bab80b29991355f2dbe6955f38f6ae
2011-06-28 09:11:40 +02:00
John Koleszar
d7c6c9472f Merge remote branch 'internal/upstream-experimental' into HEAD 2011-06-28 00:05:04 -04:00
John Koleszar
1ec4e27095 Merge remote branch 'origin/master' into experimental
Change-Id: I689f4624a53184a72258df575305eb1aa97e61ca
2011-06-27 09:39:56 -04:00
Stefan Holmer
ba0822ba96 Adding support for error concealment in multi-threaded decoding
Also includes a couple of error concealment bug fixes:
- the segment_id wasn't properly initialized when missing
- when interpolating and no neighbors are found, set to zero
- clear the qcoef buffer when concealing an MB

Change-Id: Id79c876b41d78b559a2241e9cd0fd2cae6198f49
2011-06-27 09:03:06 -04:00
John Koleszar
8a7ca2b635 Merge remote branch 'internal/upstream' into HEAD 2011-06-23 00:05:04 -04:00
John Koleszar
4ec081a7de Merge remote branch 'internal/upstream-experimental' into HEAD 2011-06-23 00:05:04 -04:00
James Berry
2bd90c13a0 get/set reference buffer dimension check added
vp8_yv12_copy_frame_ptr() expects same size
buffers which was not previously gaurenteed.
Using an improperly allocated buffer would
cause a crash before.

Change-Id: I904982313ce9352474f80de842013dcd89f48685
2011-06-22 13:36:24 -04:00
Johann
786246ebf1 Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/encoder/rdopt.c
Use new constant (110) from 10ed60dc7

Change-Id: Ic7d8a45ccc8deeeb94a0ab1c58d5d052ef3c27e4
2011-06-22 07:45:17 -04:00
Scott LaVarnway
67a1f98c2c Improved vp8dx_decode_bool
Relocated the vp8dx_bool_decoder_fill() call, allowing
the compiler to produce better assembly code.  Tests
showed a 1 - 2 % performance boost (x86 using gcc)
for the 720p clip used.

Change-Id: Ic5a4eefed8777e6eefa007d4f12dfc7e64482732
2011-06-20 14:44:16 -04:00
John Koleszar
deb2e9cf62 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/encoder/encodeframe.c
	vp8/encoder/rdopt.c

Change-Id: I183fd3ce9e94617ec888c9f891055b9f1f8ca6c5
2011-06-17 15:36:43 -04:00
Johann
e18d7bc230 Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/encoder/encodeframe.c
	vp8/encoder/rdopt.c

Change-Id: I8bab720889ac652361abdedfe2cc91a89742cb30
2011-06-17 14:56:27 -04:00
John Koleszar
5223016337 Merge "Remove redundant check for KEY_FRAME in multithreaded decoder" 2011-06-15 10:18:06 -07:00
John Koleszar
1ade44b352 Merge "fix --disable-runtime-cpu-detect on x86" 2011-06-15 07:09:09 -07:00
Attila Nagy
c7e6aabbca Remove redundant check for KEY_FRAME in multithreaded decoder
For Intra blocks is enough to check ref_frame == INTRA_FRAME.

Change-Id: I3e2d3064c7642658a9e14011a4627de58878e366
2011-06-15 09:01:27 +03:00
Scott LaVarnway
7be5b6dae4 Merge "Populate bmi for B_PRED only" 2011-06-14 12:04:50 -07:00
Johann
92b0e544f3 fix --disable-runtime-cpu-detect on x86
Change-Id: Ib8e429152c9a8b6032be22b5faac802aa8224caa
2011-06-14 11:31:50 -04:00
James Zern
532c30c83e fix corrupt frame leak
If setup_token_decoder reported an internal error the memory allocated
there would not be freed in the resulting call to _remove_decompressor.

Change-Id: Ib459de222d76b1910d6f449cdcd01663447dbdf6
2011-06-13 17:32:19 -07:00
Scott LaVarnway
223d1b54cf Populate bmi for B_PRED only
Small decode performance gain (~1%) on keyframes.  No
noticeable gains on encode.  Also changed pick_intra4x4mby_modes()
to read the above and left block modes for keyframes only.

Change-Id: I1f4885252f5b3e9caf04d4e01e643960f910aba5
2011-06-13 17:14:11 -04:00
Johann
79327be6c7 use GCC inline magic
Better fix for #326. ICC happens to support the inline magic

Change-Id: Ic367eea608c88d89475cb7b05d73500d2a1bc42b
2011-06-08 16:19:37 -04:00
Scott LaVarnway
1374a4db3b Removed unused function vp8_treed_read_num
Change-Id: Id66e70540ee7345876f099139887c1843093907f
2011-06-07 09:32:51 -04:00
John Koleszar
6c8205d37e Merge remote branch 'origin/master' into experimental
Change-Id: I67cc3b490266f958a1b3a935ec08ee19d7b4f6a0
2011-06-07 00:05:07 -04:00
John Koleszar
84f5b14b0e Merge remote branch 'internal/upstream' into HEAD 2011-06-06 15:51:23 -04:00
John Koleszar
be15a09980 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/encoder/encodeframe.c

Change-Id: Ibb5a3894ede08ed401ec6e974a8902d7393c9978
2011-06-06 15:50:48 -04:00
John Koleszar
2c308f36fc Merge remote branch 'origin/master' into experimental
Change-Id: I81ac427cbaf3d0865df4acef3e0bfc2e95556c4b
2011-06-04 00:05:13 -04:00
Scott LaVarnway
f1d6cc79e4 Removed unnecessary bmi motion vector stores.
left_block_mv and above_block_mv will return the MB
motion vector for non SPLITMV macro blocks.

Change-Id: I58dbd7833b4fdcd44b6b72e98ec732c93c2ce4f4
2011-06-03 13:09:46 -04:00
Scott LaVarnway
8c5b73de2a Merge "Removed B_MODE_INFO" 2011-06-03 08:32:30 -07:00
Scott LaVarnway
773768ae27 Removed B_MODE_INFO
Declared the bmi in BLOCKD as a union instead of B_MODE_INFO.
Then removed B_MODE_INFO completely.

Change-Id: Ieb7469899e265892c66f7aeac87b7f2bf38e7a67
2011-06-02 13:46:41 -04:00
John Koleszar
32817d6fbe Merge remote branch 'origin/master' into experimental
Change-Id: I993dbef81ca3d1638e16c4134aa8dc177e57875c
2011-06-02 00:05:13 -04:00
John Koleszar
319404f4f1 Merge remote branch 'internal/upstream' into HEAD 2011-06-02 00:05:07 -04:00
John Koleszar
4101b5c5ed Merge "Bugfix in vp8dx_set_reference" 2011-06-01 13:57:23 -07:00
Henrik Lundin
69ba6bd142 Bugfix in vp8dx_set_reference
The fb_idx_ref_cnt book-keeping was in error. Added an assert to
prevent future errors in the reference count vector. Also fixed a
pointer syntax error.

Change-Id: I563081090c78702d82199e407df4ecc93da6f349
2011-06-01 21:41:12 +02:00
John Koleszar
d63ce5db34 Merge remote branch 'origin/master' into experimental
Change-Id: Ie2a4927754a9c220b30a84fc7e1372e565fe9eec
2011-05-28 00:05:12 -04:00
John Koleszar
4070c93bfa Merge remote branch 'internal/upstream' into HEAD 2011-05-28 00:05:09 -04:00
John Koleszar
2fa7fe66c4 Merge remote branch 'origin/master' into experimental
Change-Id: I6d6692418eecf54e23e00a08394b0b37d6e7682b
2011-05-27 00:05:12 -04:00
Scott LaVarnway
4f586f7bd0 Broken EC after MODE_INFO size reduction
This patch fixes the compiler errors and the seg fault
when running decode_with_partial_drops.

Change-Id: I7c75369e2fef81d53b790d5dabc327218216838b
2011-05-26 15:13:00 -04:00
John Koleszar
d1910cc484 Merge remote branch 'internal/upstream' into HEAD 2011-05-26 11:45:14 -04:00
John Koleszar
9dccdc1f08 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/encoder/encodeframe.c
	vp8/encoder/ethreading.c

Change-Id: I4becf6f101756923de6b98ca6a2132c3605c6ea5
2011-05-26 11:44:36 -04:00
John Koleszar
117fcb207e Merge remote branch 'origin/master' into experimental
Change-Id: I9e5c28f898d92091e39f62193f6329b593968819
2011-05-25 00:05:14 -04:00
Scott LaVarnway
a39321f37e Use int_mv instead of MV in vp8_mv_cont
Less operations.

Change-Id: Ibb9cd5ae66b8c7c681c9a654d551c8729c31c3ae
2011-05-24 16:01:12 -04:00
Scott LaVarnway
cfab2caee1 Removed unused variable warnings
Change-Id: I6e5e921f03dc15a72da89a457848d519647677a3
2011-05-24 15:17:03 -04:00
Scott LaVarnway
b5278f38b0 Merge "MODE_INFO size reduction" 2011-05-24 12:08:24 -07:00
Scott LaVarnway
e11f21af9a MODE_INFO size reduction
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-24 13:24:52 -04:00
Henrik Lundin
a126cd1760 Fixing bug in VP8_SET_REFERENCE decoder control command
In vp8dx_set_reference, the new reference image is written to an
unused reference frame buffer.

Change-Id: I9e4f2cef5a011094bb7ce7b2719cbfe096a773e8
2011-05-24 09:03:43 +02:00
John Koleszar
54bc4fde77 Merge remote branch 'origin/master' into experimental
Conflicts:
	configure

Change-Id: I91b9059e5b724a96368c7765c147fdf5a5ce03f2
2011-05-20 08:33:51 -04:00
John Koleszar
27331e1377 Merge remote branch 'internal/upstream' into HEAD 2011-05-20 00:05:16 -04:00
Stefan Holmer
d04f852368 Adding error-concealment to the decoder.
The error-concealer is plugged in after any motion vectors have been
decoded. It tries to estimate any missing motion vectors from the
motion vectors of the previous frame. Intra blocks with missing
residual are replaced with inter blocks with estimated motion vectors.

This feature was developed in a separate sandbox
(sandbox/holmer/error-concealment).

Change-Id: I5c8917b031078d79dbafd90f6006680e84a23412
2011-05-19 13:46:33 -04:00
John Koleszar
72913435cb Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/common/blockd.h
	vp8/decoder/decodemv.c

Change-Id: Ib97c226d5b33b1ac1675d9c96eac1986af4dd579
2011-05-13 10:16:37 -04:00
John Koleszar
71a0eaf33c Merge remote branch 'origin/master' into experimental
Change-Id: Idf2dead51d2936984eb9827dd6d2cb704817f4c8
2011-05-13 00:05:14 -04:00
Scott LaVarnway
6b25501bf1 Using int_mv instead of MV
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-05-12 11:08:16 -04:00
John Koleszar
6edd07d656 Merge remote branch 'internal/upstream-experimental' into HEAD 2011-05-11 00:05:07 -04:00
John Koleszar
b08c6fa699 Merge remote branch 'origin/master' into experimental
Change-Id: I24a548e3ce7794409b6731829f83befc0d465800
2011-05-10 00:05:10 -04:00
Johann
a7d4d3c550 clean up unused variable warnings
Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
2011-05-09 12:56:20 -04:00
John Koleszar
e965d8f6f3 Merge remote branch 'origin/master' into experimental
Change-Id: Ib6c8596030140ed2b5e1dea76de024d27ad8ed86
2011-05-06 00:05:11 -04:00
John Koleszar
39e36f8604 Merge remote branch 'internal/upstream' into HEAD 2011-05-06 00:05:10 -04:00
Yunqing Wang
aeb86d615c Merge "Runtime detection of available processor cores." 2011-05-05 04:59:54 -07:00
John Koleszar
518c551903 Merge remote branch 'origin/master' into experimental
Change-Id: I9c995f1fdb46c098b0c519bf333318dff651cb40
2011-04-30 00:05:06 -04:00
John Koleszar
8398449cbf Merge remote branch 'internal/upstream' into HEAD 2011-04-30 00:05:05 -04:00
Scott LaVarnway
ccd6f7ed77 Consolidated build inter predictors
Code cleanup.

Change-Id: Ic8b0167851116c64ddf08e8a3d302fb09ab61146
2011-04-28 10:53:59 -04:00
John Koleszar
c26bb0fe8f Merge remote branch 'origin/master' into experimental
Change-Id: I7d91efbc3662c86d6efa2d7495eb4689ccdb0ced
2011-04-28 00:05:07 -04:00