#if CONFIG_VP9_HIGHBITDEPTH if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { // In vpx_image_t // planes point to uint8 address of start of data // stride counts uint8s to reach next row // In YV12_BUFFER_CONFIG // y_buffer, u_buffer, v_buffer point to uint16 address of data // stride and border counts in uint16s // This means that all the address calculations in the main body of code // should work correctly. // However, before we do any pixel operations we need to cast the address // to a uint16 ponter and double its value.
yv12->y_buffer = CONVERT_TO_BYTEPTR(yv12->y_buffer);
yv12->u_buffer = CONVERT_TO_BYTEPTR(yv12->u_buffer);
yv12->v_buffer = CONVERT_TO_BYTEPTR(yv12->v_buffer);
yv12->y_stride >>= 1;
yv12->uv_stride >>= 1;
yv12->flags = YV12_FLAG_HIGHBITDEPTH;
} else {
yv12->flags = 0;
}
yv12->border = (yv12->y_stride - img->w) / 2; #else
yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2; #endif// CONFIG_VP9_HIGHBITDEPTH
yv12->subsampling_x = img->x_chroma_shift;
yv12->subsampling_y = img->y_chroma_shift; // When reading the data, UV are in one plane for NV12 format, thus // x_chroma_shift is 0. After converting, UV are in separate planes, and // subsampling_x should be set to 1. if (img->fmt == VPX_IMG_FMT_NV12) yv12->subsampling_x = 1; return VPX_CODEC_OK;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.