shithub: libvpx

Download patch

ref: 91657abef2e498454bd6483bb6d330d971eebbb4
parent: 2040bb58fbec7d06d5bdb1f6628bb058d3132ebf
author: James Zern <[email protected]>
date: Wed Oct 15 12:37:35 EDT 2014

fix CONFIG_SPATIAL_SVC warning

this change checks that CONFIG_SPATIAL_SVC is defined and adds a TODO to
ensure this is changed in the future as the release headers can't
depend on vpx_config.h.

vpx/vpx_encoder.h:164:5: warning: "CONFIG_SPATIAL_SVC" is not defined
[-Wundef]

Change-Id: I797a0150e5f56caf048e7ee00b282fbc9c5ede19

--- a/vpx/vpx_encoder.h
+++ b/vpx/vpx_encoder.h
@@ -161,7 +161,9 @@
     VPX_CODEC_STATS_PKT,       /**< Two-pass statistics for this frame */
     VPX_CODEC_FPMB_STATS_PKT,  /**< first pass mb statistics for this frame */
     VPX_CODEC_PSNR_PKT,        /**< PSNR statistics for this frame */
-#if CONFIG_SPATIAL_SVC
+    // TODO(minghai): This is for testing purporses. The released library can't
+    // depend on vpx_config.h
+#if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC
     VPX_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/
     VPX_CODEC_SPATIAL_SVC_LAYER_PSNR, /**< PSNR for each layer in this frame*/
 #endif
@@ -201,7 +203,9 @@
         double       psnr[4];     /**< PSNR, total/y/u/v */
       } psnr;                       /**< data for PSNR packet */
       vpx_fixed_buf_t raw;     /**< data for arbitrary packets */
-#if CONFIG_SPATIAL_SVC
+      // TODO(minghai): This is for testing purporses. The released library
+      // can't depend on vpx_config.h
+#if defined(CONFIG_SPATIAL_SVC) && CONFIG_SPATIAL_SVC
       size_t layer_sizes[VPX_SS_MAX_LAYERS];
       struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS];
 #endif