Commit Graph

229 Commits

Author SHA1 Message Date
Johann
8276005eba temporal svc: zero layer_target_bitrate
These values are set in main() from user input. Ensure
they are cleared out first.

Clears a static analysis warning:
warning: The right operand of '*' is a garbage value
1000.0 * rc->layer_target_bitrate[0] / rc->layer_framerate[0];

Change-Id: I09bd209be5aff31b87597a24d37a9673fa99381b
2018-03-14 13:56:39 -07:00
Johann
f0a3979063 spatial svc: zero sizes
This should be taken care of by parse_superframe_index but
the static analysis is not recognizing it because it depends
on 'marker' which is read from the bitstream.

Clears a static analysis warning:
The right operand of '*' is a garbage value
rc.layer_encoding_bitrate[layer] += 8.0 * sizes[sl];

Change-Id: I8ee48a98f907bc7b46869fd27a351f33e2e7de71
2018-03-13 18:22:50 -07:00
Johann
b0d57f682d spatial svc: remove vpx_svc_get_message
Print error messages as they are encountered. This was the default
behavior.

Removes a static analysis warning regarding the use of strncat:
Null pointer argument in call to string length function

As this is the only use of strncat in the library, remove it and the
associated public function.

Change-Id: Id55305c5a4d65f11da88c3a2203ff824200f526f
2018-03-13 17:58:24 -07:00
Johann
6f9163db95 spatial svc: remove unused locals
Clears static analysis warning:
Value stored to 'tl' is never read

Change-Id: If047a74f508288c63d5b83ed0f3ad34f791f9312
2018-03-13 17:12:35 -07:00
Johann
7b278e3072 spatial svc: rescope sl
sl was passed to set_frame_flags_bypass_mode, triggering
an uninitialized variable warning. Inside the function it
is only used as a local variable.

Change-Id: If743626e9e10fd41d135e3b4ad6196dc4dc90172
2018-03-13 14:38:05 -07:00
Jerome Jiang
4410d729d1 VP9 ROI: Fix errors in example encoder.
Fix some errors in the vpx_temporal_svc_encoder.

Change-Id: Id93f449364dcf72c826ca931df3c8c3d3b80100f
2018-02-09 14:47:00 -08:00
Jerome Jiang
46adbc4af8 Reland "Add ROI support for VP9."
Extended ROI struct suitable for VP9.
ROI input from user is passed into internal struct and applied on every frame
(except key frame).

Enabled usage of all 4 VP9 segment features (delta_qp, delta_lf, skip,
ref_frame) via the ROI map input.
Made changes to nonrd_pickmode for the ref_frame feature.

Only works for realtime speed >= 5.
AQ_MODE needs to be turned off for ROI to take effect.

Change example in the sample encoder: vpx_temporal_svc_encoder.c to be suitable
for VP9.
Add datarate test.

Bump up ABI version.

BUG=webm:1470

Change-Id: I663b8c89862328646f4cc6119752b66efc5dc9ac
2018-02-09 10:55:46 -08:00
Marco Paniconi
efa786d464 vp9 svc: Make top layer non-ref: for 2 TL case
Only affects 2 temporal layer case.
Modified the flags for 2 temporal layers to make
top layer (top spatial, top temporal) a non-reference
frame, conistent with the 3 TL case.

Add mismatch check to the datarate test of changing
svc pattern on the fly, which is test for 2 temporal
layers.

This re-applies the change: 254e2f5501,
that was reverted in: 658eb1d675.

Change-Id: Ib5fd4a7a0312c0c05329ae75baac480af34b4694
2018-01-31 09:17:43 -08:00
Marco Paniconi
7edd1a6cea Revert "vp9 svc: fix to make top layer frame non-ref"
This reverts commit 254e2f5501.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> vp9 svc: fix to make top layer frame non-ref
> 
> Add mismatch check to the datarate test of changing svc pattern on the
> fly.
> 
> Change-Id: I6a878736de44e6a40c077ed6430aabd7fadabdd9

TBR=marpan@google.com,builds@webmproject.org,jianj@google.com

