diff options
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index b60b22fc265..5782f620e61 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -1053,8 +1053,8 @@ vl_create_mpeg12_decoder(struct pipe_context *context, dec->chroma_height = dec->base.height / 2; dec->num_blocks = dec->num_blocks * 2; } else if (dec->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - dec->chroma_width = dec->base.width; - dec->chroma_height = dec->base.height / 2; + dec->chroma_width = dec->base.width / 2; + dec->chroma_height = dec->base.height; dec->num_blocks = dec->num_blocks * 2 + dec->num_blocks; } else { dec->chroma_width = dec->base.width; diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index f0ba3891eb6..3b599fcd12f 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -240,7 +240,7 @@ vl_video_buffer_template(struct pipe_resource *templ, templ->width0 /= 2; templ->height0 /= 2; } else if (tmpl->chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - templ->height0 /= 2; + templ->width0 /= 2; } } } diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index a26f9b6bb49..ab4d725cb36 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -174,7 +174,7 @@ vlVdpVideoSurfaceSize(vlVdpSurface *p_surf, int component, *width /= 2; *height /= 2; } else if (p_surf->templat.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - *height /= 2; + *width /= 2; } } if (p_surf->templat.interlaced) |