Commit Graph

272 Commits

Author SHA1 Message Date
Frank Galligan
93a0189936 Use 8 threads by default for VP9 encodes
BUG=https://code.google.com/p/webm/issues/detail?id=964

Change-Id: I70679d0f139b8e0962f7e19eb56b34060953e9b0
2015-03-03 17:05:17 -08:00
Frank Galligan
f5c36a5ced VP9: turn on tile-columns and frame-parallel-mode by default
Most of the current decoders use tile-based multithreading. Also
most of the current decoders need frame_parallel_decoding_mode
turned on to enable multithreaded decoding. tile-columns is
limited by resolution, so setting to max (6) is fine.

BUG=https://code.google.com/p/webm/issues/detail?id=963

Change-Id: I6e7ac3485d96bf0c69e06706cbb326dd38be0020
2015-03-03 11:20:11 -08:00
Yaowu Xu
754bbcfdc8 Fix the encoder to support profile change
Change-Id: Iefb928ad1174e274409facfb44f80265ff0f7683
2015-02-26 11:41:01 -08:00
paulwilkins
8d7f53f04c Account for rate error in GF group Q calculation.
When GF group adaptive maxQ is enabled this patch accounts
somewhat for accumulated error in the rate control.

This improves accuracy quite a bit on many clips especially
when there is  overshoot.

Examples when the overshoot and undershoot command line
parameters are set to 100:

Hall @ 1200 overshoot is reduced from 67-24%.
Akiyo @ 400 undershoot is reduced from 28%-15%.

Setting a lower value for undershoot or overshoot still
reduces the error further.

Impact on metrics is mixed with some gains in average psnr
but generally a little lower (e.g. 0.5%) on overall and ssim.

The GF group adaptation is still off by default in this patch.
Compared to with the head, enabling this mode now gives
big average psnr gains on the YT sets (e.g. YT_HD >11.2%),
a drop in overall PSNR (YT-HD 3.9%) and a smaller drop or
neutral for SSIM.

Change-Id: If4b32cd0740d3fb941317b374f9c2951954eee90
2015-02-23 10:57:27 +00:00
Yaowu Xu
a6b3e01a27 Add mutex initialization in encoder
This resolves the encoder crashes on windows.

Change-Id: I159d79014cf9279751e403936ce1f84482ae82da
2015-02-03 09:53:08 -08:00
Alex Converse
a79db92c07 Merge "Allow larger encoder configurations." 2015-02-02 12:05:56 -08:00
hkuang
be6aeadaf4 Try again to merge branch 'frame-parallel' into master branch.
In frame parallel decode, libvpx decoder decodes several frames on all
cpus in parallel fashion. If not being flushed, it will only return frame
when all the cpus are busy. If getting flushed, it will return all the
frames in the decoder. Compare with current serial decode mode in which
libvpx decoder is idle between decode calls, libvpx decoder is busy
between decode calls.

Current frame parallel decode will only speed up the decoding for frame
parallel encoded videos. For non frame parallel encoded videos, frame
parallel decode is slower than serial decode due to lack of loopfilter
worker thread.

There are still some known issues that need to be addressed. For example:
decode frame parallel videos with segmentation enabled is not right sometimes.