Change-Id: Ibcb600438098f8dc380fe7e1de90cb81fc367468
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
2018-01-31 16:49:16 +00:00
Jerome Jiang
254e2f5501 vp9 svc: fix to make top layer frame non-ref
Add mismatch check to the datarate test of changing svc pattern on the
fly.

Change-Id: I6a878736de44e6a40c077ed6430aabd7fadabdd9
2018-01-29 18:38:46 -08:00
Marco
43caed4e42 vp9: Fix to vp9_svc sample encoder for bypass mode.
This fix makes it bitexact to the default SVC pattern,
for the example 2 temporal layer case.

Change-Id: I4df2063b70f7aecbfc7082f29c8439e05f6db8ac
2018-01-24 15:21:59 -08:00
Johann
e1c69544b1 clang-format v5.0.0 examples/
Attempts to group () expression on their own line.

Change-Id: I404f9dd1a91aaa2100925c90162bcdefbead5ad2
2018-01-12 09:15:10 -08:00
Jerome Jiang
c1e511fd82 vp9 svc: Allow denoising next to highest resolution.
Denoise 2 spatial layes at most.

Add noise sensitivity level 2 for vp9 such that applications can control
whether to denoise the second highest spatial layer.

Add tests to cover this case.

Change-Id: Ic327d14b29adeba3f0dae547629f43b98d22997f
2017-12-11 15:20:19 -08:00
James Zern
5044779e77 decouple spatial-svc from encoder abi
this is only meant for testing. along with --enable-experimental
--enable-spatial-svc require VPX_TEST_SPATIAL_SVC to be defined rather
than bumping the encoder ABI.

Change-Id: I7f34d9f60300fa31ccf22e1a4aa619392c391b2e
2017-11-30 10:52:25 -08:00
Jerome Jiang
f49360d740 vp8 simulcast: fix compile warnings.
Clean up some prints.

Change-Id: I199350e34a8b6fbff9601fcbd11ec68d24da5073
2017-11-20 16:18:31 -08:00
Jerome Jiang
8b7a6ca60a vp9 svc: fix a few compile warnings.
Change-Id: I4cb878600038066513ab73f3658990d1245ff2fb
2017-11-17 14:40:05 -08:00
Jerome Jiang
dbb8926b86 vp8: Enable use of ROI map.
Disable cyclic refresh if ROI is used and add flag to properly handle
the static_thresh deltas.
Remove the ROI test for cyclic refresh (it's allowed but disabled if ROI
is used).
Add an example in vpx_temporal_svc_encoder.c. Turned off by default.

BUG=webm:1470

Change-Id: Ief9ba1d7f967bc00511b412b491c3f70943bfbda
2017-10-17 15:23:03 -07:00
Marco
23eccb3ca7 SVC: Add setting for max_intra_rate_pct in sample encoder.
Set it as default to 900.

Change-Id: Id2d990925dccff1f6762411c66ea95973440c92f
2017-09-25 13:39:18 -07:00
clang-format
7587a97551 apply clang-format
Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c
2017-09-01 01:24:03 -07:00
Jerome Jiang
2caff16151 vp9 svc: Fix the stats output when sl = 1.
Actual frame size and bitrate is all 0 when using SVC sample encoder
with sl = 1 because the stats are set in parse_superframe_index which
will not caculate properly when sl = 1 since there is no superframe.

Use pkt->data.frame.sz instead when sl = 1.

Change-Id: I93f5e98a4c779e32b007e1564ba5396af9e34ad6
2017-08-14 12:00:00 -07:00
Marco
8c7a60e04d vp8: Fix compile warning in vp8_multi_resolution_encoder.c
Change-Id: I49c960179dfc1902aa5e5c99915789878c06bc3d
2017-07-20 14:19:43 -07:00
Marco
492d52b9cc vp9: Adjust key-frame pars in vpx_temporal_svc_encoder.
Sample encoder change: reduce max-intra-rate to 1000 and
buf-initial to 600. Paramaters affect target size of key frame.

