#3495: Call to sws_getCachedContext() with SWS_BICUBLIN will always raise an
assert exception
---------------------------------+--------------------------------------
             Reporter:  cyril    |                     Type:  defect
               Status:  new      |                 Priority:  important
            Component:  swscale  |                  Version:  git-master
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+--------------------------------------
 Summary of the bug: A call to {{{sws_getCachedContext()}}} with
 SWS_BICUBLIN as the flag will always raise the assert exception at line
 377 of libswscale/util.c {{{av_assert0(sizeFactor > 0)}}}.

 How to reproduce:
 In a dummy program, make this call:
 {{{
 SwsContext *pSwsContext = NULL;
 sws_getCachedContext(pSwsContext,
             720, 406,AV_PIX_FMT_YUV420P,
             256, 144, AV_PIX_FMT_BGRA,
             SWS_BICUBLIN, NULL, NULL, NULL
         );
 }}}
 It will always raise the above assert exception.

 This is a regression introduced by this commit:
 {{{
 2013-11-05      Stefano Sabatini        lsws/utils: introduce
 scale_algorithms array
 }}}
 Indeed, {{{sws_init_context()}}} is called, which in turn calls
 {{{initFilter()}}} twice, first for the luma component then for the chroma
 component. The assert is raised for the chroma component.
 A possible fix is to reshuffle the {{{static const ScaleAlgorithm
 scale_algorithms[]}}} rows so that SWS_BICUBLIN is set after SWS_BILINEAR
 and not before.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3495>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://avcodec.org/mailman/listinfo/ffmpeg-trac

Reply via email to