* frame-parallel:
  Add error handling for frame parallel decode and unit test for that.
  Fix a bug in frame parallel decode and add a unit test for that.
  Add two test vectors to test frame parallel decode.
  Add key frame seeking to webmdec and webm_video_source.
  Implement frame parallel decode for VP9.
  Increase the thread test range to cover 5, 6, 7, 8 threads.
  Fix a bug in adding frame parallel unit test.
  Add VP9 frame-parallel unit test.
  Manually pick "Make the api behavior conform to api spec." from master branch.
  Move vp9_dec_build_inter_predictors_* to decoder folder.
  Add segmentation map array for current and last frame segmentation.
  Include the right header for VP9 worker thread.
  Move vp9_thread.* to common.
  ctrl_get_reference does not need user_priv.
  Seperate the frame buffers from VP9 encoder/decoder structure.
  Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:"""
 Conflicts:
       test/codec_factory.h
       test/decode_test_driver.cc
       test/decode_test_driver.h
       test/invalid_file_test.cc
       test/test-data.sha1
       test/test.mk
       test/test_vectors.cc
       vp8/vp8_dx_iface.c
       vp9/common/vp9_alloccommon.c
       vp9/common/vp9_entropymode.c
       vp9/common/vp9_loopfilter_thread.c
       vp9/common/vp9_loopfilter_thread.h
       vp9/common/vp9_mvref_common.c
       vp9/common/vp9_onyxc_int.h
       vp9/common/vp9_reconinter.c
       vp9/decoder/vp9_decodeframe.c
       vp9/decoder/vp9_decodeframe.h
       vp9/decoder/vp9_decodemv.c
       vp9/decoder/vp9_decoder.c
       vp9/decoder/vp9_decoder.h
       vp9/encoder/vp9_encoder.c
       vp9/encoder/vp9_pickmode.c
       vp9/encoder/vp9_rdopt.c
       vp9/vp9_cx_iface.c
       vp9/vp9_dx_iface.c

This reverts commit a18da9760a.

Change-Id: I361442ffec1586d036ea2e0ee97ce4f077585f02
2015-01-30 21:00:13 -08:00
Alex Converse
797a2556eb Allow larger encoder configurations.
Allow changing colorspace in the encoder and increasing frame size.

Change-Id: I8e7c3b891af29ce420a15beb4f6f9c250245b2bb
2015-01-29 15:07:40 -08:00
Johann
a18da9760a Revert "Merge branch 'frame-parallel' to enable frame parallel decode in master branch."
This reverts commit bde04ce503

Change-Id: I053dae04c761b04a36dc239558503905a14d2470
2015-01-23 08:42:02 -08:00
hkuang
bde04ce503 Merge branch 'frame-parallel' to enable frame parallel decode in master branch.
In frame parallel decode, libvpx decoder decodes several frames on all
cpus in parallel fashion. If not being flushed, it will only return frame
when all the cpus are busy. If getting flushed, it will return all the
frames in the decoder. Compare with current serial decode mode in which
libvpx decoder is idle between decode calls, libvpx decoder is busy
between decode calls. VP9 frame parallel decode is >30% faster than serial
decode with tile parallel threading which will makes devices play 1080P
VP9 videos more easily.

* frame-parallel:
  Add error handling for frame parallel decode and unit test for that.
  Fix a bug in frame parallel decode and add a unit test for that.
  Add two test vectors to test frame parallel decode.
  Add key frame seeking to webmdec and webm_video_source.
  Implement frame parallel decode for VP9.
  Increase the thread test range to cover 5, 6, 7, 8 threads.
  Fix a bug in adding frame parallel unit test.
  Add VP9 frame-parallel unit test.
  Manually pick "Make the api behavior conform to api spec." from master branch.
  Move vp9_dec_build_inter_predictors_* to decoder folder.
  Add segmentation map array for current and last frame segmentation.
  Include the right header for VP9 worker thread.
  Move vp9_thread.* to common.
  ctrl_get_reference does not need user_priv.
  Seperate the frame buffers from VP9 encoder/decoder structure.
  Revert "Revert "Revert "Revert 3 patches from Hangyu to get Chrome to build:"""

 Conflicts:
       test/codec_factory.h
       test/decode_test_driver.cc
       test/decode_test_driver.h
       test/invalid_file_test.cc
       test/test-data.sha1
       test/test.mk
       test/test_vectors.cc
       vp8/vp8_dx_iface.c
       vp9/common/vp9_alloccommon.c
       vp9/common/vp9_entropymode.c
       vp9/common/vp9_loopfilter_thread.c
       vp9/common/vp9_loopfilter_thread.h
       vp9/common/vp9_mvref_common.c
       vp9/common/vp9_onyxc_int.h
       vp9/common/vp9_reconinter.c
       vp9/decoder/vp9_decodeframe.c
       vp9/decoder/vp9_decodeframe.h
       vp9/decoder/vp9_decodemv.c
       vp9/decoder/vp9_decoder.c
       vp9/decoder/vp9_decoder.h
       vp9/encoder/vp9_encoder.c
       vp9/encoder/vp9_pickmode.c
       vp9/encoder/vp9_rdopt.c
       vp9/vp9_cx_iface.c
       vp9/vp9_dx_iface.c

