]> granicus.if.org Git - libvpx/commitdiff
Fix compilation with -werror
authorJohn Koleszar <jkoleszar@google.com>
Wed, 20 Jun 2012 04:05:36 +0000 (21:05 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Wed, 20 Jun 2012 16:43:42 +0000 (09:43 -0700)
Fix a last few warnings with multithread, arm, 32 bit

Change-Id: Ic7c67616c370d0ff87562a232fb1e5df0702dc86

vp8/decoder/decodframe.c
vp8/encoder/onyx_if.c
vpx_scale/arm/neon/yv12extend_arm.c
vpxenc.c

index 7cb968742938491d73ad0ec00fd00067c8124e23..677e2225989de2dabc6a758fa89df24d20a9d05b 100644 (file)
@@ -849,10 +849,10 @@ int vp8_decode_frame(VP8D_COMP *pbi)
 #endif
 
 #if CONFIG_MULTITHREAD
-
                 if (pbi->b_multithreaded_rd)
                     vp8mt_alloc_temp_buffers(pbi, pc->Width, prev_mb_rows);
-
+#else
+                (void)prev_mb_rows;
 #endif
                 frame_size_change = 1;
             }
index 968208e87886854cfbc6dc1ffe65fb53250059f3..d58e334a07cf66914687673786d2c75711fedd90 100644 (file)
@@ -57,10 +57,6 @@ extern unsigned int vp8_get_processor_freq();
 extern void print_tree_update_probs();
 extern void vp8cx_create_encoder_threads(VP8_COMP *cpi);
 extern void vp8cx_remove_encoder_threads(VP8_COMP *cpi);
-#if HAVE_NEON
-extern void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
-extern void vp8_yv12_copy_src_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
-#endif
 
 int vp8_estimate_entropy_savings(VP8_COMP *cpi);
 
index 7529fc6347b22ab6767998cde6ed082abf2c488c..6f34ce37f4f6013675a999ff840249b4cde0888e 100644 (file)
@@ -8,16 +8,13 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include "vpx_rtcd.h"
 
-#include "vpx_scale/yv12config.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_scale/vpxscale.h"
+extern void vp8_yv12_copy_frame_func_neon(struct yv12_buffer_config *src_ybc,
+                                          struct yv12_buffer_config *dst_ybc);
 
-extern void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc,
-                                          YV12_BUFFER_CONFIG *dst_ybc);
-
-void vp8_yv12_copy_frame_neon(YV12_BUFFER_CONFIG *src_ybc,
-                              YV12_BUFFER_CONFIG *dst_ybc)
+void vp8_yv12_copy_frame_neon(struct yv12_buffer_config *src_ybc,
+                              struct yv12_buffer_config *dst_ybc)
 {
     vp8_yv12_copy_frame_func_neon(src_ybc, dst_ybc);
 
index be862f60645695e651beb2aac3ab0ce2d529de89..034644fe92091fb6154f82e6acf2055cacae1f4f 100644 (file)
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -54,11 +54,7 @@ typedef __int64 off_t;
 #define off_t off64_t
 #endif
 
-#if defined(_MSC_VER)
-#define LITERALU64(n) n
-#else
-#define LITERALU64(n) n##LLU
-#endif
+#define LITERALU64(hi,lo) ((((uint64_t)hi)<<32)|lo)
 
 /* We should use 32-bit file operations in WebM file format
  * when building ARM executable file (.axf) with RVCT */
@@ -68,6 +64,22 @@ typedef long off_t;
 #define ftello ftell
 #endif
 
+/* Swallow warnings about unused results of fread/fwrite */
+static size_t wrap_fread(void *ptr, size_t size, size_t nmemb,
+                         FILE *stream)
+{
+    return fread(ptr, size, nmemb, stream);
+}
+#define fread wrap_fread
+
+static size_t wrap_fwrite(const void *ptr, size_t size, size_t nmemb,
+                          FILE *stream)
+{
+    return fwrite(ptr, size, nmemb, stream);
+}
+#define fwrite wrap_fwrite
+
+
 static const char *exec_name;
 
 static const struct codec_item
@@ -599,7 +611,7 @@ Ebml_StartSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc,
 {
     /* todo this is always taking 8 bytes, this may need later optimization */
     /* this is a key that says length unknown */
-    uint64_t unknownLen = 0x01FFFFFFFFFFFFFF;
+    uint64_t unknownLen = LITERALU64(0x01FFFFFF, 0xFFFFFFFF);
 
     Ebml_WriteID(glob, class_id);
     *ebmlLoc = ftello(glob->stream);
@@ -617,7 +629,7 @@ Ebml_EndSubElement(EbmlGlobal *glob, EbmlLoc *ebmlLoc)
 
     /* Calculate the size of this element */
     size = pos - *ebmlLoc - 8;
-    size |= 0x0100000000000000;
+    size |= LITERALU64(0x01000000,0x00000000);
 
     /* Seek back to the beginning of the element and write the new size */
     fseeko(glob->stream, *ebmlLoc, SEEK_SET);