Merge commit '05b0998f511ffa699407465d48c7d5805f746ad2'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Jan 2013 13:06:22 +0000 (14:06 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Jan 2013 13:11:31 +0000 (14:11 +0100)
* commit '05b0998f511ffa699407465d48c7d5805f746ad2':
  dsputil: Fix error by not using redzone and register name
  swscale: GBRP output support

Conflicts:
libswscale/output.c
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/utils.c
tests/ref/lavfi/pixdesc
tests/ref/lavfi/pixfmts_copy
tests/ref/lavfi/pixfmts_null
tests/ref/lavfi/pixfmts_scale
tests/ref/lavfi/pixfmts_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/x86/hpeldsp.asm
libavcodec/x86/mpeg4qpel.asm
libswscale/output.c
libswscale/swscale_internal.h
libswscale/utils.c

Simple merge
Simple merge
@@@ -1367,24 -1261,16 +1367,24 @@@ YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_
  YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full,  AV_PIX_FMT_BGR24, 0)
  YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full,  AV_PIX_FMT_RGB24, 0)
  
 +YUV2RGBWRAPPERX(yuv2, rgb_full, bgr4_byte_full,  AV_PIX_FMT_BGR4_BYTE, 0)
 +YUV2RGBWRAPPERX(yuv2, rgb_full, rgb4_byte_full,  AV_PIX_FMT_RGB4_BYTE, 0)
 +YUV2RGBWRAPPERX(yuv2, rgb_full, bgr8_full,   AV_PIX_FMT_BGR8,  0)
 +YUV2RGBWRAPPERX(yuv2, rgb_full, rgb8_full,   AV_PIX_FMT_RGB8,  0)
 +
  static void
  yuv2gbrp_full_X_c(SwsContext *c, const int16_t *lumFilter,
-                           const int16_t **lumSrc, int lumFilterSize,
-                           const int16_t *chrFilter, const int16_t **chrUSrc,
-                           const int16_t **chrVSrc, int chrFilterSize,
-                           const int16_t **alpSrc, uint8_t **dest,
-                           int dstW, int y)
+                   const int16_t **lumSrc, int lumFilterSize,
+                   const int16_t *chrFilter, const int16_t **chrUSrc,
+                   const int16_t **chrVSrc, int chrFilterSize,
+                   const int16_t **alpSrc, uint8_t **dest,
+                   int dstW, int y)
  {
 +    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
      int i;
      int hasAlpha = 0;
 +    uint16_t **dest16 = (uint16_t**)dest;
 +    int SH = 22 + 7 - desc->comp[0].depth_minus1;
  
      for (i = 0; i < dstW; i++) {
          int j;
Simple merge
@@@ -991,39 -938,11 +991,39 @@@ av_cold int sws_init_context(SwsContex
      getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat);
      getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat);
  
 -    if (dstFormat == AV_PIX_FMT_GBRP) {
 +
 +    if (isAnyRGB(dstFormat) && !(flags&SWS_FULL_CHR_H_INT)) {
 +        if (dstW&1) {
 +            av_log(c, AV_LOG_DEBUG, "Forcing full internal H chroma due to odd output size\n");
 +            flags |= SWS_FULL_CHR_H_INT;
 +            c->flags = flags;
 +        }
 +    }
 +
 +    if(dstFormat == AV_PIX_FMT_BGR4_BYTE ||
 +       dstFormat == AV_PIX_FMT_RGB4_BYTE ||
 +       dstFormat == AV_PIX_FMT_BGR8 ||
 +       dstFormat == AV_PIX_FMT_RGB8) {
 +        if (flags & SWS_ERROR_DIFFUSION && !(flags & SWS_FULL_CHR_H_INT)) {
 +            av_log(c, AV_LOG_DEBUG,
 +                "Error diffusion dither is only supported in full chroma interpolation for destination format '%s'\n",
 +                av_get_pix_fmt_name(dstFormat));
 +            flags   |= SWS_FULL_CHR_H_INT;
 +            c->flags = flags;
 +        }
 +        if (!(flags & SWS_ERROR_DIFFUSION) && (flags & SWS_FULL_CHR_H_INT)) {
 +            av_log(c, AV_LOG_DEBUG,
 +                "Ordered dither is not supported in full chroma interpolation for destination format '%s'\n",
 +                av_get_pix_fmt_name(dstFormat));
 +            flags   |= SWS_ERROR_DIFFUSION;
 +            c->flags = flags;
 +        }
 +    }
 +    if (isPlanarRGB(dstFormat)) {
          if (!(flags & SWS_FULL_CHR_H_INT)) {
              av_log(c, AV_LOG_DEBUG,
-                 "%s output is not supported with half chroma resolution, switching to full\n",
-                 av_get_pix_fmt_name(dstFormat));
+                    "%s output is not supported with half chroma resolution, switching to full\n",
+                    av_get_pix_fmt_name(dstFormat));
              flags   |= SWS_FULL_CHR_H_INT;
              c->flags = flags;
          }