]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 27 Jun 2011 01:32:45 +0000 (03:32 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 27 Jun 2011 01:32:45 +0000 (03:32 +0200)
* qatar/master:
  build: improve rules for test programs
  build: factor out the .c and .S compile commands as a macro
  swscale: remove unused xInc/srcW arguments from hScale().
  H.264: disable 2tap qpel with CODEC_FLAG2_FAST and >8-bit
  H.264: make filter_mb_fast support 4:4:4
  mpeg4videoenc: Remove disabled variant of mpeg4_encode_block().
  configure: allow post-fixed cpu strings for athlon64, k8, and opteron when setting the -march flag.
  Move some variable declarations below the proper #ifdefs.

Conflicts:
Makefile
ffplay.c
libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
common.mak
configure
libavcodec/fft-test.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/mpeg4videoenc.c
libswscale/ppc/swscale_altivec.c
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/x86/swscale_template.c
subdir.mak

diff --cc common.mak
index 66bbed4a408574938954d7f171a3ab70e676eeb8,e2eaa399dab99cb18e54cc7f8044f606d26a50dc..0f8392a0351b4c1df76fcede0afe1fcec7100dbf
@@@ -5,63 -5,6 +5,69 @@@
  # first so "all" becomes default target
  all: all-yes
  
- IFLAGS   := -I. -I$(SRC_PATH)/
- CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
- CFLAGS   += $(ECFLAGS)
- YASMFLAGS += $(IFLAGS) -Pconfig.asm
 +ifndef SUBDIR
 +
 +ifndef MAIN_MAKEFILE
 +ifeq ($(SRC_PATH),.)
 +SRC_PATH = ..
 +endif
 +endif
 +
 +ifndef V
 +Q      = @
 +ECHO   = printf "$(1)\t%s\n" $(2)
 +BRIEF  = CC AS YASM AR LD HOSTCC STRIP CP
 +SILENT = DEPCC YASMDEP RM RANLIB
 +MSG    = $@
 +M      = @$(call ECHO,$(TAG),$@);
 +$(foreach VAR,$(BRIEF), \
 +    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
 +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
 +endif
 +
 +# NASM requires -I path terminated with /
-       $(CCDEP)
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
++IFLAGS     := -I. -I$(SRC_PATH)/
++CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
++CFLAGS     += $(ECFLAGS)
++CCFLAGS     = $(CFLAGS)
++YASMFLAGS  += $(IFLAGS) -Pconfig.asm
 +HOSTCFLAGS += $(IFLAGS)
 +
++define COMPILE
++       $($(1)DEP)
++       $($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
++endef
++
++COMPILE_C = $(call COMPILE,CC)
++COMPILE_S = $(call COMPILE,AS)
++
 +%.o: %.c
-       $(ASDEP)
-       $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
++      $(COMPILE_C)
 +
 +%.o: %.S
++      $(COMPILE_S)
 +
 +%.ho: %.h
 +      $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 +
 +%.ver: %.v
 +      $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
 +
 +%.c %.h: TAG = GEN
 +
 +# Dummy rule to stop make trying to rebuild removed or renamed headers
 +%.h:
 +      @:
 +
 +# Disable suffix rules.  Most of the builtin rules are suffix rules,
 +# so this saves some time on slow systems.
 +.SUFFIXES:
 +
 +# Do not delete intermediate files from chains of implicit rules
 +$(OBJS):
 +endif
 +
  OBJS-$(HAVE_MMX) +=  $(MMX-OBJS-yes)
  
  OBJS      += $(OBJS-yes)
diff --cc configure
index af3c09f7c5d3353ca86fbde54d150b73ce8f8bd6,d8454e0d23efdfece0d5fbc4c1175659d34b44a1..fb197aae551a49e78cc241edb750253dfaea33e8
+++ b/configure
@@@ -3346,7 -3274,9 +3347,8 @@@ STRIP=$stri
  CPPFLAGS=$CPPFLAGS
  CFLAGS=$CFLAGS
  ASFLAGS=$ASFLAGS
+ AS_O=$CC_O
  CC_O=$CC_O
 -DLLTOOL=$dlltool
  LDFLAGS=$LDFLAGS
  FFSERVERLDFLAGS=$FFSERVERLDFLAGS
  SHFLAGS=$SHFLAGS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index abbe37568529b47d0d4a35d9dbde093189408a97,731f1320b3d7caa8281fa7ebc93d3f9934321ce3..1f736558dfd346c9041ff42975543ba2330cbeb4
@@@ -2032,11 -1883,8 +2030,11 @@@ static av_always_inline void hyscale(Sw
          src= formatConvBuffer;
      }
  
 -    if (!c->hyscale_fast) {
 +    if (c->hScale16) {
 +        int shift= isAnyRGB(c->srcFormat) || c->srcFormat==PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
 +        c->hScale16(dst, dstWidth, (const uint16_t*)src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize, shift);
 +    } else if (!c->hyscale_fast) {
-         c->hScale(dst, dstWidth, src, srcW, xInc, hLumFilter, hLumFilterPos, hLumFilterSize);
+         c->hScale(dst, dstWidth, src, hLumFilter, hLumFilterPos, hLumFilterSize);
      } else { // fast bilinear upscale / crap downscale
          c->hyscale_fast(c, dst, dstWidth, src, srcW, xInc);
      }
@@@ -2077,13 -1921,9 +2075,13 @@@ static av_always_inline void hcscale(Sw
          src2= buf2;
      }
  
 -    if (!c->hcscale_fast) {
 +    if (c->hScale16) {
 +        int shift= isAnyRGB(c->srcFormat) || c->srcFormat==PIX_FMT_PAL8 ? 13 : av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;
 +        c->hScale16(dst1, dstWidth, (const uint16_t*)src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
 +        c->hScale16(dst2, dstWidth, (const uint16_t*)src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize, shift);
 +    } else if (!c->hcscale_fast) {
-         c->hScale(dst1, dstWidth, src1, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
-         c->hScale(dst2, dstWidth, src2, srcW, xInc, hChrFilter, hChrFilterPos, hChrFilterSize);
+         c->hScale(dst1, dstWidth, src1, hChrFilter, hChrFilterPos, hChrFilterSize);
+         c->hScale(dst2, dstWidth, src2, hChrFilter, hChrFilterPos, hChrFilterSize);
      } else { // fast bilinear upscale / crap downscale
          c->hcscale_fast(c, dst1, dst2, dstWidth, src1, src2, srcW, xInc);
      }
index c0f8e64d7065cdeca2ef763afa8b22b935132d16,9967c99edacdb4eb618299de50e235a864d7c2db..27de6b24d02932d234c17f49f7e2c0a702d61ce7
@@@ -312,14 -306,10 +312,14 @@@ typedef struct SwsContext 
                           const uint8_t *src1, const uint8_t *src2,
                           int srcW, int xInc);
  
-     void (*hScale)(int16_t *dst, int dstW, const uint8_t *src, int srcW,
-                    int xInc, const int16_t *filter, const int16_t *filterPos,
+     void (*hScale)(int16_t *dst, int dstW, const uint8_t *src,
+                    const int16_t *filter, const int16_t *filterPos,
                     int filterSize);
  
 +    void (*hScale16)(int16_t *dst, int dstW, const uint16_t *src, int srcW,
 +                   int xInc, const int16_t *filter, const int16_t *filterPos,
 +                   long filterSize, int shift);
 +
      void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
      void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); ///< Color range conversion function for chroma planes if needed.
  
Simple merge
diff --cc subdir.mak
Simple merge