Merge "Using crop_{width, height} instead of {width, height}."
This commit is contained in:
Коммит
25110038f7
|
@ -331,10 +331,6 @@ int vp9_get_raw_frame(VP9Decoder *pbi, YV12_BUFFER_CONFIG *sd,
|
|||
ret = vp9_post_proc_frame(&pbi->common, sd, flags);
|
||||
#else
|
||||
*sd = *pbi->common.frame_to_show;
|
||||
sd->y_width = pbi->common.width;
|
||||
sd->y_height = pbi->common.height;
|
||||
sd->uv_width = sd->y_width >> pbi->common.subsampling_x;
|
||||
sd->uv_height = sd->y_height >> pbi->common.subsampling_y;
|
||||
ret = 0;
|
||||
#endif /*!CONFIG_POSTPROC*/
|
||||
vp9_clear_system_state();
|
||||
|
|
|
@ -16,9 +16,11 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
|
|||
* the Y, U, and V planes, nor other alignment adjustments that
|
||||
* might be representable by a YV12_BUFFER_CONFIG, so we just
|
||||
* initialize all the fields.*/
|
||||
int bps = 12;
|
||||
if (yv12->uv_height == yv12->y_height) {
|
||||
if (yv12->uv_width == yv12->y_width) {
|
||||
const int ss_x = yv12->uv_crop_width < yv12->y_crop_width;
|
||||
const int ss_y = yv12->uv_crop_height < yv12->y_crop_height;
|
||||
int bps;
|
||||
if (!ss_y) {
|
||||
if (!ss_x) {
|
||||
img->fmt = VPX_IMG_FMT_I444;
|
||||
bps = 24;
|
||||
} else {
|
||||
|
@ -27,13 +29,14 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
|
|||
}
|
||||
} else {
|
||||
img->fmt = VPX_IMG_FMT_I420;
|
||||
bps = 12;
|
||||
}
|
||||
img->w = yv12->y_stride;
|
||||
img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3);
|
||||
img->d_w = yv12->y_crop_width;
|
||||
img->d_h = yv12->y_crop_height;
|
||||
img->x_chroma_shift = yv12->uv_width < yv12->y_width;
|
||||
img->y_chroma_shift = yv12->uv_height < yv12->y_height;
|
||||
img->x_chroma_shift = ss_x;
|
||||
img->y_chroma_shift = ss_y;
|
||||
img->planes[VPX_PLANE_Y] = yv12->y_buffer;
|
||||
img->planes[VPX_PLANE_U] = yv12->u_buffer;
|
||||
img->planes[VPX_PLANE_V] = yv12->v_buffer;
|
||||
|
|
Загрузка…
Ссылка в новой задаче