radeon/video: MJPEG not support stacked video buffers
authorLeo Liu <leo.liu@amd.com>
Tue, 15 Aug 2017 16:39:35 +0000 (12:39 -0400)
committerLeo Liu <leo.liu@amd.com>
Mon, 21 Aug 2017 14:09:09 +0000 (10:09 -0400)
So we have to detect it for reallocation of de-interlaced buffers

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_video.c

index 857a714f9931d67b2f5b7abbba91b127f866760c..7c2553364ee5404529152969ff2b4714d0749c7d 100644 (file)
@@ -311,8 +311,12 @@ int rvid_get_video_param(struct pipe_screen *screen,
                        return codec != PIPE_VIDEO_FORMAT_MPEG12 &&
                               rscreen->family > CHIP_RV770;
                } else {
-                       if (u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_HEVC)
+                       enum pipe_video_format format = u_reduce_video_profile(profile);
+
+                       if (format == PIPE_VIDEO_FORMAT_HEVC)
                                return false; //The firmware doesn't support interlaced HEVC.
+                       else if (format == PIPE_VIDEO_FORMAT_JPEG)
+                               return false;
                        return true;
                }
        case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE: