Commit Graph

3297 Commits

Author SHA1 Message Date
James Zern
d9a317c8b2 vp9: add above/left_seg_context to MACROBLOCKD
Change-Id: I9cbb768c5f857a096cf6c29d6755d0e5e6728435
2013-10-28 11:32:16 +01:00
Dmitry Kovalev
b133cbf5f3 Merge "Adding fht{4x4, 8x8, 16x16} functions." 2013-10-26 03:03:27 -07:00
James Zern
8f177bb0b6 vp9 decode: defer loop filter allocation
wait until do_loopfilter_inline is true before committing the resources

Change-Id: I01661bd40599b47362bb3fb534668471f2a9d8d7
2013-10-26 11:57:44 +02:00
Dmitry Kovalev
ae2f732e8c Adding fht{4x4, 8x8, 16x16} functions.
Adding these functions to encapsulate tx_type check. Changing TX_TYPE to
int to match the declaration in vo9_rtch.h.

Change-Id: I6f3a2df6e35595ca73b6aaa9e3909ee7bc3fd16f
2013-10-25 17:55:07 -07:00
Dmitry Kovalev
07502f1963 Merge "Adding get_frame_new_buffer() function to replace duplicated code." 2013-10-25 15:25:13 -07:00
Dmitry Kovalev
ddfc87c6f3 Merge "Making input pointer constant for all fdct/fht functions." 2013-10-25 15:14:49 -07:00
Yunqing Wang
00dbd369c7 Rewrite loop_filter_info_n struct
Restructured the storing of loopfilter information. Deleted
loop_filter_info struct and reduced copying happened in every
superblock.

Tests showed a 0.5% ~ 0.8% decoder speed gain.

Change-Id: Ie6a8e46bae71dc3a3cd8c6054f5de540b8e0ef5e
2013-10-25 14:56:28 -07:00
James Zern
ce2c337261 vp9: add above/left_context to encoder
Change-Id: If5cea3d389bb1135ee490d273e57cc2c43325d01
2013-10-25 22:01:14 +02:00
James Zern
d72dfab296 vp9: add above/left_seg_context to encoder
Change-Id: I969406574c6658936e9f6db5752f1b295025aab5
2013-10-25 22:01:14 +02:00
James Zern
d2bf696ee0 vp9: pass entropy context directly to set_skip_context
this will allow for separate storage to be used in tile decoding

Change-Id: I025595d83118bdc82a545dae69bc6602e8d2a6e3
2013-10-25 22:01:13 +02:00
James Zern
88d79eabdc vp9: pass context directly to partition functions
update_partition_context / partition_plane_context: this will allow for
separate storage to be used in tile decoding

Change-Id: Ie0bc393531ab7e9d2ce35c95111849b294aad4ed
2013-10-25 22:01:13 +02:00
James Zern
71097d9cf2 vp9/decode: add alloc_tile_storage()
Change-Id: I3ebb172d4f2ae7db73b72fb42eb93833a295fb55
2013-10-25 22:01:13 +02:00
Dmitry Kovalev
d5ac877f7f Adding COLOR_SPACE enum.
Change-Id: If5711eb166609cce0a88b3cb5b56b3afeebc4fb0
2013-10-25 12:35:20 -07:00
Yunqing Wang
47665452f0 Merge "Add 32x32 idct function for eob<=34 case" 2013-10-25 09:34:46 -07:00
Jingning Han
39b6ab6a29 Merge "Separate encode_block for pass 1 and 2" 2013-10-24 21:39:27 -07:00
Yunqing Wang
f88315cb29 Add 32x32 idct function for eob<=34 case
When only upper-left 8x8 area has non-zero dct coefficients, we
could skip 1D IDCT for 9th to 32th rows to save operations. This
function is called when eob <= 34.

Change-Id: I9684b75947bdde346cfe3720f08a953aa7a13fb5
2013-10-24 16:13:21 -07:00
Johann
35c4437bf5 Merge "mips dsp-ase r2 vp9 decoder idct module optimizations (rebase)" 2013-10-24 15:49:31 -07:00
Dmitry Kovalev
237ce8724a Adding get_frame_new_buffer() function to replace duplicated code.
Change-Id: I6e0e19231a48364c1de7dfab730b121ab227f111
2013-10-24 12:20:35 -07:00
Dmitry Kovalev
600a3860a4 Making input pointer constant for all fdct/fht functions.
Change-Id: I78f7012f967a777ddd39bae6671eb501df6bbfe8
2013-10-24 11:48:25 -07:00
Dmitry Kovalev
7bb48e5e8e Replacing is_inter_mode with is_inter_block.
It should be only a check based on the block type (inter vs intra), not on
the mode value.

