[FFmpeg-user] sws_scale problem from BGRA to YUV420P

Julen Garcia jgarcia at vicomtech.org
Wed Apr 20 10:30:02 CEST 2011


Hi,

Here are the results I get after different test sets. if you need more
info or logs, just ask ;)

Thank you in advance.

___________

ffmpeg -vstats -benchmark -f image2 -i "input24.png" -vf
"format=bgr24" -vcodec libx264 -vpre lossless_ultrafast -crf 22 -b
10000k -threads 0 OUTPUT.mp4

[scale @ 0000000001918BF0] w:1280 h:720 fmt:rgb24 -> w:1280 h:720
fmt:bgr24 flags:0x4

[scale @ 0000000001918D30] w:1280 h:720 fmt:bgr24 -> w:1280 h:720
fmt:yuv420p flags:0x4

result: Ok

http://dl.dropbox.com/u/17827310/ffmpeg/input24.png

Image internal format = rgb24, forced to bgr24

http://dl.dropbox.com/u/17827310/ffmpeg/output24_bgr24.png


___________

ffmpeg -vstats -benchmark -f image2 -i "input24.png" -vcodec libx264
-vpre lossless_ultrafast -crf 22 -b 10000k -threads 0 OUTPUT.mp4

[scale @ 0000000000342090] w:1280 h:720 fmt:rgb24 -> w:1280 h:720
fmt:yuv420p flags:0x4

result: Bad

http://dl.dropbox.com/u/17827310/ffmpeg/input24.png

Image internal format = rgb24

http://dl.dropbox.com/u/17827310/ffmpeg/output24_rgb24.png

___________

ffmpeg -vstats -benchmark -f image2 -i "input32.png" -vf "format=bgra"
-vcodec libx264 -vpre lossless_ultrafast -crf 22 -b 10000k -threads 0
OUTPUT.mp4

or

ffmpeg -vstats -benchmark -f image2 -i "input32.png" -vcodec libx264
-vpre lossless_ultrafast -crf 22 -b 10000k -threads 0 OUTPUT.mp4

[scale @ 0000000001952090] w:1280 h:720 fmt:bgra -> w:1280 h:720
fmt:yuv420p flags:0x4

result: Bad

http://dl.dropbox.com/u/17827310/ffmpeg/input32.png

Image internal format = bgra

http://dl.dropbox.com/u/17827310/ffmpeg/output32.png


More information about the ffmpeg-user mailing list