Change-Id: Ib92eb35851c172d0624970e312ed515054e5ca64
2015-01-22 18:18:53 -08:00
Alex Converse
910ca857df Allow external resize via vpx_codec_enc_config_set
Change-Id: I3d324e2baa4de2d266c5f7ca7b635b62372e90a7
2015-01-21 11:33:06 -08:00
Yaowu Xu
e94b415c34 Add encoder control for setting color space
This commit adds encoder side control for vp9 to set color space info
in the output compressed bitstream.

It also amends the "vp9_encoder_params_get_to_decoder" test to verify
the correct color space information is passed from the encoder end to
decoder end.

Change-Id: Ibf5fba2edcb2a8dc37557f6fae5c7816efa52650
2015-01-14 10:17:14 -08:00
Yaowu Xu
ce52b0f8d3 Added plumbing for setting color space
Change-Id: If64052cc6e404abc8a64a889f42930d14fad21d3
2015-01-09 10:54:25 -08:00
Yaowu Xu
ecbca31a1d Fix comments and color format
Replaced "color space" with "color format" in comments where color
sampling format is concerned, so to differentiate from the concept
defined in COLOR_SPACE.

Change-Id: I8c935034c166b24307a99352dab1686531276bb8
2015-01-09 10:36:43 -08:00
James Zern
b32ba09d35 Merge "make vp9 encoder static initializers thread safe" 2014-12-18 18:48:30 -08:00
Jim Bankoski
cd60930814 make vp9 encoder static initializers thread safe
Change-Id: If2d0888d13ebe52bc7c3b16f16319408a86ab6de
2014-12-18 15:50:46 -08:00
Yaowu Xu
a16f075375 Corrected value range of --cpu-used for vp9
This commit removes undefined value options of cpu-used for VP9 and
changed vpxenc prompt to reflect the usable range of [-8,8]

Change-Id: Ib80fef3dbb6ec9aabac45ed13e8ab6fbaf94f55e
2014-12-17 15:18:01 -08:00
Yunqing Wang
eba9c762a1 vp9_ethread: the tile-based multi-threaded encoder
Currently, VP9 supports column-tile encoding, which allows a frame
to be encoded in multiple column tiles independently. The number of
column tiles are set by encoder option "--tile-columns". This
provides a way to encode a frame in parallel.

Based on previous set of patches, this patch implemented the tile-
based multi-threaded encoder. Each thread processes one or more
tiles.

Usage:
For HD clips:
--tile-columns=2 --threads=1/2/3/4

While using 4 threads, tests showed that the encoder achieved
2.3X - 2.5X speedup at good-quality speed 3, and 2X speedup at
realtime speed 5.

Change-Id: Ied987f8f2618b1283a8643ad255e88341733c9d4
2014-12-04 11:21:34 -08:00
Adrian Grange
0d085ebc0a Prepare for dynamic frame resizing in the recode loop
Prepare for the introduction of frame-size change
logic into the recode loop.

Separated the speed dependent features into
separate static and dynamic parts, the latter being
those features that are dependent on the frame size.

Change-Id: Ia693e28c5cf069a1a7bf12e49ecf83e440e1d313
2014-11-13 11:41:20 -08:00
Deb Mukherjee
0ba1542f12 Vidyo: Support for one-pass rc-enabled SVC encoder
Adds support for one-pass rc-enabled SVC encoder with callbacks for
getting per-layer packets.
- the callback function registration is implemented as an encoder
control function.
- if the callback function is not registered, the old way of
aggregating packets with superframe will take effect.
- one more control function “VP9E_GET_SVC_LAYER_ID” has been
implemented to get the temporal/spatial id from the encoder
within the callback. This can be used to get the ids to put on RTP
packet.

Change-Id: I1a90e00135dde65da128b758e6c00b57299a111a
2014-11-10 16:08:58 -08:00
Yaowu Xu
03a60b78db Add a new control of golden frame boost in CBR mode
0 means that golden boost is off, and uses average frame target rate,
a non-zero number means the percentage of boost over average frame
bitrate is given initially to golden frames in CBR mode.

