summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2022-06-28 11:22:48 -0700
committerMarco Paniconi <marpan@google.com>2022-06-28 19:29:20 -0700
commit896b59f44d63a789c9e34c394e9380323e538692 (patch)
treefdfd88a5c9a9527157a040cee94e254b73e7e0dd /vp9
parentf43636a3e0e429eeff4c6edea73af8a5b9c1413d (diff)
downloadlibvpx-896b59f44d63a789c9e34c394e9380323e538692.tar
libvpx-896b59f44d63a789c9e34c394e9380323e538692.tar.gz
libvpx-896b59f44d63a789c9e34c394e9380323e538692.tar.bz2
libvpx-896b59f44d63a789c9e34c394e9380323e538692.zip
rtc-svc: Fix to make SVC work for Profile 1
Added datarate unittest for 4:4:4 and 4:2:2 input, for spatial and temporal layers. Fix is needed in vp9_set_literal_size(): the sampling_x/y should be passed into update_inital_width(), othewise sampling_x/y = 1/1 (4:2:0) was forced. vp9_set_literal_size() is only called by the svc and on dynamic resize. Fix issue with the normative optimized scaler: UV width/height was assumed to be 1/2 of Y, for the ssse and neon code. Also fix to assert for the scaled width/height: in case scaled width/height is odd it should be incremented by 1 (make it even). Change-Id: I3a2e40effa53c505f44ef05aaa3132e1b7f57dd5
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/arm/neon/vp9_frame_scale_neon.c4
-rw-r--r--vp9/encoder/vp9_encoder.c6
-rw-r--r--vp9/encoder/x86/vp9_frame_scale_ssse3.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/vp9/encoder/arm/neon/vp9_frame_scale_neon.c b/vp9/encoder/arm/neon/vp9_frame_scale_neon.c
index e46f789ba..69b8cfffd 100644
--- a/vp9/encoder/arm/neon/vp9_frame_scale_neon.c
+++ b/vp9/encoder/arm/neon/vp9_frame_scale_neon.c
@@ -710,8 +710,8 @@ void vp9_scale_and_extend_frame_neon(const YV12_BUFFER_CONFIG *src,
const int src_h = src->y_crop_height;
const int dst_w = dst->y_crop_width;
const int dst_h = dst->y_crop_height;
- const int dst_uv_w = dst_w / 2;
- const int dst_uv_h = dst_h / 2;
+ const int dst_uv_w = dst->uv_crop_width;
+ const int dst_uv_h = dst->uv_crop_height;
int scaled = 0;
// phase_scaler is usually 0 or 8.
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 85bd70662..371779e77 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -8155,9 +8155,11 @@ int vp9_set_size_literal(VP9_COMP *cpi, unsigned int width,
unsigned int height) {
VP9_COMMON *cm = &cpi->common;
#if CONFIG_VP9_HIGHBITDEPTH
- update_initial_width(cpi, cm->use_highbitdepth, 1, 1);
+ update_initial_width(cpi, cm->use_highbitdepth, cpi->common.subsampling_x,
+ cpi->common.subsampling_y);
#else
- update_initial_width(cpi, 0, 1, 1);
+ update_initial_width(cpi, 0, cpi->common.subsampling_x,
+ cpi->common.subsampling_y);
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_TEMPORAL_DENOISING
diff --git a/vp9/encoder/x86/vp9_frame_scale_ssse3.c b/vp9/encoder/x86/vp9_frame_scale_ssse3.c
index 7685e7bc3..bf0e8b121 100644
--- a/vp9/encoder/x86/vp9_frame_scale_ssse3.c
+++ b/vp9/encoder/x86/vp9_frame_scale_ssse3.c
@@ -754,8 +754,8 @@ void vp9_scale_and_extend_frame_ssse3(const YV12_BUFFER_CONFIG *src,
const int src_h = src->y_crop_height;
const int dst_w = dst->y_crop_width;
const int dst_h = dst->y_crop_height;
- const int dst_uv_w = dst_w / 2;
- const int dst_uv_h = dst_h / 2;
+ const int dst_uv_w = dst->uv_crop_width;
+ const int dst_uv_h = dst->uv_crop_height;
int scaled = 0;
// phase_scaler is usually 0 or 8.