Commit Graph

81 Commits

Author SHA1 Message Date
Alex Converse
29a487c77f Add a conservative RD based active map in vp9.
Change-Id: I47b3c38aadfd8f3ea08515a18a5948aa1375c650
2014-03-10 15:48:43 -07:00
Dmitry Kovalev
ab1f905438 Cleaning up rd_pick_sb_modes() function.
Changing aq_mode type from int to AQ_MODE enum.

Change-Id: Ib7b5f0b70d02ded58a31dfade9c05a347f73beca
2014-03-10 10:58:32 -07:00
Dmitry Kovalev
3f1ab25812 Removing vp9_onyx.h and moving its content to the encoder.
Change-Id: I03451c88536bc498edddbe0cd9773ff79da085c2
2014-03-05 23:33:22 -08:00
Dmitry Kovalev
fe7b1d0a8d Removing VP9_PTR.
Change-Id: Ib49d8dbc67c590f22a1a70251ff607c9f38febd7
2014-03-03 16:50:16 -08:00
Paul Wilkins
fdc73955f0 Silence int64 to int warning
Change-Id: Ic97ddd5143425a7b63fac4e40d9740a10a0491ad
2014-03-03 15:30:13 +00:00
Minghai Shang
8c196b27b3 [svc] Add target bitrate settings for each layers.
Change-Id: Ia7677fb436667bc4f76db71f65e4784f433f7826
2014-02-26 13:30:50 -08:00
Yaowu Xu
f1633e5844 Merge "Remove an unused variable" 2014-02-21 22:44:05 -08:00
Yaowu Xu
c58e1c7be9 Remove an unused variable
Change-Id: I8eeec70a7d4403243762f14d0b560792801645e8
2014-02-20 14:49:44 -08:00
Jingning Han
aa7c495472 Rename vp8_cfg to vp9_cfg in vp9_cx_iface
This variable takes control parameters for vp9 encoder, hence
renamed vp9_cfg.

Change-Id: I9b253c41a06e44d97fe699f26005cd71e2eeb36c
2014-02-19 13:46:48 -08:00
Jim Bankoski
24025c0477 vp9_cx_iface vp9_dx_iface vpxdec vs warnings
Change-Id: I747982e7d1157a8b45f4034ddf207306f9f957e0
2014-02-15 09:14:02 -08:00
Tom Finegan
ad2fa5e7d5 vp9/vp9_cx_iface: Silence ts_number_layers MSVC warnings
Silence signed/unsigned mismatch warnings by adding casts where
ts_number_layers does not match the sign of the variable to which
it is being compared.

Change-Id: Iab25e18c877d158b2b2b417de7da94669648b2fa
2014-02-13 11:41:16 -08:00
Adrian Grange
896a9ab934 Minor cleanup.
Change-Id: I6ef0ce5371ed9e2a415dd8c08c93ad603f0ad7b2
2014-02-12 09:18:00 -08:00
James Zern
ab4b17a4d4 Merge "Remove unnecessary local variables." 2014-02-07 16:45:24 -08:00
Adrian Grange
f0e896c120 Merge "Remove out of date comment." 2014-02-06 13:40:42 -08:00
Adrian Grange
37d7cb607e Remove unnecessary local variables.
Change-Id: I1cdcd847f258967534ef30ba15894b486f1519a8
2014-02-06 13:38:00 -08:00
Marco Paniconi
4864ab21b0 Layer based rate control for CBR mode.
This patch adds a buffer-based rate control for temporal layers,
under CBR mode.

Added vpx_temporal_scalable_patters.c encoder for testing temporal
layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns).

Updated datarate unittest with tests for temporal layer rate-targeting.

Change-Id: I8900a854288b9354d9c697cfeb0243a9fd6790b1
2014-02-06 09:24:45 -08:00
Adrian Grange
aa77872be7 Remove out of date comment.
Change-Id: I8c993cf0881cd77c34a4efe7ba1d067cd28c6105
2014-02-05 15:37:24 -08:00
Adrian Grange
2554d5731a Remove delete_first_pass_file.
Change-Id: If46d93fb1c26e4629af1f492bfad7a82b4c4f778
2014-02-05 11:31:44 -08:00
Marco Paniconi
7ec838edc4 Revert "Layer based rate control for CBR mode."
This reverts commit 6be2b750b8

Change-Id: Ic52acd98b37c3ba49d4999b463389eb564f49c4b
2014-02-03 12:28:32 -08:00
Marco Paniconi
6be2b750b8 Layer based rate control for CBR mode.
This patch adds a buffer-based rate control for temporal layers,
under CBR mode.

Added vpx_temporal_scalable_patters.c encoder for testing temporal
layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns).

Updated datarate unittest with tests for temporal layer rate-targeting.

