summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2016-01-28 14:21:04 +0200
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-02-02 16:17:43 +0100
commiteb2daed2a7495f9049126a198548d68938346096 (patch)
tree520c37d7273dcdf67a0cf0dbcf6bfa6f26eb7f23
parent0a9ce66ec75b3566bcec7892fb16cafac22442bc (diff)
downloadgst-vaapi-eb2daed2a7495f9049126a198548d68938346096.tar.gz
decoder: vp9: Fix crop rectangle setting
Align with software vp9dec behaviour: Add crop rectangle only if display_width/display_height is less than the frame_hdr->width/frame_hdr->height
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vp9.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
index 055ac09b..bb13e961 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vp9.c
@@ -442,13 +442,16 @@ decode_picture (GstVaapiDecoderVp9 * decoder, const guchar * buf,
if (is_clone_pic)
return GST_VAAPI_DECODER_STATUS_SUCCESS;
- if (frame_hdr->display_size_enabled) {
- crop_width = frame_hdr->display_width;
- crop_height = frame_hdr->display_height;
- } else if (priv->width > frame_hdr->width || priv->height > frame_hdr->height) {
+ if (priv->width > frame_hdr->width || priv->height > frame_hdr->height) {
crop_width = frame_hdr->width;
crop_height = frame_hdr->height;
}
+ if (frame_hdr->display_size_enabled &&
+ (frame_hdr->width > frame_hdr->display_width
+ || frame_hdr->height > frame_hdr->display_height)) {
+ crop_width = frame_hdr->display_width;
+ crop_height = frame_hdr->display_height;
+ }
if (crop_width || crop_height) {
GstVaapiRectangle crop_rect;
crop_rect.x = 0;