Change-Id: If4334fe2cc424b65ae0cce27f71b5561bf1e577d
2014-10-27 13:55:18 -07:00
Yaowu Xu
636099f7b6 Add a new control of max bitrate for inter frame
Change-Id: I205de3611622cff7f751ea8baf9f82784581730a
2014-10-24 10:19:28 -07:00
Paul Wilkins
6f0ae3a2d1 Extend --auto-alt-ref so it can enable multi-alt ref.
Extend --auto-alt-ref from parameter so we can use it to
turn multi-arf on and off from the command line.

For now the range is 0-off, 1-on, 2-multi-arf on.

Rename play_alternate to enable_auto_arf

Change-Id: Id7b64407cfbe76ba0090a83b588a03e22a240386
2014-10-20 16:09:37 +01:00
Minghai Shang
68b550f551 [spatial svc]Another workaround to avoid using prev_mi
We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.

Change remerged.

Change-Id: I9efab38bba7da86e056fbe8f663e711c5df38449
2014-10-16 16:09:40 +01:00
Paul Wilkins
468032961d Revert "[spatial svc]Another workaround to avoid using prev_mi"
This reverts commit c113457af9.

Temporary revert to allow clean revert of another commit.

Change-Id: Ia9b7b755e6c48e1b6e383329f121fef175a24b27
2014-10-16 15:52:08 +01:00
Minghai Shang
c113457af9 [spatial svc]Another workaround to avoid using prev_mi
We encode a empty invisible frame in front of the base layer frame to
avoid using prev_mi. Since there's a restriction for reference frame
scaling factor, we have to make it smaller and smaller gradually until
its size is 16x16.
Change-Id: I60b680314e33a60b4093cafc296465ee18169c19
2014-10-14 16:26:39 -07:00
Deb Mukherjee
d32a0c29a2 Adds some missing I440 checks
Change-Id: I034b73bb27e8023733aae63e6f8565f0a64c7267
2014-10-02 09:24:21 -07:00
Deb Mukherjee
40479dfe92 Misc. high-bit-depth fixes
Change-Id: Ie9fb6a4078eb6a3fb7c4ff1453831ab9afe23121
2014-09-30 10:37:53 -07:00
Minghai Shang
38b6aed8fd Merge "[spatial svc] Remove vpx_svc_parameters_t and the loop that sets it for each layer" 2014-09-22 14:01:24 -07:00
Minghai Shang
209ee12110 [spatial svc] Remove vpx_svc_parameters_t and the loop that sets it for each layer
vpx_svc_parameters_t contains id, resolution and min/max qp for each spatial layer.

In this change we will use extra config to send min/max qp and scaling factors, then calculate layer resolution inside encoder.

Change-Id: Ib673303266605fe803c3b067284aae5f7a25514a
2014-09-18 18:05:07 -07:00
Minghai Shang
f780b16bb8 [spatial svc] Use same golden frame for all temporal layers
Overhead goes down from 8% to 3% for 1080 60p

Change-Id: Idf3e5ca8712402a914a8cb79df17d3cdab63b163
2014-09-18 11:16:29 -07:00
JackyChen
bb1a23656c Change the control function of VP9 denoiser.
Change from VP8E_SET_NOISE_SENSITIVITY to VP9E_SET_NOISE_SENSITIVITY

Change-Id: Ia210a7029b26924e30973f0f9798a338e0412407
2014-09-12 16:34:22 -07:00
Minghai Shang
3e7b04af54 Merge "[spatial svc] Output psnr for all layers in one packet." 2014-09-12 10:52:42 -07:00
Deb Mukherjee
10783d4f3a Adds high bitdepth transform functions and tests
Adds various high bitdepth transform functions and tests.
Much of the changes are related to using typedefs tran_low_t
and tran_high_t for the final transform cofficients and intermediate
stages of the transform computation respectively rather than fixed
types int16_t/int. When vp9_highbitdepth configure flag is off,
these map tp int16_t/int32_t, but when the flag is on, they map
to int32_t/int64_t to make space for needed extra precision.

