static INLINE int libyuv_scale(aom_image_t *src, aom_image_t *dst, FilterModeEnum mode) { #if CONFIG_AOM_HIGHBITDEPTH if (src->fmt == AOM_IMG_FMT_I42016) { assert(dst->fmt == AOM_IMG_FMT_I42016); return I420Scale_16( (uint16_t *)src->planes[AOM_PLANE_Y], src->stride[AOM_PLANE_Y] / 2, (uint16_t *)src->planes[AOM_PLANE_U], src->stride[AOM_PLANE_U] / 2, (uint16_t *)src->planes[AOM_PLANE_V], src->stride[AOM_PLANE_V] / 2, src->d_w, src->d_h, (uint16_t *)dst->planes[AOM_PLANE_Y], dst->stride[AOM_PLANE_Y] / 2, (uint16_t *)dst->planes[AOM_PLANE_U], dst->stride[AOM_PLANE_U] / 2, (uint16_t *)dst->planes[AOM_PLANE_V], dst->stride[AOM_PLANE_V] / 2, dst->d_w, dst->d_h, mode); } #endif assert(src->fmt == AOM_IMG_FMT_I420); assert(dst->fmt == AOM_IMG_FMT_I420); return I420Scale(src->planes[AOM_PLANE_Y], src->stride[AOM_PLANE_Y], src->planes[AOM_PLANE_U], src->stride[AOM_PLANE_U], src->planes[AOM_PLANE_V], src->stride[AOM_PLANE_V], src->d_w, src->d_h, dst->planes[AOM_PLANE_Y], dst->stride[AOM_PLANE_Y], dst->planes[AOM_PLANE_U], dst->stride[AOM_PLANE_U], dst->planes[AOM_PLANE_V], dst->stride[AOM_PLANE_V], dst->d_w, dst->d_h, mode); }
static INLINE int vpx_image_scale(vpx_image_t *src, vpx_image_t *dst, FilterModeEnum mode) { #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH if (src->fmt == VPX_IMG_FMT_I42016) { assert(dst->fmt == VPX_IMG_FMT_I42016); return I420Scale_16((uint16_t*)src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y]/2, (uint16_t*)src->planes[VPX_PLANE_U], src->stride[VPX_PLANE_U]/2, (uint16_t*)src->planes[VPX_PLANE_V], src->stride[VPX_PLANE_V]/2, src->d_w, src->d_h, (uint16_t*)dst->planes[VPX_PLANE_Y], dst->stride[VPX_PLANE_Y]/2, (uint16_t*)dst->planes[VPX_PLANE_U], dst->stride[VPX_PLANE_U]/2, (uint16_t*)dst->planes[VPX_PLANE_V], dst->stride[VPX_PLANE_V]/2, dst->d_w, dst->d_h, mode); } #endif assert(src->fmt == VPX_IMG_FMT_I420); assert(dst->fmt == VPX_IMG_FMT_I420); return I420Scale(src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y], src->planes[VPX_PLANE_U], src->stride[VPX_PLANE_U], src->planes[VPX_PLANE_V], src->stride[VPX_PLANE_V], src->d_w, src->d_h, dst->planes[VPX_PLANE_Y], dst->stride[VPX_PLANE_Y], dst->planes[VPX_PLANE_U], dst->stride[VPX_PLANE_U], dst->planes[VPX_PLANE_V], dst->stride[VPX_PLANE_V], dst->d_w, dst->d_h, mode); }