[FFmpeg-devel] need help fixing sws on PPC

Vitor Sessak vitor1001
Sun Oct 5 13:43:49 CEST 2008


Michael Niedermayer escreveu:
> Hi
>
> Can someone who has a PPC and a x86 play a little with swscale to find
> out which convertions do not match?
> This is rather important as our regression tests as well as fate depend
> on it.
> Note -sws_flags +bitexact should be used also -sws_flags +accurate_rnd
> may be needed.
> Also note, some scalers still use floats to find coeffs (like spline)
> iam not interrested in them, that is currently area, nearest neighbor
> bilinear and bicubic are the onlx ones iam interrested in.
>
> And last, if something does not match, pleas explain how it does differ
> +-1 rounding or red/blue exchanged or ...
>   

Besides rounding, there is still something wierd about swscale. For 
example, I was looking at he idcin test 
http://fate.multimedia.cx/index.php?test_spec=107 .

With --enable-swscale:

vitor at vitor:~$ ffmpeg -i idlog-2MB.cin -pix_fmt rgb24 -f framecrc -

FFmpeg version SVN-r15554, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --cc=ccache gcc --enable-gpl --enable-swscale
  libavutil     49.11. 0 / 49.11. 0
  libavcodec    52. 0. 0 / 52. 0. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  built on Sep 10 2008 12:11:05, gcc: 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Input #0, idcin, from 'idlog-2MB.cin':
  Duration: 00:00:23.78, start: 0.000000, bitrate: 705 kb/s
    Stream #0.0: Video: idcinvideo, pal8, 320x240, 14.00 tb(r)
    Stream #0.1: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705 kb/s
Output #0, framecrc, to 'pipe:':
    Stream #0.0: Video: rawvideo, rgb24, 320x240, q=2-31, 200 kb/s, 
14.00 tb(c)
    Stream #0.1: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=   52 fps= 15 q=0.0 Lsize=       3kB time=3.71 bitrate=   
6.4kbits/s   
video:11700kB audio:320kB global headers:0kB muxing overhead -99.975838%
0, 0, 230400, 0x00000000
1, 0, 6300, 0xdd759df8
0, 6429, 230400, 0x3a3486b4
1, 6429, 6300, 0x43aa398c
0, 12857, 230400, 0xb6a9b772
1, 12857, 6300, 0x61a7b9fd
0, 19286, 230400, 0x8e2d4c03
1, 19286, 6300, 0xfc8adbc8
0, 25714, 230400, 0x5df342a9
1, 25714, 6300, 0x84c4dffc

[...etc...]

Without --enable-swscaler

vitor at vitor:~$ ffmpeg -i idlog-2MB.cin -pix_fmt rgb24 -f framecrc -

FFmpeg version SVN-r15554, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --cc=ccache gcc --enable-gpl --enable-swscale
  libavutil     49.11. 0 / 49.11. 0
  libavcodec    52. 0. 0 / 52. 0. 0
  libavformat   52.22. 1 / 52.22. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 6. 1 /  0. 6. 1
  built on Sep 10 2008 12:11:05, gcc: 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Input #0, idcin, from 'idlog-2MB.cin':
  Duration: 00:00:23.78, start: 0.000000, bitrate: 705 kb/s
    Stream #0.0: Video: idcinvideo, pal8, 320x240, 14.00 tb(r)
    Stream #0.1: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705 kb/s
Output #0, framecrc, to 'pipe:':
    Stream #0.0: Video: rawvideo, rgb24, 320x240, q=2-31, 200 kb/s, 
14.00 tb(c)
    Stream #0.1: Audio: pcm_s16le, 22050 Hz, stereo, s16, 705 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=   52 fps= 13 q=0.0 Lsize=       3kB time=3.71 bitrate=   
6.4kbits/s   
video:11700kB audio:320kB global headers:0kB muxing overhead -99.975838%
0, 0, 230400, 0x00000000
1, 0, 6300, 0xdd759df8
0, 6429, 230400, 0x4bd609e4
1, 6429, 6300, 0x43aa398c
0, 12857, 230400, 0xd63fc07f
1, 12857, 6300, 0x61a7b9fd
0, 19286, 230400, 0xc62f04e6
1, 19286, 6300, 0xfc8adbc8
0, 25714, 230400, 0xc9747e73
1, 25714, 6300, 0x84c4dffc


Unless I am missing something, there should be no calculation (and even 
less rounding) doing PAL8 -> RGB conversion, but it still gives 
different output with and without swscaler.

-Vitor




More information about the ffmpeg-devel mailing list