Change-Id: I3c56de79e15b904d6f655b62ffae170729befdd8
2014-09-11 19:56:33 -07:00
Minghai Shang
e3fff31aff [spatial svc] Output psnr for all layers in one packet.
Change-Id: I97d0cf095e9cfefdfa0f65eb5e96d6848cc9ffca
2014-09-11 16:21:35 -07:00
Dmitry Kovalev
02a0c51e50 Merge "Adding temp cpi var." 2014-09-05 10:31:41 -07:00
Dmitry Kovalev
7897059e8b Adding temp cpi var.
Change-Id: Ifa3c1cc2317c1bc21d1042b9662b35056d1e9ed0
2014-09-04 14:51:29 -07:00
Dmitry Kovalev
91998e638e Removing sz member from vpx_codec_priv.
Change-Id: I811526a9ee9f237604f72abe7fc677e39e0f457f
2014-09-04 14:47:42 -07:00
Dmitry Kovalev
3820f568da Merge "Consistent allocation of vpx_codec_alg_priv_t." 2014-09-03 19:41:28 -07:00
Dmitry Kovalev
b08fab8808 Consistent allocation of vpx_codec_alg_priv_t.
Change-Id: I5a03496de035fbcf31e4527cd25fcae4627a57a0
2014-09-03 11:01:21 -07:00
Minghai Shang
759afe525c Merge "[svc] Temporal svc with two pass rate control" 2014-09-03 10:51:19 -07:00
Deb Mukherjee
a4ef1a0819 Merge "Adds config opt for highbitdepth + misc. vpx" 2014-09-02 15:41:27 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
Minghai Shang
be3b08da3e [svc] Temporal svc with two pass rate control
It's built based on current spatial svc code.
We only support one spatial two temporal layers at this time.
Change-Id: I1fdc8584354b910331e626bfae60473b3b701ba1
2014-09-02 12:05:14 -07:00
Dmitry Kovalev
4c7a783e8c Merge "Adding get_frame_pkt_flags() function." 2014-09-02 10:00:51 -07:00
Dmitry Kovalev
73edeb03ea Removing alg_priv from vpx_codec_priv struct.
In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:

struct vpx_codec_ctx {
  // ...
  struct vpx_codec_priv *priv;
};

The second one is defined in vpx_codec_internal.h:

struct vpx_codec_priv {
  // ...
};

The following struct is defined 4 times for encoder/decoder VP8/VP9:

struct vpx_codec_alg_priv {
  struct vpx_codec_priv base;
  // ... 
};

Private data allocation for the given ctx:

struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;

The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.

Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
2014-08-28 13:51:37 -07:00
Dmitry Kovalev
bc9204a90e Adding get_frame_pkt_flags() function.
Change-Id: Icfacc695a711ec325b1d8f2b5d927a720e2bd6b4
2014-08-26 14:32:51 -07:00
Dmitry Kovalev
33f4e5707c Removing unused arnr_type from VP9EncoderConfig and vp9_extracfg.
Change-Id: Icab9a4399c5687453f4bec14b8cb5000464335e5
2014-08-25 23:48:52 -07:00
Dmitry Kovalev
3efb0363ed Removing non-executable code from encoder_encode().
We don't output invisible frames with VP9.

Change-Id: I7b874d3ac454c1b2966d5d7d72e12a864b49afae
2014-08-25 17:57:32 -07:00
Minghai Shang
42ad07a138 Merge "[spatial svc]Multiple frame context feature" 2014-08-25 14:29:49 -07:00
Minghai Shang
d4a407c051 [spatial svc]Multiple frame context feature
We can use one frame context for each layer so that we don't have
to reset the probs every frame. But we can't use prev_mi since we
may drop enhancement layers. So we have to generate a non vp9
compatible bitstream and modify it in the player.
1. We need to code all frames as invisible frame to let prev_mi
   not to be used. But in the bitstream we need to code the
   show_frame flag to 1 so that the publisher will know it's
   supposed to be a visible frame.
2. In the player we need to change the show_frame flag to 0 for
   all frames. Then add an one byte frame into the super frame
   to tell the decoder which layer we want to show.
