[FFmpeg-trac] #6555(undetermined:open): fate-filter-pixfmts-scale test fails on big-endian systems

FFmpeg trac at avcodec.org
Mon Jul 31 19:54:18 EEST 2017


#6555: fate-filter-pixfmts-scale test fails on big-endian systems
-------------------------------------+-------------------------------------
             Reporter:  jcowgill     |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by jcowgill):

 Found a fix. I think the bug was that {{{alpSrc}}} needed to be cast to an
 {{{int32_t **}}} first. I can submit a proper patch tomorrow, but if
 someone else wants to then please go ahead.


 {{{
 --- a/libswscale/output.c
 +++ b/libswscale/output.c
 @@ -2026,16 +2026,17 @@ yuv2gbrp16_full_X_c(SwsContext *c, const int16_t
 *lumFilter,
                      const int16_t **lumSrcx, int lumFilterSize,
                      const int16_t *chrFilter, const int16_t **chrUSrcx,
                      const int16_t **chrVSrcx, int chrFilterSize,
 -                    const int16_t **alpSrc, uint8_t **dest,
 +                    const int16_t **alpSrcx, uint8_t **dest,
                      int dstW, int y)
  {
      const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->dstFormat);
      int i;
 -    int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrc;
 +    int hasAlpha = (desc->flags & AV_PIX_FMT_FLAG_ALPHA) && alpSrcx;
      uint16_t **dest16 = (uint16_t**)dest;
      const int32_t **lumSrc  = (const int32_t**)lumSrcx;
      const int32_t **chrUSrc = (const int32_t**)chrUSrcx;
      const int32_t **chrVSrc = (const int32_t**)chrVSrcx;
 +    const int32_t **alpSrc = (const int32_t**)alpSrcx;
      int A = 0; // init to silence warning

      for (i = 0; i < dstW; i++) {
 diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-
 pixfmts-scale
 index 6ab39aea..3232476a 100644
 --- a/tests/ref/fate/filter-pixfmts-scale
 +++ b/tests/ref/fate/filter-pixfmts-scale
 @@ -23,8 +23,8 @@ gbrap10be           6d89abb9248006c3e9017545e9474654
  gbrap10le           cf974e23f485a10740f5de74a5c8c3df
  gbrap12be           1d9b57766ba9c2192403f43967cb9af0
  gbrap12le           bb1ba1c157717db3dd612a76d38a018e
 -gbrap16be           81542b96575d1fe3b239d23899f5ece3
 -gbrap16le           6feb8b9da131917abe867e0eaaf07b90
 +gbrap16be           38d45837954fdd0115a854dde3e5f91e
 +gbrap16le           76061a0dfc883449aebec1aaac188b0f
  gbrp                dc3387f925f972c61aae7eb23cdc19f0
  gbrp10be            0277d4c3a8498d75e2783fb81379e481
  gbrp10le            f3d70f8ab845c3c9b8f7452e4a6e285a
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6555#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list