[Libva] [libva-intel-driver][PATCH] encode/hevc: Fix condition in if ()

Xiang, Haihao haihao.xiang at intel.com
Sun Sep 6 01:52:13 PDT 2015


Thanks for your comment, I changed the log message per your suggestion.

Thanks
Haihao

> Hi Haihao,
> 
> On 3 August 2015 at 07:32, Xiang, Haihao <haihao.xiang at intel.com> wrote:
> > Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> > ---
> >  src/gen9_mfc_hevc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/gen9_mfc_hevc.c b/src/gen9_mfc_hevc.c
> > index e52e408..2d94768 100644
> > --- a/src/gen9_mfc_hevc.c
> > +++ b/src/gen9_mfc_hevc.c
> > @@ -2529,7 +2529,7 @@ gen9_hcpe_context_destroy(void *context)
> >
> >      /* mv temporal buffer */
> >      for (i = 0; i < NUM_HCP_CURRENT_COLLOCATED_MV_TEMPORAL_BUFFERS; i++) {
> > -        if (hcpe_context->reference_surfaces[i].bo != NULL)
> > +        if (hcpe_context->current_collocated_mv_temporal_buffer[i].bo != NULL)
> >              dri_bo_unreference(hcpe_context->current_collocated_mv_temporal_buffer[i].bo);
> >          hcpe_context->current_collocated_mv_temporal_buffer[i].bo = NULL;
> 
> From a person that hasn't written the patch, the commit message seems
> very vague. Something like "Check the correct BO before unreferencing
> it." might be more meaningful.
> 
> I've noticed that libva{,-intel-driver} normally does not use
> temporary variables to store such long variable/member names.
> Something like "encode/hevc: Check slice type first in case user
> passes wrong parameters to driver" seems good approach, why don't you
> apply it here ?
> 
> Thanks
> Emil




More information about the Libva mailing list