[Libva] [PATCH] test/transcode/mpeg2transcode:remove warning message

Hai Lan hai.lan at intel.com
Tue Oct 25 08:38:45 PDT 2011


Signed-off-by: Hai Lan <hai.lan at intel.com>
---
 test/transcode/mpeg2transcode.cpp |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/test/transcode/mpeg2transcode.cpp b/test/transcode/mpeg2transcode.cpp
index 3b55581..4695c2e 100644
--- a/test/transcode/mpeg2transcode.cpp
+++ b/test/transcode/mpeg2transcode.cpp
@@ -1970,7 +1970,7 @@ struct upload_thread_param
 static void 
 upload_yuv_to_surface(FILE *yuv_fp, VASurfaceID surface_id);
 
-struct {
+struct _avcenc_context{
     VAEncSequenceParameterBufferH264 seq_param;
     VAEncPictureParameterBufferH264 pic_param;
     VAEncSliceParameterBufferH264 slice_param[MAX_SLICES];
@@ -1993,7 +1993,8 @@ struct {
     struct upload_thread_param upload_thread_param;
     pthread_t upload_thread_id;
     int upload_thread_value;
-} avcenc_context;
+};
+struct _avcenc_context avcenc_context;
 
 static void create_encode_pipe()
 {
@@ -2179,9 +2180,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 *)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 plane */
     for (row = 0; row < surface_image.height; row++) {
-- 
1.7.3.4



More information about the Libva mailing list