浏览代码

swscale/swscale_unscaled: avoid nv12 <-> nv21 bug

This is not handled by the planar copy wrapper, so exclude it.
Niklas Haas 8 月之前
父节点
当前提交
5b9356f18e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      libswscale/swscale_unscaled.c

+ 2 - 1
libswscale/swscale_unscaled.c

@@ -2660,7 +2660,8 @@ void ff_get_unscaled_swscale(SwsInternal *c)
         (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) &&
         (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) &&
          c->chrDstHSubSample == c->chrSrcHSubSample &&
          c->chrDstHSubSample == c->chrSrcHSubSample &&
          c->chrDstVSubSample == c->chrSrcVSubSample &&
          c->chrDstVSubSample == c->chrSrcVSubSample &&
-         isSemiPlanarYUV(srcFormat) == isSemiPlanarYUV(dstFormat))))
+         isSemiPlanarYUV(srcFormat) == isSemiPlanarYUV(dstFormat) &&
+         isSwappedChroma(srcFormat) == isSwappedChroma(dstFormat))))
     {
     {
         if (isPacked(c->opts.src_format))
         if (isPacked(c->opts.src_format))
             c->convert_unscaled = packedCopyWrapper;
             c->convert_unscaled = packedCopyWrapper;