Change-Id: I75b7304cf31f0ab952f043e33c034495e88f01f3
2014-08-25 10:02:45 -07:00
Dmitry Kovalev
8d363882fd Choosing GOOD mode by default.
This patch fixes slow first pass problem. Mode could only be determined
from the deadline value during frame encode call. Unfortunately, we use
mode value before any encode calls during the first pass encoding (see
set_speed_features() logic). The mode for the first pass must be different
from BEST to make first pass fast.

Change-Id: I562a7d32004ff631695d91c09a44d8a9076fd6b5
2014-08-22 15:46:25 -07:00
Jim Bankoski
75290d9bc3 vp9_cx_iface.c: spatial_svc resolve missing initializer warning
Change-Id: I3f56a4d64828a74c370a5b3247a5f00e554a922c
2014-08-22 13:36:41 -07:00
Dmitry Kovalev
c72f0ee35b Removing output_pkt_list and pkt_list from config structs.
Change-Id: Id21f1e77f1d030fbe3f5f30486d2a7ecb2bccdf5
2014-08-21 11:13:25 -07:00
Dmitry Kovalev
df083b266a Merge "Removing extraconfig_map from vp9_cx_iface.c." 2014-08-21 11:10:13 -07:00
Dmitry Kovalev
eafa7126a0 Merge "Replacing NOT_IMPLMENTED with NULL." 2014-08-21 11:10:00 -07:00
Dmitry Kovalev
cd6d9846b0 Replacing NOT_IMPLMENTED with NULL.
We don’t need to introduce new macro for the null value.

Change-Id: I59dbae25feeebb4e8359095801aecc8bb17d7764
2014-08-20 17:16:28 -07:00
Dmitry Kovalev
f2e652396f Removing iface pointer from vpx_codec_priv.
The iface pointer is already in vpx_codec_ctx struct.

Change-Id: I9fffe27c613a7c94476f185a1e5a53ff6d99f1c6
2014-08-20 12:31:19 -07:00
Dmitry Kovalev
9988b9b164 Merge "Converting MODE to be just BEST, GOOD, and REALTIME." 2014-08-20 11:03:03 -07:00
Dmitry Kovalev
d4adf25d96 Removing extraconfig_map from vp9_cx_iface.c.
We have just one default set of extra config values, g_usage is
never used with VP9.

Change-Id: I0f1939b0a2da4522a87a393d85be8c8acf7f364c
2014-08-19 15:59:12 -07:00
Dmitry Kovalev
87ee096117 Adding set_rc_buffer_sizes().
Change-Id: I76aab1e4f56a790597104b5c9b0d3543d6982eae
2014-08-19 11:33:36 -07:00
Dmitry Kovalev
215151b78d Converting MODE to be just BEST, GOOD, and REALTIME.
After that change oxcf->pass and oxcf->mode become two orthogonal variables.

Change-Id: I1501f83cd2805480e8118135e6d4045fb41e26d5
2014-08-19 10:37:12 -07:00
Dmitry Kovalev
480693b995 Merge "Moving framerate from VP9EncoderConfig to VP9_COMP." 2014-08-14 18:26:35 -07:00
James Zern
8910cf8d69 Merge "Fix a run-time integer overflow" 2014-08-12 19:21:20 -07:00
Yaowu Xu
3011c53d36 Fix a run-time integer overflow
Change-Id: I87255d8a25ef8c7d235cbf3c8887d7bed7892cfe
2014-08-12 16:49:07 -07:00
Minghai Shang
136a022d71 [spatial svc]Remove CONFIG_SPATIAL_SVC for ss_enable_auto_alt_ref in vpx_codec_enc_cfg to fix heap-overflow issue in asan config
Change-Id: Icdf08501db5f416285f751d316941dfacd2c69ba
2014-08-11 13:43:25 -07:00
Dmitry Kovalev
6e5149b68d Merge "Moving pass from VP9_COMP to VP9EncoderConfig." 2014-08-08 16:07:47 -07:00
Adrian Grange
a334cb0b7d Merge "Common encode/decode function to get reference frame" 2014-08-08 15:56:18 -07:00
Dmitry Kovalev
5a78c40657 Moving framerate from VP9EncoderConfig to VP9_COMP.
Framerate changes over time, VP9EncoderConfig supposed to have static
read-only data.

