mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
0a9ce66ec7
commit
eb2daed2a7
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue