diff options
author | Deb Mukherjee <debargha@google.com> | 2014-08-26 12:35:15 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2014-09-02 14:37:10 -0700 |
commit | 5acfafb18e1720abfc0dc5baafce8e1a1b292b14 (patch) | |
tree | a89c5e2e79283e58a613b98dc3d7b3434ba6affe /tools_common.c | |
parent | 72037944df611abccac02c225e20adc9479200db (diff) | |
download | libvpx-5acfafb18e1720abfc0dc5baafce8e1a1b292b14.tar libvpx-5acfafb18e1720abfc0dc5baafce8e1a1b292b14.tar.gz libvpx-5acfafb18e1720abfc0dc5baafce8e1a1b292b14.tar.bz2 libvpx-5acfafb18e1720abfc0dc5baafce8e1a1b292b14.zip |
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
Diffstat (limited to 'tools_common.c')
-rw-r--r-- | tools_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools_common.c b/tools_common.c index 7cfd066ec..2ec17117c 100644 --- a/tools_common.c +++ b/tools_common.c @@ -83,7 +83,7 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) { struct FileTypeDetectionBuffer *detect = &input_ctx->detect; int plane = 0; int shortread = 0; - const int bytespp = (yuv_frame->fmt & VPX_IMG_FMT_HIGH) ? 2 : 1; + const int bytespp = (yuv_frame->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1; for (plane = 0; plane < 3; ++plane) { uint8_t *ptr; @@ -241,7 +241,8 @@ int vpx_img_read(vpx_image_t *img, FILE *file) { for (plane = 0; plane < 3; ++plane) { unsigned char *buf = img->planes[plane]; const int stride = img->stride[plane]; - const int w = vpx_img_plane_width(img, plane); + const int w = vpx_img_plane_width(img, plane) * + ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); const int h = vpx_img_plane_height(img, plane); int y; |