[Ffmpeg-devel] Compile swscale examples

Luca Abeni lucabe72
Sun Aug 20 16:22:26 CEST 2006

Hi Michael,

On Sun, 2006-08-20 at 12:05 +0200, Michael Niedermayer wrote:
> Hi
> On Sun, Aug 20, 2006 at 11:39:59AM +0200, Luca Abeni wrote:
> > Hi all,
> > 
> > the attached patch enables the compilation of swscale-example and
> > cs_test. Is it ok to commit it?
> > 
> > Also, what output should I expect from swscale-example?
> try some old mplayer checkout when it did still compile 
Well, I already had this idea...
But then my question is: does anyone know an svn revision which had
swscale-example building and working?
I am trying to find one looking at the svn log:
- My first commit on libswscale was r18866 (Move postproc --->
libswscale), so I checked out r18865 (I think :) with 
svn checkout -r  18865 svn://svn.mplayerhq.hu/mplayer/trunk mplayer-oldswscaler
swscale-example builds correctly, but it segfaults:
luca at nowhere:~/tmp/Devel/mplayer-oldswscaler/postproc$ ./swscale-example 
Planar YVU9 -> Planar YVU9
 Planar YVU9 96x96 -> Planar YVU9   64x  64 flags= 1 SSD=   11, 1289,  622
 Planar YVU9 96x96 -> Planar YVU9   64x  64 flags=16 SSD=  304,   47,   56
Segmentation fault

- The current code (compiled after applying my patch) does not segfault

- I tried some older versions:
  - r17368 does not compile
  - r17632 fixes the compilation, but it segfaults in the same way as 
  - it looks like the compilation was broken by r13374, so I tried 
    r13373, which segfaults (but in a different way, after printing
    more lines:
BGR 16-bit -> Planar YV12
BGR 16-bit -> Planar I420
BGR 16-bit -> BGR 15-bit
BGR 16-bit -> BGR 16-bit
BGR 16-bit -> BGR 24-bit
BGR 16-bit -> BGRA
BGR 16-bit -> RGB 24-bit
BGR 16-bit -> RGBA
BGR 16-bit -> Planar Y800
BGR 24-bit -> Planar YVU9
 BGR 24-bit 96x96 -> Planar YVU9   64x  64 flags=16 SSD=  897,  229,  297
 BGR 24-bit 96x96 -> Planar YVU9   64x  96 flags=16 SSD=  295,   21,   25
Segmentation fault

  - I then tried a very old version, r9988, which segfaults again

So the current version of libswscale is the only one I was able to find
that does not segfault (I did not check anything after r18866, because
my goal was to see if my changes broke something)

> > +void mp_msg( int x, int y, const char *format, ... ){
> > +    va_list va;
> > +    va_start(va, format);
> > +    vfprintf(stderr, format, va);
> > +    va_end(va);
> > +}
> iam against this, whichever code uses mp_msg in swscale should be changed
Well, it's not in swscale :)
cs_test needs ../cpudetect.c, which uses mp_msg.
I did the simplest change that permitted to compile the test without
changing its semantic. If needed, I can try to modify it to avoid using
files outside libswscale


More information about the ffmpeg-devel mailing list