Change-Id: I2be6bc2927f5fa74e19e1efa3fb574d23a503300
2017-06-20 12:22:03 -07:00
Marco
ae3a173352 vp9: Adjust key-frame pars in vpx_temporal_svc_encoder.
Sample encoder change: reduce max-intra-rate to 1500 and
buf-initial to 700. Paramaters affect target size of key frame.

Change-Id: I01e238378b63eeef28dfc2178baadffcd3cc7561
2017-06-20 09:08:13 -07:00
Marco
b55240057f vp9: Adjust key-frame pars in vpx_temporal_svc_encoder.
Adjust some parameters in sample encoder: vpx_temporal_svc_encoder.
Parameters adjusted to set lower QP for initial key frame,
and allow for larger target size on subsequent key frames.

Change-Id: I092ad968e5b51b9f495dadb6ee96e810663c910e
2017-06-19 18:29:39 -07:00
Marco
13b02a8efe vp9: SVC: Enable row-mt in sample encoder.
Change-Id: I4b51043cb3f5955efe947fe4685aed4a21adb8bd
2017-06-07 10:32:44 -07:00
Jerome Jiang
2fa7092808 Merge "vp9: Enable row multithreading for SVC in real-time mode." 2017-03-14 23:29:46 +00:00
Marco
169c846575 vp9: Sample encoder vpx_temporal_svc_encoder: enable row-mt
Enable row-mt in the sample encoder vpx_temporal_svc_encoder.c,
under certain condiitons.

Change-Id: Ic103ee81a9d80be5bf6e5778cc21fc3199db909d
2017-03-10 10:11:39 -08:00
Marco
ffb3c50da1 vp9: Enable row multithreading for SVC in real-time mode.
Enable row-mt for SVC for real-time mode, speed >=5.

Add the controls to the sample encoders, but keep it off for now.
Add the control and enable it for the 1 pass CBR unittests.

For speed 7, 3 layer SVC, 2 threads, row-mt enabled gives about ~5% speedup.

Change-Id: Ie8e77323c17263e3e7a7b9858aec12a3a93ec0c1
2017-03-10 01:01:07 +00:00
Marco
97b6a6f037 vp9: Add control to vpx_temporal_svc_encoder for row-mt.
Keep it off as default for now.

Change-Id: Ia2518a8ce96c9735c3fe67215dde25a35e8620af
2017-03-08 16:03:44 -08:00
Jerome Jiang
2865de86ec vpx_temporal_svc_encoder: Expose error resilient control to cmd line.
Change-Id: Ic74a8690b136ffbc370080f70b2d5a6b1572bf63
2017-02-15 21:45:52 +00:00
Marco
bf5cdbdf9d vp9: Add some controls to sample encoder: vpx_temporal_svc_encoder
Add the gf boost and frame_parallel controls.
Set as default to off.

Change-Id: Id85fcb16a4fae97f51c09e9ebadb5cdcd510c2f5
2017-01-06 11:34:04 -08:00
Marco
cd6f742980 vp8 multi_res_encoder: Ajust some settings in sample encoder.
Set #threads to default 1 for all streams, change bit allocaton
for 3 temporal layers, and enable denoiser on middle resolution layer.

Change-Id: I4a57adbfdb2c319002b8f3cf359613842dc00d75
2016-12-08 15:27:16 -08:00
Marco
5778a7c9cb vp9: Fix some TODOs in svc code.
Change-Id: Ie9f441245987ade9dab38af69adf4dd1fb38ca3f
2016-12-07 13:02:48 -08:00
Marco
41ad80f69d vp9-svc: Fix some stats in vp9_spatial_svc_encoder.
Correction to rate control stats output under -rcstat.

Change-Id: I46fa5d2a66ed657121ee3d685608a148bb9a7bb3
2016-10-31 15:24:13 -07:00
Marco
a8fdb3926e vp9: Updates to SVC sample encoder.
Allow for passing in the layer bitrates at command line.
Fix to allow passing in bitrate for each spatial-temporal layer.

Change to some default values for 1 pass cbr mode:
spatial scale and qp-max/min.

Small fixes to some build warnings.

Change-Id: I3f9a776262712480a6570bb863a835b2fc49935a
2016-10-28 10:59:58 -07:00
Marco
7eff8f3b1d Update to vpx_temporal_svc_encoder command line.
Set the  #threads at command line.