Change-Id: I0378cb4ba7c9a1631c1e870a537187b8650fa30a
2013-10-24 11:22:06 -07:00
Dmitry Kovalev
dfc7945d1e Adding get_frame_ref_buffer() function + cleanup.
Change-Id: Ib9ead216fc54b2df6f6f1fe82d2ea137197beebd
2013-10-24 11:05:35 -07:00
Yaowu Xu
1dcf094077 Merge "Disable two libvpx APIs for VP9" 2013-10-24 10:31:29 -07:00
Dmitry Kovalev
4a59def9b4 Merge "Eliminating usage of allow_comp_inter_inter in the decoder." 2013-10-24 10:09:37 -07:00
Dmitry Kovalev
8001ed71ed Merge "Renaming vp9_short_fdct4x4 and vp9_short_walsh4x4." 2013-10-24 10:08:42 -07:00
Dmitry Kovalev
710ca1fe36 Merge changes I1868fb75,I9ff504c6
* changes:
  Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.
  Adding VP9_FRAME_MARKER constant.
2013-10-24 10:08:19 -07:00
Dmitry Kovalev
153d70ca9b Merge "Cleaning up {above, left}_block_mode functions." 2013-10-24 10:07:51 -07:00
Yunqing Wang
93ec31dff6 Merge "Improve scale_factors struct" 2013-10-24 09:13:41 -07:00
Yaowu Xu
03b2ae16f2 Disable two libvpx APIs for VP9
set_active_map()
set_roi_map()

The APIs need be implemented and tested later, to insure consistency
with VP9 codec internals

Change-Id: I198124ee318f0883b58d1d36cea3c7ccd742a57e
2013-10-24 08:09:06 -07:00
James Zern
eec622d178 Merge "vp9/extend_for_intra: avoid crossing tile boundary" 2013-10-24 06:04:10 -07:00
James Zern
3c038b6c40 vp9/extend_for_intra: avoid crossing tile boundary
Change-Id: I0d8a71778aa3c73b8b1673e14053074bb866548b
2013-10-24 14:21:24 +02:00
Parag Salasakar
1699eb0bf6 mips dsp-ase r2 vp9 decoder idct module optimizations (rebase)
Change-Id: Iedcdb8867084f328f4fce2fadb968e0984217308
2013-10-24 11:29:04 +05:30
Dmitry Kovalev
5d28b63687 Cleaning up {above, left}_block_mode functions.
Making {above, left}_block_mode more clear and symmetric.

Change-Id: Ie348a950fb9a5cf52861d0cba838a58010ff56ad
2013-10-23 17:54:13 -07:00
Dmitry Kovalev
ad867fe237 Renaming INTERPOLATIONFILTERTYPE to INTERPOLATION_TYPE.
Change-Id: I1868fb75ed88bfa65c1c2ca24677d65f2894d713
2013-10-23 17:45:52 -07:00
Dmitry Kovalev
a53075f7c5 Adding VP9_FRAME_MARKER constant.
Also renaming SYNC_CODE_* to VP9_SYNC_CODE_*.

Change-Id: I9ff504c6ebce6cd6673d7df2085d597b818f5960
2013-10-23 17:24:17 -07:00
Dmitry Kovalev
fd724f13b0 Renaming vp9_short_fdct4x4 and vp9_short_walsh4x4.
For consistency with idct function names. Renames:
  vp9_short_fdct4x4  -> vp9_fdct4x4
  vp9_short_walsh4x4 -> vp9_fwht4x4

Change-Id: Id15497cc1270acca626447d846f0ce9199770f58
2013-10-23 14:28:39 -07:00
Dmitry Kovalev
dea22b4bda Merge "Renaming vp9_short_fdct32x32 to vp9_fdct32x32." 2013-10-23 14:18:57 -07:00
Dmitry Kovalev
4d88b3837b Eliminating usage of allow_comp_inter_inter in the decoder.
Splitting setup_inter_inter function into is_compound_prediction_allowed
and setup_compound_prediction. Moving setup_compound_prediction call
into read_comp_pred from read_uncompressed_header.

We should do the same in the encoder as well.

Change-Id: I40d75fdc4a221b2f7705df00d23a4b3fe79987c3
2013-10-23 14:18:09 -07:00
Jingning Han
ae0e747d6a Merge "Use inter mode flag in super_block_yrd" 2013-10-23 13:52:05 -07:00
Dmitry Kovalev
a018988ce8 Renaming vp9_short_fdct32x32 to vp9_fdct32x32.
For consistency with idct function names.

Change-Id: Ie77b7178e0894c57cd5cb9243c949eb9224ece18
2013-10-23 13:41:40 -07:00
Dmitry Kovalev
5bdd4d9ccf Merge "Renaming vp9_short_fdct16x16 to vp9_fdct16x16." 2013-10-23 13:37:09 -07:00
Dmitry Kovalev
a9c8251b9d Merge "Renaming vp9_short_fdct8x8 to vp9_fdct8x8." 2013-10-23 11:38:55 -07:00
Jingning Han
4e2732c3c3 Separate encode_block for pass 1 and 2
The encode_block for pass 1 takes simpler functionalities and can
save a few branches. The main reason is to make encode_block only
used after running rate-distortion optimization search in pass 2,
hence allowing dual buffer stack approach later.