Change-Id: I36580a7ee71243c1eabb57691089691731d03e67
2014-08-08 15:29:37 -07:00
Dmitry Kovalev
9a4cd41793 Merge "Removing legacy XMA features from libvpx." 2014-08-08 14:58:23 -07:00
Dmitry Kovalev
91c2f1e45a Moving pass from VP9_COMP to VP9EncoderConfig.
We had a very complicated way to initialize cpi->pass from
cfg->g_pass:
switch (cfg->g_pass) {
  case VPX_RC_ONE_PASS:
    oxcf->mode = ONE_PASS_GOOD;
    break;
  case VPX_RC_FIRST_PASS:
    oxcf->mode = TWO_PASS_FIRST;
    break;
  case VPX_RC_LAST_PASS:
    oxcf->mode = TWO_PASS_SECOND_BEST;
    break;
}

cpi->pass = get_pass(oxcf->mode).

Now pass is moved to VP9EncoderConfig and initialization is simple:
switch (cfg->g_pass) {
  case VPX_RC_ONE_PASS:
    oxcf->pass = 0;
    break;
  case VPX_RC_FIRST_PASS:
    oxcf->pass = 1;
    break;
  case VPX_RC_LAST_PASS:
    oxcf->pass = 2;
    break;
}

Change-Id: I8f582203a4575f5e39b071598484a8ad2b72e0d9
2014-08-08 14:27:54 -07:00
Adrian Grange
1ebf52df2c Common encode/decode function to get reference frame
Replaced encoder and decoder functions to get a pointer
to a reference frame with a common function, vp9_get_ref_frame,
and simplified it.

Change-Id: Icb206fcce8caace3bfd1db3dbfa318dde79043ee
2014-08-08 11:37:11 -07:00
Alex Converse
4db5605bdb Merge "vp9_cx_iface.c: warning missing default" 2014-08-07 10:53:01 -07:00
Dmitry Kovalev
ae249d8602 Merge "Adding ticks <-> timebase units conversion functions." 2014-08-07 10:18:08 -07:00
Jim Bankoski
9ba1254317 vp9_cx_iface.c: warning missing default
Change-Id: I18cbdad6031d14d4c1a818c0ab33bbedf7b33e19
2014-08-07 06:53:24 -07:00
Minghai Shang
390ad737b8 [spatial svc]Add is_spatial_svc() helper function.
Change-Id: Ice5376100d8e27cbdaddfd3cd06898cedd2720fe
2014-08-06 15:20:51 -07:00
Dmitry Kovalev
545c324971 Adding ticks <-> timebase units conversion functions.
Change-Id: I75abd57367a7974a9fab8a727b2bbc54dea428c3
2014-08-06 14:58:53 -07:00
Alex Converse
82eed664f3 Write VP9E_SET_TUNE_CONTENT to the correct location.
Change-Id: Ie8c976ececc79fd58c6eb16b7add053dc58e3bb8
2014-08-06 10:59:16 -07:00
Dmitry Kovalev
a42b5c2ffc Removing legacy XMA features from libvpx.
Change-Id: I60ffee7cf78e748792fa6d109322ec32f92e40a9
2014-08-05 16:34:09 -07:00
Alex Converse
572de92991 Add a codec control option to tune for screen content.
Change-Id: I12b0b0a06750cb9a5f1bdc3368deb44137acc9a3
2014-08-05 15:23:45 -07:00
Jim Bankoski
7f63dabfe9 break at the end of clauses with assert(0) to avoid gcc warning
Change-Id: I1b3c5337f018dde27dc819ab18bd081d169a91e8
2014-08-04 08:52:53 -07:00
James Zern
bd72aa712b Merge "Changes interface to avoid uninitialized warnings in vp9_cx_iface.c." 2014-07-31 11:53:56 -07:00
Jim Bankoski
8a774e14ff Changes interface to avoid uninitialized warnings in vp9_cx_iface.c.
Change-Id: I1092239e21c1cde188ee2dcb765f4c6fc8c5cdec
2014-07-31 06:27:57 -07:00
James Zern
d1403eafb5 Merge "vp9_cx_iface: defer compressed data buffer alloc" 2014-07-30 12:03:45 -07:00
James Zern
c2c02510bd vp9_cx_iface: defer compressed data buffer alloc
currently the only way to know if multiple alt-refs are enabled is to
inspect the encoder instance.
this reduces the size of the allocation by 75% when not using multiple
alt-refs

