[Libva] [PATCH] test: fix mpeg2transcode compilation issue with gcc 4.3.4
Xiang, Haihao
haihao.xiang at intel.com
Thu Apr 24 23:56:10 PDT 2014
Applied.
Thanks
Haihao
> On Thu, 2014-04-24 at 23:14 -0600, Sang, Oliver wrote:
> > diff --git a/test/transcode/mpeg2transcode.cpp b/test/transcode/mpeg2transcode.cpp
> > index fb2e06f..28ff29c 100644
> > --- a/test/transcode/mpeg2transcode.cpp
> > +++ b/test/transcode/mpeg2transcode.cpp
> > @@ -2181,9 +2181,9 @@ static void upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id)
> > u_src = newImageBuffer + y_size; /* UV offset for NV12 */
> > v_src = newImageBuffer + y_size + u_size;
> >
> > - y_dst = (unsigned char *)(surface_p + surface_image.offsets[0]);
> > - u_dst = (unsigned char *)(surface_p + surface_image.offsets[1]); /* UV offset for NV12 */
> > - v_dst = (unsigned char *)(surface_p + surface_image.offsets[2]);
> > + y_dst = (unsigned char *)((unsigned char *)surface_p + surface_image.offsets[0]);
> > + u_dst = (unsigned char *)((unsigned char *)surface_p + surface_image.offsets[1]); /* UV offset for NV12 */
> > + v_dst = (unsigned char *)((unsigned char *)surface_p + surface_image.offsets[2]);
> >
>
> This make sense.
>
> Of course the left (unsigned char *) outside of the parentheses can be
> removed. Anyway this is OK to me.
>
> reviewed-by: Zhao Yakui <yakui.zhao at intel.com>
>
> > /* Y plane */
> > for (row = 0; row < surface_image.height; row++) {
> >
> > Hi,
> >
> > We are evaluating the libva staging buffer on sles 11sp3, by default 4.3.4 gcc, the test/transcode/mpeg2trancode.cpp fail to compile as -
> > g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -g -O2 -MT mpeg2transcode.o -MD -MP -MF .deps/mpeg2transcode.Tpo -c -o mpeg2transcode.o mpeg2transcode.cpp
> > mpeg2transcode.cpp: In function 'void upload_yuv_to_surface(FILE*, VASurfaceID)':
> > mpeg2transcode.cpp:2184: error: pointer of type 'void *' used in arithmetic
> > mpeg2transcode.cpp:2185: error: pointer of type 'void *' used in arithmetic
> > mpeg2transcode.cpp:2186: error: pointer of type 'void *' used in arithmetic
> >
> > Suggest above changes to fix.
>
> >
> > BR
> > Oliver
> >
> >
> > _______________________________________________
> > Libva mailing list
> > Libva at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libva
>
>
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva
More information about the Libva
mailing list