exclude hbd in aom_scale from CONFIG_AV1_HIGHBITDEPTH. BUG=aomedia:2397 Change-Id: I5a1285493d9ff78861a873623e15217f89a49e02
diff --git a/aom_scale/generic/yv12extend.c b/aom_scale/generic/yv12extend.c index 6e9cfff..834a59d 100644 --- a/aom_scale/generic/yv12extend.c +++ b/aom_scale/generic/yv12extend.c
@@ -59,6 +59,7 @@ } } +#if CONFIG_AV1_HIGHBITDEPTH static void extend_plane_high(uint8_t *const src8, int src_stride, int width, int height, int extend_top, int extend_left, int extend_bottom, int extend_right) { @@ -99,6 +100,7 @@ dst_ptr2 += src_stride; } } +#endif // CONFIG_AV1_HIGHBITDEPTH void aom_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf, const int num_planes) { @@ -108,6 +110,7 @@ assert(ybf->y_height - ybf->y_crop_height >= 0); assert(ybf->y_width - ybf->y_crop_width >= 0); +#if CONFIG_AV1_HIGHBITDEPTH if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) { for (int plane = 0; plane < num_planes; ++plane) { const int is_uv = plane > 0; @@ -120,6 +123,8 @@ } return; } +#endif + for (int plane = 0; plane < num_planes; ++plane) { const int is_uv = plane > 0; const int plane_border = ybf->border >> is_uv; @@ -141,6 +146,7 @@ assert(ybf->y_height - ybf->y_crop_height >= 0); assert(ybf->y_width - ybf->y_crop_width >= 0); +#if CONFIG_AV1_HIGHBITDEPTH if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) { for (int plane = 0; plane < num_planes; ++plane) { const int is_uv = plane > 0; @@ -154,6 +160,8 @@ } return; } +#endif + for (int plane = 0; plane < num_planes; ++plane) { const int is_uv = plane > 0; const int top = ext_size >> (is_uv ? ss_y : 0); @@ -184,7 +192,7 @@ assert(ybf->y_width - ybf->y_crop_width < 16); assert(ybf->y_height - ybf->y_crop_height >= 0); assert(ybf->y_width - ybf->y_crop_width >= 0); - +#if CONFIG_AV1_HIGHBITDEPTH if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) { extend_plane_high(ybf->y_buffer, ybf->y_stride, ybf->y_crop_width, ybf->y_crop_height, ext_size, ext_size, @@ -192,17 +200,20 @@ ext_size + ybf->y_width - ybf->y_crop_width); return; } +#endif extend_plane(ybf->y_buffer, ybf->y_stride, ybf->y_crop_width, ybf->y_crop_height, ext_size, ext_size, ext_size + ybf->y_height - ybf->y_crop_height, ext_size + ybf->y_width - ybf->y_crop_width); } +#if CONFIG_AV1_HIGHBITDEPTH static void memcpy_short_addr(uint8_t *dst8, const uint8_t *src8, int num) { uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); uint16_t *src = CONVERT_TO_SHORTPTR(src8); memcpy(dst, src, num * sizeof(uint16_t)); } +#endif // Copies the source image into the destination image and updates the // destination's UMV borders. @@ -217,6 +228,7 @@ assert(src_bc->y_height == dst_bc->y_height); #endif +#if CONFIG_AV1_HIGHBITDEPTH assert((src_bc->flags & YV12_FLAG_HIGHBITDEPTH) == (dst_bc->flags & YV12_FLAG_HIGHBITDEPTH)); @@ -235,6 +247,7 @@ aom_yv12_extend_frame_borders_c(dst_bc, num_planes); return; } +#endif for (int plane = 0; plane < num_planes; ++plane) { const uint8_t *plane_src = src_bc->buffers[plane]; uint8_t *plane_dst = dst_bc->buffers[plane]; @@ -255,6 +268,7 @@ const uint8_t *src = src_ybc->y_buffer; uint8_t *dst = dst_ybc->y_buffer; +#if CONFIG_AV1_HIGHBITDEPTH if (src_ybc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src); uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst); @@ -265,6 +279,7 @@ } return; } +#endif for (row = 0; row < src_ybc->y_height; ++row) { memcpy(dst, src, src_ybc->y_width); @@ -278,7 +293,7 @@ int row; const uint8_t *src = src_bc->u_buffer; uint8_t *dst = dst_bc->u_buffer; - +#if CONFIG_AV1_HIGHBITDEPTH if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src); uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst); @@ -289,7 +304,7 @@ } return; } - +#endif for (row = 0; row < src_bc->uv_height; ++row) { memcpy(dst, src, src_bc->uv_width); src += src_bc->uv_stride; @@ -302,7 +317,7 @@ int row; const uint8_t *src = src_bc->v_buffer; uint8_t *dst = dst_bc->v_buffer; - +#if CONFIG_AV1_HIGHBITDEPTH if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src); uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst); @@ -313,7 +328,7 @@ } return; } - +#endif for (row = 0; row < src_bc->uv_height; ++row) { memcpy(dst, src, src_bc->uv_width); src += src_bc->uv_stride; @@ -328,7 +343,7 @@ int row; const uint8_t *src = src_ybc->y_buffer; uint8_t *dst = dst_ybc->y_buffer; - +#if CONFIG_AV1_HIGHBITDEPTH if (src_ybc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src + vstart1 * src_ybc->y_stride + hstart1); @@ -342,6 +357,7 @@ } return; } +#endif src = (src + vstart1 * src_ybc->y_stride + hstart1); dst = (dst + vstart2 * dst_ybc->y_stride + hstart2); @@ -366,7 +382,7 @@ int row; const uint8_t *src = src_bc->u_buffer; uint8_t *dst = dst_bc->u_buffer; - +#if CONFIG_AV1_HIGHBITDEPTH if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src + vstart1 * src_bc->uv_stride + hstart1); @@ -379,7 +395,7 @@ } return; } - +#endif src = (src + vstart1 * src_bc->uv_stride + hstart1); dst = (dst + vstart2 * dst_bc->uv_stride + hstart2); @@ -404,7 +420,7 @@ int row; const uint8_t *src = src_bc->v_buffer; uint8_t *dst = dst_bc->v_buffer; - +#if CONFIG_AV1_HIGHBITDEPTH if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) { const uint16_t *src16 = CONVERT_TO_SHORTPTR(src + vstart1 * src_bc->uv_stride + hstart1); @@ -417,7 +433,7 @@ } return; } - +#endif src = (src + vstart1 * src_bc->uv_stride + hstart1); dst = (dst + vstart2 * dst_bc->uv_stride + hstart2);