Change-Id: Ie4baa240c2897e64b766c6ad229674884b5a65b6
2014-07-29 15:01:36 -07:00
Minghai Shang
24c9d6ad43 [spatial svc]Use #if instead of #ifdef on macro CONFIG_SPATIAL_SVC
Change-Id: Ifc94377a0d05d66e3d21b007893a985b66db6082
2014-07-22 11:11:55 -07:00
Minghai Shang
e7135e9d1c [spatial svc]Fix signed/unsigned mismatch error
Change-Id: I5e3b8b1b151bc14416577f85434182cba2302679
2014-07-15 11:22:28 -07:00
Pengchong Jin
f349b071c6 Rewrite functions related to first pass block stats
Change-Id: I28679f88e2911b06eef5cbc83ecb62b8c69e4c53
2014-07-14 17:45:27 -07:00
Minghai Shang
e899859c48 [spatial svc]Implement alt reference frames
All changes are for spatial svc only.
1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer
2. Use golden reference idx for spatial reference
3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers
4. Add "auto-alt-refs" in svc options
Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
2014-07-14 11:24:17 -07:00
Guillaume Martres
113dbf8d1e vp9_cx_iface.c: allow speed greater than 7
This makes it possible to use --rt --cpu-used=8.

Change-Id: I8b5bc4449b6e05d24d25145e35b4793501268c59
2014-07-08 15:58:42 +02:00
hkuang
28a794f680 Seperate the frame buffers from VP9 encoder/decoder structure.
Prepare for frame parallel decoding, the frame buffers must be
separated from the encoder and decoder structure, while the encoder
and decoder will hold the pointer of the BufferPool.

Change-Id: I172c78f876e41fb5aea11be5f632adadf2a6f466
2014-07-02 15:34:20 -07:00
Minghai Shang
277338f748 [spatial svc]Implement lag in frames for spatial svc
Change-Id: I930dced169c9d53f8044d2754a04332138347409
2014-06-24 14:01:17 -07:00
Dmitry Kovalev
bcfbd2f948 Replacing RC_MODE with vpx_rc_mode.
Both enums are identical.
Change-Id: I06653f9c90a2d3a2dd5c741e75b17ee7d066a56f
2014-06-13 12:22:35 -07:00
Dmitry Kovalev
3a1625614d Merge "Removing lossless field from VP9EncoderConfig." 2014-06-03 16:46:22 -07:00
Dmitry Kovalev
1cdc238902 Adding buffer levels to RATE_CONTROL struct.
Change-Id: Ib35ff854378764dc3c6745844c67a33dee545663
2014-06-03 13:56:46 -07:00
Dmitry Kovalev
bd0bb363bd Removing lossless field from VP9EncoderConfig.
Right now there is just one place to check: xd->lossless and for the first
pass there is a function is_lossless_requested().

Change-Id: I949a6834e64ce51e422e2892f097f2b871b5429a
2014-06-03 12:52:49 -07:00
Dmitry Kovalev
852fcbcc68 Fixing -Wextra warnings in vp9_{cx, dx}_iface.c.
Change-Id: I0abad32551dc534d3db27424c118e4b2f6b50f37
2014-05-28 11:15:43 -07:00
Deb Mukherjee
5c93c580f8 Removing undeclared identifier - build fix
Fixes build with --enable-internal-stats

Change-Id: I137169c859f561478e45891defe976d595454166
2014-05-27 23:24:06 -07:00
Dmitry Kovalev
0becfe42bb Merge "Removing ctrl_id parameter from vpx_codec_control_fn_t." 2014-05-27 17:35:38 -07:00
Dmitry Kovalev
8a8b662eaa Removing ctrl_id parameter from vpx_codec_control_fn_t.
Change-Id: I2b61c8c17ded1074dea92b4f6ad9be84d128b52a
2014-05-27 16:45:58 -07:00