Change-Id: I9cb6cce2494390ae6096ee17774af7fb9308bde7
2014-02-02 14:30:43 -08:00
Jim Bankoski
ea8aaf15b5 create super fast rtc mode
This patch only works if the video is a width and height that are both
a multiple of 32..   It sets every partition to 16x16, and does INTRADC
only on the first frame and ZEROMV on every other frame.   It always does
does the largest possible transform, and loop filter level is set to 4.

Was ~20% faster than speed -5 of vp8

Now 20% slower but adds motion search ( every block ), nearest, near
and zeromv

The SVC test was changed because - while this realtime mode produces
bad quality albeit quickly, it isn't obeying all the rules it should
about which frames are available.

Change-Id: I235c0b22573957986d41497dfb84568ec1dec8c7
2014-01-29 08:39:39 -08:00
Adrian Grange
82f6af6009 Tidy up comments & remove commented out code.
Change-Id: I46dd5ce06f36362c6274511cd1531d93926aa9bc
2014-01-22 09:59:01 -08:00
Dmitry Kovalev
c8e8d3a461 Merge "Renaming 'Sharpness' to 'sharpness'." 2014-01-09 13:42:55 -08:00
Dmitry Kovalev
962c8b241e Renaming 'Mode' to 'mode'.
Change-Id: I6cdd670d66288dbd66228f38bba6b30502d25362
2014-01-08 14:33:59 -08:00
Dmitry Kovalev
57be81369a Renaming 'Sharpness' to 'sharpness'.
Change-Id: I54513dc3b3321e0c0bb6b15ea5c34085ed80b4a4
2014-01-08 14:19:14 -08:00
Dmitry Kovalev
116e0a1ab7 Removing vpx_codec_vp9x_cx and internal experimental flag.
vpx_codec_vp9x_cx is not used internally. Experimental flag from
vp9_extracfg is also not really used. YUV 4:4:4 just works after these
changes (you have to specify --profile=1 for the encoder).

Change-Id: Ib1c8461d0d19d159827e005efe868f891eea0140
2013-12-27 14:01:12 -08:00
Marco Paniconi
1b8b8b0d0d Updates for 1-pass CBR rate control.
Adjustments based on buffer level, frame dropper.

Change-Id: Iaa85b570493526a60c4b9fb7ded4c0226b1b3a33
2013-12-18 09:24:24 -08:00
James Zern
178db94cd6 vp9 asserts: fix compile warning
string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
2013-12-12 19:49:19 -08:00
Deb Mukherjee
e33855cc47 Changes interfaces to vp9_get_compressed_data fn
Silences some lint warnings in previous patches

Change-Id: I04bf47ebe7e63a95fd322719a3154e589c115d78
2013-12-11 14:22:51 -08:00
Yaowu Xu
d84c098417 Disable --tune=ssim for vp9
The feature is not yet supported.

Change-Id: If46382302d2077b20670391b4a03017045a104f5
2013-12-04 12:39:15 -08:00
Guillaume Martres
17084657e6 vpxenc: add --aq-mode flag to control adaptive quantization
Change-Id: I57e1ad4bed3487df12893ced77c49093f8755706
2013-11-15 19:42:20 +01:00
Ivan Maltz
741c14fcf0 Merge "Move SVC per-frame loop from sample app into libvpx proper" 2013-11-06 17:24:05 -08:00
Ivan Maltz
1ed0e1beb5 Move SVC per-frame loop from sample app into libvpx proper
SVC multiple layer per frame encoding is invoked with vpx_svc_init and
vpx_svc_encode. These interfaces are designed to be invoked from ffmpeg.
Additional improvements:
- make dummy frame handling a bit more explicit
- fixed bug with single layer encodes
- track individual frame sizes and psnrs instead of averages
- parameterized quantizer, 16th scalefactors, more logging,
- enabled single layer encodes to generate baseline
- include new mode for 3 layer I frame with 5 total layers

Change-Id: I46cfa600d102e208c6af8acd6132e0cc25cda8d4
2013-11-06 14:49:27 -08:00
Dmitry Kovalev
cd94eee45f Fixing clang warning.
Warning was: "implicit conversion from enumeration type 'VPX_SCALING_MODE'
(aka 'enum vpx_scaling_mode_1d') to different enumeration type
'VPX_SCALING'".

Change-Id: I45689e439a8775bc1e7534d0ea1ff7c729f2c7f5
2013-10-29 14:50:27 -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
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
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
Marco Paniconi
e078c3d854 Initial 1-pass.
Change-Id: I58c5436f5c95f6012fb2891cd2a02f76e4870b6a
2013-10-16 12:04:29 -07:00
Jingning Han
f0772dc5b8 Fix typo in comment message
Change-Id: Ifef756a3a91423bb9f5411f06fa092027be21ecf
2013-10-10 12:17:10 -07:00
Jim Bankoski
fa7dbab3fe cpplint issues resolved vp9/vp9_cx_iface.c
Change-Id: I4f66d6f1aebe7d47ad01cda9b03c600725240680
2013-10-04 17:16:20 -07:00
Dmitry Kovalev
794a7ccd78 Fixing warning generated by gcc.
vp9/vp9_cx_iface.c:92: warning: type qualifiers ignored on function
return type

