[FFmpeg-devel] [PATCH] remove gcc 3.3 workaround in swscale_template.c

Diego Biurrun diego
Sun Sep 20 18:53:36 CEST 2009


There's an ugly preprocessor gcc 3.3 workaround in swscale_template.c:

  /* GCC 3.3 makes MPlayer crash on IA-32 machines when using "g" operand here,
     which is needed to support GCC 4.0. */
  #if ARCH_X86_64 && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
                  :: "m" (src1), "m" (dst), "g" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
  #else
                  :: "m" (src1), "m" (dst), "m" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
  #endif

At the very least it should be updated to use the AV_GCC_VERSION_AT_LEAST
macro from libavutil.  However, I would prefer to get rid of it
completely.  If I understand the comment correctly, deleting the whole
#else clause would be the way to achieve this.  Since I know little
enough assembler to have no real idea what "g" and "m" operands are all
about I'd like to hear an informed opinion.

Diego



More information about the ffmpeg-devel mailing list