Commit Graph

3129 Commits

Author SHA1 Message Date
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
Ivan Maltz
a82001b1cf Merge "SVC improvements" 2013-10-21 16:28:31 -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
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
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
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
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
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