[Libva] [Patch intel-driver 2/3] decoder: Remove the dependency on H.264 picture parameter

lizhong zhong.li at intel.com
Fri Jun 27 01:23:43 PDT 2014


On 06/27/2014 03:03 PM, Xiang, Haihao wrote:
> From: "Xiang, Haihao" <haihao.xiang at intel.com>
>
> Only POC is needed in the algorithm
>
> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> ---
>   src/i965_decoder_utils.c | 23 +++++++++++++++++++----
>   1 file changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/src/i965_decoder_utils.c b/src/i965_decoder_utils.c
> index 4208bac..c0d6a32 100644
> --- a/src/i965_decoder_utils.c
> +++ b/src/i965_decoder_utils.c
> @@ -497,11 +497,11 @@ compare_avc_ref_store_func(const void *p1, const void *p2)
>       return fs1->ref_age - fs2->ref_age;
>   }
>   
> -void
> -intel_update_avc_frame_store_index(
> +static void
> +intel_update_codec_frame_store_index(
>       VADriverContextP              ctx,
>       struct decode_state          *decode_state,
> -    VAPictureParameterBufferH264 *pic_param,
> +    int poc,
>       GenFrameStore                 frame_store[MAX_GEN_REFERENCE_FRAMES],
>       GenFrameStoreContext         *fs_ctx
>   )
Would you want to re-use function "intel_update_codec_frame_store_index" 
for other codec? There is no POC and DPB conception for othe codec, such 
as vc1/mpeg2/mpeg4/vp8.
If this function can only be called by avc, maybe it would be better to 
keep the original function name.
> @@ -512,7 +512,6 @@ intel_update_avc_frame_store_index(
>       int i, n, num_free_refs;
>   
>       /* Detect changes of access unit */
> -    const int poc = avc_get_picture_poc(&pic_param->CurrPic);
>       if (fs_ctx->age == 0 || fs_ctx->prev_poc != poc)
>           fs_ctx->age++;
>       fs_ctx->prev_poc = poc;
> @@ -573,6 +572,22 @@ intel_update_avc_frame_store_index(
>   }
>   
>   void
> +intel_update_avc_frame_store_index(
> +    VADriverContextP              ctx,
> +    struct decode_state          *decode_state,
> +    VAPictureParameterBufferH264 *pic_param,
> +    GenFrameStore                 frame_store[MAX_GEN_REFERENCE_FRAMES],
> +    GenFrameStoreContext         *fs_ctx
> +)
> +{
> +    intel_update_codec_frame_store_index(ctx,
> +                                         decode_state,
> +                                         avc_get_picture_poc(&pic_param->CurrPic),
> +                                         frame_store,
> +                                         fs_ctx);
> +}
> +
> +void
>   gen75_update_avc_frame_store_index(
>       VADriverContextP              ctx,
>       struct decode_state          *decode_state,



More information about the Libva mailing list