Change-Id: I9e549ffb758e554fe185e48a07d6e0e01e475bcf
2013-10-23 11:19:45 -07:00
Jingning Han
f3b31380fa Use inter mode flag in super_block_yrd
Use a flag variable to determine if coded in inter mode, thus avoiding
multiple inter mode checks in super_block_yrd.

Change-Id: I0ef998b2811c38e185a2e0583f0f636cee45d2cf
2013-10-23 11:18:23 -07:00
Jingning Han
9cc4935d7b Merge "Make decode modules independent of tile index" 2013-10-23 11:08:12 -07:00
Dmitry Kovalev
02feb63684 Renaming vp9_short_fdct16x16 to vp9_fdct16x16.
For consistency with idct function names.

Change-Id: I5ca355ba99fdba04f09254be95cf79808b534f71
2013-10-23 10:57:12 -07:00
Dmitry Kovalev
fa143dbc8e Renaming vp9_short_fdct8x8 to vp9_fdct8x8.
For consistency with idct function names.

Change-Id: I7b6af2f92c66eff56f84ed29edc3a66af8dc421f
2013-10-23 10:52:33 -07:00
Dmitry Kovalev
73fe696c91 Merge "Reordering probability tables for consistency." 2013-10-23 10:10:24 -07:00
Dmitry Kovalev
789a6c1bd2 Merge "Removing quantize_b_4x4 function pointer." 2013-10-23 10:09:53 -07:00
Adrian Grange
2f58b813bb Remove right_available member from VP9_COMP
This member of VP9_COMP is no longer used, so I removed it.

Change-Id: I3509f52756da4768a3e4581cec5ed5d2a70d5fb8
2013-10-22 16:53:37 -07:00
Jingning Han
bd23e084eb Make decode modules independent of tile index
Assign the pointer to mode_info stream per tile. Remove the use of
tile_col in the decoding modules.

Change-Id: I7df87086708a3d92c5e20e86bcfb04e458ff47a6
2013-10-22 15:22:59 -07:00
Dmitry Kovalev
34d6077c93 Merge "Moving functions from vp9_decodemv.c to vp9_decodframe.c." 2013-10-22 14:00:48 -07:00
Dmitry Kovalev
9d3f27f3da Moving functions from vp9_decodemv.c to vp9_decodframe.c.
This move is done to have all compressed header reading functions in one
place. Moved functions:
  read_switchable_interp_probs
  read_inter_mode_probs
  read_comp_pred_mode
  read_comp_pred
  update_mv
  read_mv_probs

Change-Id: I2aebb57d2826d03d11bf2f8fbbfc3a9978c4f9fb
2013-10-22 13:19:23 -07:00
Yunqing Wang
175c313a12 Improve scale_factors struct
The ref's scale_factors are set at frame level, and then copied for
each partition block. Since the struct members are mostly constant,
this patch separated the constant and non-constant members, and
reduced struct copying. This gave 0.5% ~ 1.4% decoder speed gain.

Change-Id: I94043bf5a6995c8042da52e5c661818dfa6f6d4c
2013-10-22 13:10:22 -07:00
Dmitry Kovalev
ec414372e8 Removing quantize_b_4x4 function pointer.
The pointer was asigned only once with vp9_regular_quantize_b_4x4, calling
this function directly now. Also removing unused declarations:
  prototype_quantize_block
  prototype_quantize_block_pair
  prototype_quantize_mb
  vp9_regular_quantize_b_4x4_pair
  vp9_regular_quantize_b_8x8

Change-Id: I14325bc2f082336820671eafbc06126651b79f73
2013-10-22 13:09:36 -07:00
James Zern
5645b2d89b Merge "vp9 dec/com: only update frame counts when necessary (2)" 2013-10-22 13:08:44 -07:00
Dmitry Kovalev
9f09618bd4 Merge "Using stride (# of elements) instead of pitch (bytes) in fdct4x4." 2013-10-22 13:05:24 -07:00
James Zern
c9af3de155 Merge changes I305fd55f,I13fe92b1
* changes:
  vp9/dec: use loop filter worker for all inline cases
  vp9_thread: add vp9_worker_execute()
2013-10-22 13:00:33 -07:00
James Zern
64d94b4aa6 Merge "Revert "Merge "SVC improvements""" 2013-10-22 12:47:22 -07:00
Dmitry Kovalev
68c02593df Reordering probability tables for consistency.
Putting vp9_kf_y_mode_prob[] before vp9_kf_uv_mode_prob[].