Change-Id: Id0daa2393880c3da2d903c11a793072d3008b34b
2016-10-03 09:49:15 -07:00
Urvang Joshi
097b31c7f0 Add compiler flag -Wsign-compare
Also, fix the warnings generated by this flag.

(cherry picked from commit ebeb1155d4fa6d28e2f40c92265245f8df097fcb)

From AOM. Don't actually add -Wsign-compare. It will be covered by
-Wextra.

Switch to vpx_integer.h from df9c9d6d4c43f02c58d4e776c53323788e013cbc

BUG=webm:1069

Change-Id: I1dc6e61caa5d56af4a55b6692ab620bb3144652a
2016-09-27 12:39:36 -07:00
James Zern
08b8b6bb8f examples: quiet -Wshorten-64-to-32 warnings
all around usage of strtol/strtoul

Change-Id: If907c89f107a068987aa71ddd93cee9a7389e4cd
2016-09-19 19:02:49 -07:00
James Zern
7a9e476072 Merge changes from topic 'clang-format'
* changes:
  apply clang-format
  .clang-format: update to 3.8.1
2016-09-16 07:11:33 +00:00
Johann
d5054504a7 zero structures completely
Use vp[89]_zero when possible.

Expand the {} set when neither is available or nearby.

Change-Id: Ifc1f46f60100916cd798bf7be3a10f09321c99bd
2016-09-16 03:54:11 +00:00
clang-format
5f6d143b41 apply clang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
2016-09-15 15:07:53 -07:00
Johann
db32581650 vp9cx_set_ref.c: remove unused 'cfg' parameter
Cleans -Wextra/-Wunused-parameter warning:
warning: unused parameter ‘cfg’

Change-Id: I84eae57a50306cb66c625bb648b0a330678818db
2016-09-13 14:51:06 -07:00
Marco
f1e12c1bf3 vp8: Fix denoiser setting in multi-res sample encoder.
Change-Id: I9222f3b252e5ed883659f1a14cd705944ee9da07
2016-08-10 16:22:08 -07:00
JackyChen
f7032713af vp9 svc: Fix a valgrind error.
This error was introduced by the patch:
8ce67d7 vp9 svc: Enable different speed setting for each spatial layer.
To use svc, svc_param should be cleared to 0 at the beginning.

Change-Id: I222f03ddae8a50e84b4690b78263abb742fae91e
2016-08-02 16:16:22 -07:00
clang-format
ef45540927 examples: apply clang-format
Change-Id: Icc3bbb07c99a31a70030baec7e51b881902a7b5e
2016-07-18 19:04:56 -07:00
Yunqing Wang
9ef37860cd Fix Visual Studio build warning
Fixed signed/unsigned mismatch warning.

Change-Id: I1634d0634de752f4b8baa8059e8f3e2891fa53b6
2016-07-07 08:43:57 -07:00
Yunqing Wang
fba5c354ad Modify the name of vp9cx_set_ref example
Modified the name of vp9cx_set_ref example so that the test script
ran correctly.

Change-Id: I0ab2de66220b0a88b7af7ea1633a088ab78dd9ff
2016-07-06 10:05:51 -07:00
Yunqing Wang
0a075cb39c Make set_reference control API work in VP9
Moved the API patch from NextGenv2. An example was included.
To try it, for example, run the following command:
$ examples/vpx_cx_set_ref vp9 352 288 in.yuv out.ivf 4 30

Change-Id: I4cf8f23b86d7ebd85ffd2630dcfbd799c0b88101
2016-07-01 17:58:02 -07:00
Tom Finegan
9d7eaf0046 Merge "twopass_encoder: Add frame limit argument." 2016-05-12 16:26:29 +00:00
Tom Finegan
7d6edc3ddd simple_encoder: Add a frame limit argument.
- Add frame limit argument.
- Make all arguments required.
- Enable the VP9 simple encoder test.

Change-Id: I11d228b358ff90c60ea92e02760cb476434ea571
2016-05-11 14:52:34 -07:00