Mesa (main): gallium/va: Remove VP9 header parsing for secure playback

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 30 19:01:34 UTC 2021


Module: Mesa
Branch: main
Commit: 2c2b5fc65fd98c74d99dda55980c668a890ac973
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c2b5fc65fd98c74d99dda55980c668a890ac973

Author: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan at amd.com>
Date:   Tue Sep  7 20:30:07 2021 +0530

gallium/va: Remove VP9 header parsing for secure playback

Latest VCN FW is capable of parsing the VP9 uncompressed header.
Removing the parsing from gallium.

Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan at amd.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13106>

---

 src/gallium/frontends/va/picture.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c
index 5a5792ea42f..20d58c52f24 100644
--- a/src/gallium/frontends/va/picture.c
+++ b/src/gallium/frontends/va/picture.c
@@ -332,7 +332,8 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
          sizes[num_buffers++] = context->mjpeg.slice_header_size;
          break;
       case PIPE_VIDEO_FORMAT_VP9:
-         vlVaDecoderVP9BitstreamHeader(context, buf);
+         if (false == context->desc.base.protected_playback)
+            vlVaDecoderVP9BitstreamHeader(context, buf);
          break;
       case PIPE_VIDEO_FORMAT_AV1:
          break;
@@ -341,16 +342,9 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
       }
    }
 
-   if (context->desc.base.protected_playback && PIPE_VIDEO_FORMAT_VP9 == format){
-        vlVaDecoderVP9BitstreamHeader(context, buf);
-        buffers[num_buffers] = buf->data + context->desc.vp9.picture_parameter.frame_header_length_in_bytes;
-        sizes[num_buffers] = buf->size - context->desc.vp9.picture_parameter.frame_header_length_in_bytes;
-        ++num_buffers;
-   } else {
-        buffers[num_buffers] = buf->data;
-        sizes[num_buffers] = buf->size;
-        ++num_buffers;
-   }
+   buffers[num_buffers] = buf->data;
+   sizes[num_buffers] = buf->size;
+   ++num_buffers;
 
    if (format == PIPE_VIDEO_FORMAT_JPEG) {
       buffers[num_buffers] = (void *const)&eoi_jpeg;



More information about the mesa-commit mailing list