[Mesa-dev] [PATCH] st/va: exclude the buffer reallocation for encode case
Christian König
deathsimple at vodafone.de
Wed Aug 23 18:10:09 UTC 2017
Am 23.08.2017 um 19:21 schrieb Leo Liu:
> Since encoder only support de-interlaced buffers.
>
> Signed-off-by: Leo Liu <leo.liu at amd.com>
> ---
> src/gallium/state_trackers/va/picture.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
> index b2be7af8c4..ea86ce1b3b 100644
> --- a/src/gallium/state_trackers/va/picture.c
> +++ b/src/gallium/state_trackers/va/picture.c
> @@ -625,7 +625,8 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
> PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
> PIPE_VIDEO_CAP_SUPPORTS_INTERLACED);
>
> - if (surf->buffer->interlaced != interlaced) {
> + if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE &&
> + surf->buffer->interlaced != interlaced) {
I think it would be better to just use context->decoder->entrypoint in
the call above.
That should return false for interlaced when there is some encoding
going on.
Regards,
Christian.
> surf->templat.interlaced = screen->get_video_param(screen, context->decoder->profile,
> PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
> PIPE_VIDEO_CAP_PREFERS_INTERLACED);
More information about the mesa-dev
mailing list