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]); /* 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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libva