Change-Id: I6f130e280e2db261506a4af8ce11fc788ad13198
2013-09-26 10:33:21 -07:00
Deb Mukherjee
d11221f433 Improves constant qual, constrained qual turned on
Adds modeled functions to decide the qp for altref frames in constant q
mode similar to other functions in use in bitrate mode.

Also turns on the constrained quality mode (end-usage=2) option which
was turned off before. Basic testing shows the mode works in principle,
to cap bitrate to the target-bitrate specified, while allowing lower
bitrate depending on the cq-level specified. The mode will need to be
improved over time.

Results for constant quality vs bitrate control mode:
derfraw300/fullderfraw: +3.0% at constant quality over bitrate control.
fullstdhdraw: +4.341%
stdhdraw250: +5.361%

Change-Id: If5027c9ec66c8e88d33e47062c6cb84a07b1cda9
2013-09-22 23:04:50 -07:00
Yaowu Xu
014acfa2af fix integer overflow errors
Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
2013-09-19 08:14:26 -07:00
Yaowu Xu
a783da80e7 Silence a bunch of MSVC warnings
Change-Id: I16633269582a640809dca27572bbe99efa6369fc
2013-09-17 12:08:51 -07:00
Jim Bankoski
e7f2aa0fb8 clang warnings : ref frame enum mismatch
Convert from refframe_type_t to VP9_REFFRAME

Change-Id: Iff4043c3fdb3e1c9c2b412bdffd5da8ed913ec13
2013-09-12 06:29:07 -07:00
Ivan Maltz
20abe595ec Merge "API extensions and sample app for spacial scalable encoder" 2013-09-09 16:57:01 -07:00
Ivan Maltz
01b35c3c16 API extensions and sample app for spacial scalable encoder
Sample app: vp9_spatial_scalable_encoder
vpx_codec_control extensions:
  VP9E_SET_SVC
  VP9E_SET_WIDTH, VP9E_SET_HEIGHT, VP9E_SET_LAYER
  VP9E_SET_MIN_Q, VP9E_SET_MAX_Q
expanded buffer size for vp9_convolve

modified setting of initial width in vp9_onyx_if.c so that layer size
can be set prior to initial encode

Default number of layers set to 3 (VPX_SS_DEFAULT_LAYERS)
Number of layers set explicitly in vpx_codec_enc_cfg.ss_number_layers

Change-Id: I2c7a6fe6d665113671337032f7ad032430ac4197
2013-09-09 15:57:56 -07:00
Deb Mukherjee
e378a89bd6 Support a constant quality mode in VP9
Adds a new end-usage option for constant quality encoding in vpx. This
first version implemented for VP9, encodes all regular inter frames
using the quality specified in the --cq-level= option, while encoding
all key frames and golden/altref frames at a quality better than that.

The current performance on derfraw300 is +0.910% up from bitrate control,
but achieved without multiple recode loops per frame.

The decision for qp for each altref/golden/key frame will be improved
in subsequent patches based on better use of stats from the first pass.
Further, the qp for regular inter frames may also be varied around the
provided cq-level.

Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-09-06 10:30:53 -07:00
Jim Bankoski
79401542f7 make vp9 postproc a config option
Vp9 postproc is disabled for now as its not been shown to help and
may be merged with vp8.

Change-Id: I25620d6cd34c6e10331b18c7b5ef7482e39c6057
2013-09-04 10:02:08 -07:00
Deb Mukherjee
0d8723f8d5 Make "good" quality 2-pass vpxenc encoding default
Currently, the best quality mode in VP9 is not very well developed,
and unnecessarily makes the encode too slow. Hence the command line
default is changed to "good" quality. Also, the number of passes
default is changed to 2 passes as well, since 1-pass encoding is
not very efficient in VP9.

Besides, a number of VP9 defaults are set to the currently
recommended settings. With these changes, vpxenc
run with --codec=vp9 --kf-max-dist=9999 --cpu-used=0 should
work about the same as our borg results.
Note when the --cpu-used=0 option is dropped there will be a slight
difference in the output, because of a difference in the cpu-used
value for the first pass. Specifically, the default when unspecified
is to use cpu_used=1 for the first pass and cpu_used=0 for the
second pass. But when specified, both passes will use the cpu-used
value specified.

Note that this also changes the default for VP8 as being "good"
but other options stay unchanged.

Change-Id: Ib23c1a05ae2f36ee076c0e34403efbda518c5066
2013-08-21 12:41:26 -07:00