[Mesa-dev] [PATCH 02/11] vl: add entry point

Christian K├Ânig deathsimple at vodafone.de
Mon Jul 18 13:31:38 UTC 2016


Am 16.07.2016 um 00:41 schrieb Boyuan Zhang:
> Add entrypoint to distinguish H.264 decode and encode. For example, in patch 5/11 when is calling "VaCreateContext", "pps" and "sps" shouldn't be allocated for H.264 encoding. So we need to use the entry_point to determine this is H.264 decode or H.264 encode. We can use config to determine the entrypoint since config_id is passed to us for VaCreateContext call. However, for VaDestoyContext call, only context_id is passed to us. So we need to know the entrypoint in order to not free the pps/sps for encoding case.

Thanks for adding the explanation, that makes things much more clearer.

In general it is the right idea to add this to the base picture 
descriptor so that we can distinguish the different sub types of the 
structure.

But the picture descriptor structure is used for communication between 
the state tracker and the backend driver. Since the backend driver 
doesn't need this change it is clearly not the right approach.

E.g. what I was confused about is that the driver changes compiled 
perfectly fine even without this patch and that clearly pointed to 
something being wrong here. Currently we only need the distinction in 
the VA-API state tracker and should be able to get it there by other 
approaches as well.

At minimum when we want to make this change we should also change all 
initializations of the picture descriptor as well in follow up patches.

Regards,
Christian.

> Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>
> ---
>   src/gallium/include/pipe/p_video_state.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
> index 754d013..39b3905 100644
> --- a/src/gallium/include/pipe/p_video_state.h
> +++ b/src/gallium/include/pipe/p_video_state.h
> @@ -131,6 +131,7 @@ enum pipe_h264_enc_rate_control_method
>   struct pipe_picture_desc
>   {
>      enum pipe_video_profile profile;
> +   enum pipe_video_entrypoint entry_point;
>   };
>   
>   struct pipe_quant_matrix



More information about the mesa-dev mailing list