Change-Id: I2404910e35de1ee24ce46337e00c07eb1446e50f
2013-10-22 12:21:37 -07:00
Dmitry Kovalev
fa57135b2c Merge "Removing NUM_ prefix from constant names." 2013-10-22 11:34:28 -07:00
Dmitry Kovalev
a767d10fa5 Merge "Using stride (# of elements) instead of pitch (bytes) in fdct8x8." 2013-10-22 11:34:17 -07:00
Dmitry Kovalev
0c10a94581 Merge "Using INTER_MODES constant instead of MB_MODE_COUNT - NEARESTMV." 2013-10-22 11:34:09 -07:00
Jingning Han
7b54556008 Merge "Prevent left_block_mode stepping into left tile" 2013-10-22 09:37:17 -07:00
Jingning Han
c807949408 Prevent left_block_mode stepping into left tile
This commit uses left_available flag to decide if the left mode_info
struct is available for left_block_mode. As discussed with James
Zern (jzern@), this prevents the codec from fetching mode_info from
blocks in the left tile, which although effectively not used might
present concerns for multi-threaded tile decoding.

This is NOT a bit-stream change.

Change-Id: I1dc8cf1bcbf056688eee27c7bc5706ac4b4e0125
2013-10-22 09:02:41 -07:00
James Zern
cd74a901a7 Revert "Merge "SVC improvements""
This reverts commit a82001b1cf, reversing
changes made to f6d870f7ae.

This commit breaks windows builds and needs some work to fix those and
some additional comments.

