Merge commit 'd6d5ef5534d582f9dbaf18ac2605cf5bb72cd821'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 10 Feb 2013 12:48:21 +0000 (13:48 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 10 Feb 2013 12:49:53 +0000 (13:49 +0100)
* commit 'd6d5ef5534d582f9dbaf18ac2605cf5bb72cd821':
  sws: GBRP9, GBRP10, and GBRP16 output support

Conflicts:
libswscale/output.c
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 
libswscale/output.c
libswscale/utils.c

@@@ -1567,10 -1437,8 +1567,12 @@@ av_cold void ff_sws_init_output_funcs(S
          case AV_PIX_FMT_GBRP9LE:
          case AV_PIX_FMT_GBRP10BE:
          case AV_PIX_FMT_GBRP10LE:
 +        case AV_PIX_FMT_GBRP12BE:
 +        case AV_PIX_FMT_GBRP12LE:
 +        case AV_PIX_FMT_GBRP14BE:
 +        case AV_PIX_FMT_GBRP14LE:
+         case AV_PIX_FMT_GBRP16BE:
+         case AV_PIX_FMT_GBRP16LE:
              *yuv2anyX = yuv2gbrp_full_X_c;
              break;
          }
@@@ -991,34 -938,6 +991,33 @@@ av_cold int sws_init_context(SwsContex
      getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat);
      getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat);
  
 +    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,