diff --git a/gfx/layers/basic/BasicImages.cpp b/gfx/layers/basic/BasicImages.cpp
--- a/gfx/layers/basic/BasicImages.cpp
+++ b/gfx/layers/basic/BasicImages.cpp
@@ -143,23 +143,27 @@ BasicPlanarYCbCrImage::SetData(const Dat
   }
 
   gfxASurface::gfxImageFormat format = GetOffscreenFormat();
 
   // 'prescale' is true if the scaling is to be done as part of the
   // YCbCr to RGB conversion rather than on the RGB data when rendered.
   PRBool prescale = mScaleHint.width > 0 && mScaleHint.height > 0;
   if (format == gfxASurface::ImageFormatRGB16_565) {
+#if defined(HAVE_YCBCR_TO_RGB565)
     if (have_ycbcr_to_rgb565()) {
       // yuv2rgb16 with scale function not yet available for NEON
       prescale = PR_FALSE;
     } else {
       // yuv2rgb16 function not yet available for non-NEON
       format = gfxASurface::ImageFormatRGB24;
     }
+#else
+    format = gfxASurface::ImageFormatRGB24;
+#endif
   }
   gfxIntSize size(prescale ? mScaleHint.width : aData.mPicSize.width,
                   prescale ? mScaleHint.height : aData.mPicSize.height);
 
   mStride = gfxASurface::FormatStrideForWidth(format, size.width);
   mBuffer = new PRUint8[size.height * mStride];
   if (!mBuffer) {
     // out of memory
