diff options
author | Christian König <[email protected]> | 2015-12-15 11:53:48 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2016-01-12 13:28:21 +0100 |
commit | da3963776421af4718809812b789f6722d5180d0 (patch) | |
tree | 2ab84c74c7c7db7f43496d5037f9acba9a138ecc /src/gallium/state_trackers/vdpau | |
parent | 52ca9a9b8bf9c3991a82d7039d7a35955ad774b8 (diff) |
st/vdpau: use vl_video_buffer_adjust_size
Use the new helper function instead of open coding it.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 55d0d76d16d..ffcedc12de6 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -183,16 +183,9 @@ vlVdpVideoSurfaceSize(vlVdpSurface *p_surf, int component, *width = p_surf->templat.width; *height = p_surf->templat.height; - if (component > 0) { - if (p_surf->templat.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420) { - *width /= 2; - *height /= 2; - } else if (p_surf->templat.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - *width /= 2; - } - } - if (p_surf->templat.interlaced) - *height /= 2; + vl_video_buffer_adjust_size(width, height, component, + p_surf->templat.chroma_format, + p_surf->templat.interlaced); } /** |