On Wed, 2014-05-28 at 11:14 +0300, Sreerenj wrote:
> Hi,
> On 28.05.2014 11:07, Zhao, Yakui wrote:
> > On Wed, 2014-05-28 at 10:10 +0300, sreerenj.balachand...@intel.com
> > wrote:
> >> From: Sreerenj Balachandran <sreerenj.balachand...@intel.com>
> >>
> >> Avoid storing packed slice header index as packed raw data index.
> >> This is necessary for handling the use case of having
> >> only packed slice header and no packed raw data feeding from user.
> > Hi, Screerenj
> >      Thanks for your patch. It looks good to me.
> >   
> > BTW: Can it handle the case of having only packed slice_header if this
> > patch is not applied?
> The use case having only packed_slice_headers in a mulit-slice-per-frame 
> scenario won't work if the user submit all packed_slice headers before
> submitting the VAEncSliceParameterBuffer.  It should be possible to 
> submit the packed_slice_headers with out pairing with the submission of
> VAEncSliceParameterBuffer. right? I am preparing another patch to handle 
> this case.

Understand your concern. 
This patch is required to do the preparation of submitting all the
packed slice_headers before VAEncSliceparameterBuffer. Right?

If it only passes the packed slice_header data for one slice before
VAEncSliceParameterbuffer one by one, it still can work without this
patch. Right?

If so, it will be better that you can add this description.



> > In fact when inserting the packing data, the packed slice_header info
> > will be deferred to the last step although it is also tracked in packed
> > rawdata type.
> >
> > 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 c5a4f37..b69c606 100755
> >> --- a/src/i965_drv_video.c
> >> +++ b/src/i965_drv_video.c
> >> @@ -2334,8 +2334,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 */
> >> @@ -2344,6 +2343,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