summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2013-11-25 08:49:58 -0800
committerAdrian Grange <agrange@google.com>2013-11-25 08:59:29 -0800
commit3173c2190910a748d1a97b19a94ef4c47e48cb14 (patch)
tree485a96272726838580e0facf15d2433e7c38c9e1 /vp9/encoder
parent2d50c8498d1b4e03fa249d83fd88b148bca590e5 (diff)
downloadlibvpx-3173c2190910a748d1a97b19a94ef4c47e48cb14.tar
libvpx-3173c2190910a748d1a97b19a94ef4c47e48cb14.tar.gz
libvpx-3173c2190910a748d1a97b19a94ef4c47e48cb14.tar.bz2
libvpx-3173c2190910a748d1a97b19a94ef4c47e48cb14.zip
Change default behavior to assume sampled chroma
When calling check_initial_width through vp9_set_size_literal the function was defaulting to using non-subsampled chroma. This patch changes the default to assume sampled chroma as an interim solution until complete support for other color formats is added. Change-Id: Id8e7e919b350e3473dfdf7551af6fd0716478b04
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_onyx_if.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index b1fa6865e..d7b179689 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3323,13 +3323,12 @@ static void Pass2Encode(VP9_COMP *cpi, unsigned long *size,
}
static void check_initial_width(VP9_COMP *cpi, YV12_BUFFER_CONFIG *sd) {
- VP9_COMMON *cm = &cpi->common;
+ VP9_COMMON *const cm = &cpi->common;
if (!cpi->initial_width) {
- // TODO(jkoleszar): Support 1/4 subsampling?
- cm->subsampling_x = (sd != NULL) && sd->uv_width < sd->y_width;
- cm->subsampling_y = (sd != NULL) && sd->uv_height < sd->y_height;
+ // TODO(agrange) Subsampling defaults to assuming sampled chroma.
+ cm->subsampling_x = sd != NULL ? (sd->uv_width < sd->y_width) : 1;
+ cm->subsampling_y = sd != NULL ? (sd->uv_height < sd->y_height) : 1;
alloc_raw_frame_buffers(cpi);
-
cpi->initial_width = cm->width;
cpi->initial_height = cm->height;
}