Change-Id: Ic0b0228e36704b127e5e399ce59db26182cfffe7
2013-10-22 11:09:22 +02:00
Ivan Maltz
a82001b1cf Merge "SVC improvements" 2013-10-21 16:28:31 -07:00
Dmitry Kovalev
190c2b4591 Using stride (# of elements) instead of pitch (bytes) in fdct4x4.
Just making fdct consistent with iht/idct/fht functions which all use
stride (# of elements) as input argument.

Change-Id: I0ba3c52513a5fdd194f1e7e2901092671398985b
2013-10-21 15:27:35 -07:00
Dmitry Kovalev
f6d870f7ae Merge "Inlining set_partition_seg_context function." 2013-10-21 14:43:37 -07:00
Ivan Maltz
663916cea7 SVC improvements
These changes were originally made in the Stratacaster team-review repository

commit e114bffcd82ad74c3696ec58e13c0ac895d6c82d
Author: Charles 'Buck' Krasic <ckrasic@google.com>
Date:   Mon Oct 14 16:52:13 2013 -0700

    Make dummy frame handling a bit more explicit, fixing bug
    with single layer encodes.

Squashed commit of the following:

commit 1ebbfd976c0fadb02bf1ea562a2d0e3f0206daad
Merge: ac468dd 54e88b7
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Fri Oct 11 17:29:58 2013 -0700

    Move SVC code from vp9_spatial_scalable_encoder to libvpx module accessible from ffmpeg

commit 54e88b78b160becc9569fc3c6cb6b0a8c95dc357
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Tue Oct 8 09:08:40 2013 -0700

    common svc encoding code for sample app and ffmpeg

    added svc_encodeframe.c, svc_context.h, svc_test.cc

    vp9_spatial_scalable_encoder uses vpx_svc_encode

commit 5616ec8e2e3d3e8d277333d8a9242f6c70151162
Merge: 4528014 e29137d
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Tue Oct 8 08:47:58 2013 -0700

    Merge branch 'master' into stratacaster

commit 45280148450b1f3d61e390df8aadedf85cd5bce1
Merge: bb2b675 1ab60f7
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Fri Oct 4 10:22:31 2013 -0700

    Merge branch 'master' into stratacaster

commit bb2b675e595dc9bfc8551e963edf56800c3aea61
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Wed Oct 2 12:37:26 2013 -0700

    Track individual frame sizes and psnrs instead of averages.

commit c6d303b714795c81e7ceb4173967115c9f8ff5b7
Merge: fa87df9 3583087
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Fri Sep 27 10:05:35 2013 -0700

    Merge branch 'master' into stratacaster

commit fa87df94fba923d9f7aeb8ae20c6e15f777e00b5
Merge: bf22d71 3c465af
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 26 16:10:31 2013 -0700

    Merge branch 'master' into stratacaster

commit bf22d7144895a82e0c348ac177c8a261b9e2b88e
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 26 11:10:34 2013 -0700

    Parameterized quantizer, 16th scalefactors, more logging, enabled single layer encodes to generate baseline.

commit ceffd7e6025b765f9886b5ea0f324248aa37e327
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 19 10:04:49 2013 -0700

    - Include new mode for 3 layer I frame with 5 total layers.
    - Refactor svc api.

Change-Id: Ie4d775e21e006fa597d884c59488dc999478e9b5
2013-10-21 14:34:37 -07:00
Dmitry Kovalev
1e05c9a7e6 Merge "Cleanup: using cm variable instead of cpi->common." 2013-10-21 14:30:01 -07:00
Dmitry Kovalev
a0be71c703 Inlining set_partition_seg_context function.
We used set_partition_seg_context() only before calls to:
 1. update_partition_context()
 2. partition_plane_context()

Moving these functions from vp9_blockd.h to vp9_onyxc_int.h and
inlining  set_partition_seg_context into them. After that it is not
necessary to have {above, left}_seg_context fields in MACROBLOCKD struture,
so removing them also.

Change-Id: I4723f59e1c8f3788432b7f51185d8d747b3a97f9
2013-10-21 12:02:19 -07:00
Jingning Han
deb10ac6f9 Merge "Make memory alloc in pick_mode_context bsize aware" 2013-10-21 11:45:59 -07:00
Dmitry Kovalev
a698e52926 Cleanup: using cm variable instead of cpi->common.
Change-Id: Iab334b5fd51dfa7e7f29963f8bdc62fd7355e56d
2013-10-21 11:10:11 -07:00
Dmitry Kovalev
33a29f3c35 Merge "Moving allow_high_precision_mv from MACROBLOCKD to VP9_COMMON." 2013-10-21 10:55:02 -07:00
James Zern
2d1ab9a850 vp9 dec/com: only update frame counts when necessary (2)
missed one in vp9_detokenize.c in the last
+ add some asserts in vp9_decode_frame() to catch regressions

Change-Id: Ide67505114ee17efdafb13694aed0c09039e5a16
2013-10-21 19:51:36 +02:00
Yunqing Wang
4afc3a6542 Merge "Fix d207 intra prediction SSSE3 functions" 2013-10-21 10:45:20 -07:00
Paul Wilkins
282157f1e7 Merge "Modified no memory rate control." 2013-10-21 10:32:47 -07:00
Paul Wilkins
28985bb274 Merge "Reduced delta for kf/gf/arf when at maxq." 2013-10-21 10:32:35 -07:00
Dmitry Kovalev
d1b65c6bda Moving allow_high_precision_mv from MACROBLOCKD to VP9_COMMON.
This value is a global frame-level flag, not a macroblock-level.

Change-Id: Ie8c5790a931150741c2167c00c3e3dd2cf26744d
2013-10-21 10:12:14 -07:00
Dmitry Kovalev
41ff8d7aaa Merge "Removing unused struct member mvcount[MV_VALS]." 2013-10-21 09:46:07 -07:00
James Zern
0aee867f00 vp9_decodframe: limit scope of private function params
replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD structures.

Change-Id: I50d2579238d1a5d51ba5a82379266448ae64b24b
2013-10-21 15:02:24 +02:00
James Zern
27aec502ae vp9_decode_tokens: limit scope of function params
replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD/struct segmentation structures.

Change-Id: Iabb3616e231417b0e17b7e4b384ea63167a81745
2013-10-21 14:56:32 +02:00
James Zern
2f5b7ad6ca vp9_read_mode_info: limit scope of function params
replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD structures.

Change-Id: I09f6c4a5b0bcc20222210831b5b4c1582eced300
2013-10-21 14:56:32 +02:00
James Zern
a06cadba22 vp9_decodemv: limit scope of private function params
replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD structures.

Change-Id: Ieafac9ad035cba808ed91d3dfd321ba864b58905
2013-10-21 14:51:23 +02:00
James Zern
f8797a5aac vp9/dec: use loop filter worker for all inline cases
- uses vp9_worker_execute() in non-threaded case
+ removes hook reassignment

Change-Id: I305fd55f2be5cd92367373c929cdb9004066f90f
2013-10-21 14:28:40 +02:00
Paul Wilkins
eec3def7c5 Modified no memory rate control.
This 2-pass rate control setting allocates bits based
on first pass stats to each kf group, gf group and individual
frame but does not correct the bits left and allocation after
each frame.

In other words it recommends a bit allocation for each frame
but does not try and correct any over or under spend on a
frame over the remainder of the clip. This reduces the accuracy
of rate control in terms of hitting an average bitrate but prevents
problems that may arise because early frames either use to many
or too few bits. This mode is currently more inclined to undershoot
than overshoot (particularly at higher data rates).

Also minor changes to rate of adaption when recode loop is not
enabled.

This mode is currently enabled by default for VBR.
It gives the following % performance gains.

derf +0.467, +1.072
yt 2.962, 2.645
stdhd 1.682, 1.595,
yt-hd 2.3, 2.174

Change-Id: I3c84a9bf8884e5b345698ff0e19187f792c2f3a0
2013-10-19 12:40:43 +01:00
Paul Wilkins
a2769bb73d Reduced delta for kf/gf/arf when at maxq.
Delta reduced because of concern about popping on some
very hard clips.

Also allow some frame recode at speed 2 for kf/gf/arf.

Change-Id: Ib47dff42da41aa6eec83b7285fcaaca24abb851e
2013-10-19 12:24:59 +01:00
Dmitry Kovalev
6d2a0da7a7 Removing NUM_ prefix from constant names.
Renames for consistency with other constants:
  NUM_FRAME_TYPES -> FRAME_TYPES
  NUM_PARTITION_CONTEXTS -> PARTITION_CONTEXTS

Change-Id: I3db30acb2868eb0a424237c831087b2e264ec47f
2013-10-18 17:44:19 -07:00
Yunqing Wang
dd51042802 Fix d207 intra prediction SSSE3 functions
This patch fixed a bug that caused 32bit PIC build mismatch. The
stack pointer was modified after "GET_GOT". Loading left pointer
from a hard-coded position gave wrong result.

Change-Id: Iea0aec6f917b12a6b3393ffc986bad74510248cc
2013-10-18 17:00:18 -07:00
Dmitry Kovalev
18a4bd2510 Using INTER_MODES constant instead of MB_MODE_COUNT - NEARESTMV.
Change-Id: Ie5ec392904d03fd5485474b33be8408108e9d3c9
2013-10-18 14:31:56 -07:00
Yunqing Wang
997e19092e Disable d207 intra prediction SSSE3 functions
Commit "d207 intra prediction ssse3 using bytes" caused mismatch
while building 32bit PIC code. Disabled these SSSE3 functions
until we fix the bug.

Change-Id: Ic444e531d3d4058092fe6eab09006b44fcb18e4c
2013-10-18 14:23:17 -07:00
James Zern
4e6c799e9f Merge "vp9 dec/com: only update frame counts when necessary" 2013-10-18 13:56:11 -07:00
James Zern
68573c9d2b Merge "vp9 com/dec: avoid reading unavailable above/left" 2013-10-18 13:22:19 -07:00
James Zern
7563dd4a8d vp9 dec/com: only update frame counts when necessary
don't update them when frame_parallel_mode is true

Change-Id: I22ff131a6c6eea238415d10b729f195c7d6dc60d
2013-10-18 22:16:56 +02:00
Yaowu Xu
db1045f2c0 Merge "Use lookup table to simplify logic" 2013-10-18 12:55:24 -07:00
Dmitry Kovalev
5cb8cca9eb Merge "Using stride (# of elements) instead of pitch (bytes) in fdct16x16." 2013-10-18 12:53:09 -07:00
Jingning Han
72033fcff8 Make memory alloc in pick_mode_context bsize aware
This commit makes the buffer allocation of zcoeff_blk array in
pick_mode_context block size aware. It calculates the number of
4x4 blocks in the partition and assigns the memory space accordingly.
This process (and the uninitialization) is done once for each encoding
pass. It allows memory copy of smaller buffer when possible.

For football at 600kbps, the runtimes improve by about 1%:
speed 1, 45961ms -> 45472ms
speed 2, 23863ms -> 23598ms

Change-Id: Id2ca24906fa89f46fa5fe742ec4b8efc2a61f877
2013-10-18 12:42:44 -07:00
James Zern
67e41fe2f6 vp9 com/dec: avoid reading unavailable above/left
in most cases at least the left column was a harmless race as it was
left unused later in the code.

Change-Id: I43211df66fb157c6feecf08c681add4fcf18b644
2013-10-18 21:39:37 +02:00
Yaowu Xu
ea77b03479 Merge "Converted assert to error checking" 2013-10-18 12:39:28 -07:00
Dmitry Kovalev
e5fa44c869 Using stride (# of elements) instead of pitch (bytes) in fdct8x8.
Just making fdct consistent with iht/idct/fht functions which all use
stride (# of elements) as input argument.

Change-Id: Ibc944952a192e6c7b2b6a869ec2894c01da82ed1
2013-10-18 12:20:26 -07:00
Dmitry Kovalev
1f5d744742 Removing unused struct member mvcount[MV_VALS].
Change-Id: Iaaca88097904b889769901f2bd331f4fff0e5044
2013-10-18 11:56:55 -07:00
Dmitry Kovalev
c093b6228c Merge "Passing block index explicitly instead of using get_sb_index()." 2013-10-18 11:51:24 -07:00
Dmitry Kovalev
1aa7fd5aef Using stride (# of elements) instead of pitch (bytes) in fdct16x16.
Just making fdct consistent with iht/idct/fht functions which all use
stride (# of elements) as input argument.

Change-Id: I2d95fdcbba96aaa0ed24a80870cb38f53487a97d
2013-10-18 11:49:33 -07:00
Yaowu Xu
535a1085bc Converted assert to error checking
Change-Id: Icb8c677f910f588cc7c97e70f024787fe6789257
2013-10-18 11:49:32 -07:00
Yaowu Xu
ce34b6f50d Merge "Added checking for invalid size" 2013-10-18 11:45:12 -07:00
Dmitry Kovalev
a8ffa96e9b Passing block index explicitly instead of using get_sb_index().
That makes decoder and encoder (only bitstream writing part) a little bit
simpler and faster. Moving get_sb_index() function to the encoder.

Change-Id: Ie91aaeefd69c84b085948267b33556a7666c6278
2013-10-18 11:02:32 -07:00
Yaowu Xu
062fb50562 Added checking for invalid size
Change-Id: I9672a61e60a26e2934796f088880ce4cb49605be
2013-10-18 10:33:38 -07:00
Paul Wilkins
eaf2d4cbfc Merge "Add missing calls to emms in the adaptive quantization code" 2013-10-18 01:59:03 -07:00
Yaowu Xu
30d1ec38a7 Use lookup table to simplify logic
In deciding the transform size for a given block in a given TX_MODE.

Change-Id: I1467da09853e69cd320695a24c04e19a2f3d04fb
2013-10-17 14:54:16 -07:00
Dmitry Kovalev
08fc2c925f Merge "Adding allow_hp as an argument to mv search functions." 2013-10-17 14:47:06 -07:00
Dmitry Kovalev
ab1e65b380 Merge "Using TREE_SIZE macro for vp9_segment_tree." 2013-10-17 14:46:08 -07:00
Dmitry Kovalev
631d216273 Merge "Removing last_kf_gf_q member from VP9Common structure." 2013-10-17 14:46:02 -07:00
Guillaume Martres
ff3aada6cb Add missing calls to emms in the adaptive quantization code
Also avoid using floating-point operations when adaptive quantization is
disabled.

Change-Id: I54936d7afb661df049cdb3ecd246d04ac2a9d8d3
2013-10-17 14:04:41 -07:00
Dmitry Kovalev
2726f383cd Adding allow_hp as an argument to mv search functions.
Making this change in order to move allow_high_precision_mv field
from MACROBLOCKD structure to VP9_COMMON (because it is a frame level
flag).

Change-Id: I1d006ba36d938e0caf4d40fa051e2e38df9c1108
2013-10-17 14:02:04 -07:00
Dmitry Kovalev
e05412fc23 Using stride (# of elements) instead of pitch (bytes) in fdct32x32.
Just making fdct consistent with iht/idct/fht functions which all use
stride (# of elements) as input argument.

Change-Id: Id623c5113262655fa50f7c9d6cec9a91fcb20bb4
2013-10-17 13:02:28 -07:00
James Zern
820201caa8 vp9_thread: add vp9_worker_execute()
cherry-picked from:
commit 988b70844e03efcfcc075a9bc25d846670494f36
Author: Pascal Massimino <pascal.massimino@gmail.com>
Date:   Fri Aug 2 11:15:16 2013 -0700

    add WebPWorkerExecute() for convenient bypass

    This is mainly for re-using the worker structs without using the
    thread.

    Change-Id: I8e1be29e53874ef425b15c192fb68036b4c0a359

Original source:
 http://git.chromium.org/webm/libwebp.git
 100644 blob c0d318aee628fdf9ba4876451a28aa978f1066b8 src/utils/thread.c
 100644 blob c2b92c9fe353f8e514f78922f3d237204a9cbc66 src/utils/thread.h

Change-Id: I13fe92b1e94062bb99fdeeb7cb0b4b0575d27793
2013-10-17 16:44:22 +02:00
Dmitry Kovalev
01993f7d4a Removing last_kf_gf_q member from VP9Common structure.
It looks like we don't actually use this value.

Change-Id: If21d52b597337e7755f7ea817824fc2b1e477a14
2013-10-16 18:01:48 -07:00
Dmitry Kovalev
1350f885f6 Using TREE_SIZE macro for vp9_segment_tree.
Change-Id: I2965453135643d8f061b9fa9406fdca2db9c961e
2013-10-16 17:35:06 -07:00
Guillaume Martres
7fd2561d64 Merge changes I6226456d,I97925178,I766c4b74
* 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-16 17:05:39 -07:00
Guillaume Martres
5b984b36ca Use a separate MODE_INFO stream for each tile column
This should make parallel tiles decoding easier to implement.

Change-Id: I6226456dd11f275fa991e4a7a930549da6675915
2013-10-16 16:24:48 -07:00
Guillaume Martres
acf0d56f0b Get rid of "this_mi", use "mi_8x8[0]" everywhere instead
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-16 16:24:03 -07:00
Guillaume Martres
9a03154f46 Make the static_segmentation feature work again
Change-Id: I766c4b74db526efa4ff6dd2d95ef3e0beb45b6e5
2013-10-16 16:15:27 -07:00
Dmitry Kovalev
6c891d4303 Merge "Adding get_band_translate() function." 2013-10-16 16:15:18 -07:00
Guillaume Martres
42bcb4a7ad Merge "Prevent accidental changes to the previous frame mode_infos" 2013-10-16 16:07:05 -07:00
Yaowu Xu
f5377cd74f Merge "change to use vp9_idct_32x32_add" 2013-10-16 15:53:37 -07:00
Dmitry Kovalev
9deb614a57 Adding get_band_translate() function.
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-16 15:11:42 -07:00
Dmitry Kovalev
ab829274b1 Inlining and removing fwd_txm16x16 and fwd_txm8x8 pointers.
Change-Id: I3528ba1c3fee761918509f9d9dc2d842c69f5a44
2013-10-16 15:00:48 -07:00
Dmitry Kovalev
ba71191ce1 Merge "Cleanup of decode_coefs() function." 2013-10-16 14:47:17 -07:00
Yaowu Xu
aa60db19d2 change to use vp9_idct_32x32_add
instead of vp9_idct32x32_1024_add by making use the eob positions

Change-Id: Iafcad20f0c75d8e00536c6a20dda76fe40a973fb
2013-10-16 14:39:14 -07:00
Dmitry Kovalev
501a8c6b91 Merge "Removing print_prob_tree function and vp9_coeff_probs typedef." 2013-10-16 13:13:25 -07:00
Dmitry Kovalev
65583b14e0 Merge "Moving FILTER_BITS constant from vp9_convolve.h to vp9_filter.h." 2013-10-16 13:13:14 -07:00
Dmitry Kovalev
9e66515886 Merge "Using constants instead of plain numbers." 2013-10-16 13:13:04 -07:00
Marco Paniconi
e078c3d854 Initial 1-pass.
Change-Id: I58c5436f5c95f6012fb2891cd2a02f76e4870b6a
2013-10-16 12:04:29 -07:00
Guillaume Martres
e55f60240a Implement variance-based adaptive quantization
This should be similar to what x264 does with --aq-mode 1.
It works well with clips like parkjoy and touhou
(http://x264.nl/developers/Dark_Shikari/LosslessTouhou.mkv).
At low bitrates, the segmentation signaling overhead may negate the
benefits of this feature.

(PGW) Default changed to feature OFF to allow provisional merge.
Change-Id: I938abf9bb487e1d4ad3b0264ea03d9826275c70b
2013-10-16 11:55:13 +01:00
Adrian Grange
12b2c712ca Merge "Updated encoder to handle intra-only frames" 2013-10-15 17:19:28 -07:00
Johann
e404db44ff Merge "Remove Windows-style newlines using dos2unix" 2013-10-15 17:05:32 -07:00
Jingning Han
9b05f23e05 Merge "Make vp9_zero use cases of consistent format" 2013-10-15 16:49:05 -07:00
Alexander Voronov
d6a59fb12c Updated encoder to handle intra-only frames
Updated the encoder to handle frames that are coded
intra-only. Intra-only frames must be non-showable,
that is, the "show frame" flag must be set to 0 in
the frame header.

Tested by forcing the ARF frames to be coded intra-
only.

Note: The rate control code will need to be modified
to account for intra-only frames better than they
are currently handled.

Change-Id: I6a9dd5337deddcecc599d3a44a7431909ed21079
2013-10-15 16:44:02 -07:00
Jingning Han
355db16734 Merge "Remove unused variable vp9_64x64_zeros" 2013-10-15 16:24:34 -07:00
Jingning Han
bf187d1b2d Merge "Fix a few indent format issues in buffer defs" 2013-10-15 16:23:50 -07:00
Jingning Han
fd1cd89da6 Merge "Remove unused comment" 2013-10-15 16:23:44 -07:00
Jingning Han
3f52cfa130 Merge "Re-design all-zero-coeff block index buffer use" 2013-10-15 16:23:38 -07:00
Jingning Han
c8e48f4b02 Make vp9_zero use cases of consistent format
Remove the semicolon in the definition of vp9_zero macro. Make all
the use cases of vp9_zero of consistent format.

Change-Id: Ibaf9751e8595872b12766381a93d185a4d90df8f
2013-10-15 16:12:21 -07:00
Guillaume Martres
67cf81b1c0 Remove Windows-style newlines using dos2unix
Change-Id: I0a0f9c07e774450896abc9455728b97fd38ef00c
2013-10-15 15:49:52 -07:00
Yaowu Xu
e4d12a1352 Merge "Converted assertion to returning error" 2013-10-15 15:27:48 -07:00
Yaowu Xu
f999d791e0 Merge "Added trap for invalid key frame" 2013-10-15 14:28:21 -07:00
Yaowu Xu
f2cb97bbda Merge "Prevent access to invalid pointer" 2013-10-15 14:28:15 -07:00
Yaowu Xu
da9e67ce3c Merge "Add clamp to prevent out of bound access" 2013-10-15 14:28:08 -07:00
Yaowu Xu
50494d5c1b Converted assertion to returning error
Assertion happens for invalid input data, the commit replace the
assertion with returning error.

Change-Id: I1b73ae752d64882d984cd23936efe75a757c2b41
2013-10-15 14:06:00 -07:00
Yaowu Xu
52a39f75f2 Added trap for invalid key frame
Change-Id: I698e8df9b336d38bffe01e656acba00d4003695f
2013-10-15 13:55:25 -07:00