On Wed, 2014-05-28 at 15:02 -0600, sreerenj.balachand...@intel.com
wrote:
> From: Sreerenj Balachandran <sreerenj.balachand...@intel.com>
> 
> Avoid storing packed slice header index as packed raw data index.
> This patch is a preparation for submitting all the packed slice
> headers as a group , instead of pairing with VAEncSliceParameterBuffer in
> multi slice per frame encoding. If the user only passes the packed
> slice_header data for one slice before VAEncSliceParameterbuffer
> one by one, it still can work without this patch.

Hi, Sreerenj

    Thanks for your patch.
    But I have two concerns about this patch and following patch(grouped
submission of packed_slice header)
    a. After this patch, it won't work when passing the packed
rawdata/slice header like the below order for one slice(Of course they
are passed before VAEncSliceParameterBuffer).
       >packed rawdata 0, slice_header , packed rawdata 1;
       
       In such case the packed rawdata 1 won't be inserted as expected.

       Without this patch, it will firstly insert packed rawdata 0/1 and
then insert the slice_header. 

       If so, it will be better that a new structure is added to store
the packed slice_header data. 

    b. The next patch will try to group the submission of packed
slice_header data for multi-slices. If the frame is divided into four
slices and three slice header data are passed, how will it be handled?
And how to decide which slice header data is inserted for one slice? As
you know, the current mechanism is that the slice_header data is
optional.(That is to say: For one slice the driver will firstly try to
insert the slice_header data passed from user. If it doesn't exist, it
will generate the data by itself.) So the submission of slice_header
data is also based on the VAEncSliceParameterBuffer delimeter.

Thanks.
    Yakui  

> ---
>  src/i965_drv_video.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 44da864..4854a62 100755
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -2341,8 +2341,7 @@ i965_encoder_render_picture(VADriverContextP ctx,
>                  vaStatus = VA_STATUS_ERROR_INVALID_PARAMETER;
>                  return vaStatus;
>              }
> -            if (encode->last_packed_header_type == VAEncPackedHeaderRawData 
> ||
> -                encode->last_packed_header_type == VAEncPackedHeaderSlice) {
> +            if (encode->last_packed_header_type == VAEncPackedHeaderRawData) 
> {
>                  vaStatus = I965_RENDER_ENCODE_BUFFER(packed_header_data_ext);
>                  if (vaStatus == VA_STATUS_SUCCESS) {
>                      /* store the first index of the packed header data for 
> current slice */
> @@ -2351,6 +2350,10 @@ i965_encoder_render_picture(VADriverContextP ctx,
>                               SLICE_PACKED_DATA_INDEX_TYPE | 
> (encode->num_packed_header_data_ext - 1);
>                      }
>                      
> encode->slice_rawdata_count[encode->num_slice_params_ext]++;
> +                }
> +         } else if (encode->last_packed_header_type == 
> VAEncPackedHeaderSlice) {
> +                vaStatus = I965_RENDER_ENCODE_BUFFER(packed_header_data_ext);
> +                if (vaStatus == VA_STATUS_SUCCESS) {
>                      if (encode->last_packed_header_type == 
> VAEncPackedHeaderSlice) {
>                          if 
> (encode->slice_header_index[encode->num_slice_params_ext] == 0) {
>                              
> encode->slice_header_index[encode->num_slice_params_ext] =


_______________________________________________
Libva mailing list
Libva@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to