<div>Hi,<br></div><div><br></div><div>I've recently been testing image decoding and scaling with FFmpeg (compiled with mingw as dlls on Windows 7 x64),</div><div>and everything has been working smoothly with the exception of two problems.</div>
<div><br></div><div>Both problems are seemingly related to down-scaling of large images.</div><div>As mentioned in the subject, I experienced these issues while testing bmp files.</div><div><br></div><div>1. The first issue happens, when I try down-scaling a large bitmap (4608x3328) to a much smaller size (e.g. 256x185).</div>
<div>The resulting image resembles the original, however all colours have become slightly more green during the scaling. </div><div>Basically the output looks as if it has gotten a green tint/overlay.</div><div><br></div>
<div>Initial testing was done with sws_scale via a small test application I've written. The conversion was from BGR24 to BGR24. </div><div>After noticing the problem, I consequently tried to reproduce the issue with FFmpeg.exe (Zeranoe's build), and the results were identical. </div>
<div><br></div><div>To reproduce:</div><div>Get a large bitmap such as this: <a href="http://wa8lmf.net/MapCaptureTool/Google-Terrain-SoCal-Zoom-12.htm">http://wa8lmf.net/MapCaptureTool/Google-Terrain-SoCal-Zoom-12.htm</a></div>
<div>Use FFmpeg.exe with the following command: ffmpeg.exe -i path\to\image -s 256x185 path\to\output.bmp</div><div><br></div><div>To see a properly coloured output, change the output extension to .jpg instead.</div><div>
<br></div><div>Am I doing something wrong here, or could this be an sws_scale bgr2bgr error?</div><div><br></div><div><br></div><div>2. The second issue has to do with extreme down-scaling. If we use the linked image from above as an example.</div>
<div>If I were to scale it down to something as small as 64x46, I would get an error telling me to increase the MAX_FILTER_SIZE,</div><div>to accomplish such extreme scaling. </div><div>Now, if I increase the MAX_FILTER_SIZE, the extreme scaling works, but the output is corrupt, and normal scaling of other images</div>
<div>results in a crash. </div><div><br></div><div>I simply doubled the size of MAX_FILTER_SIZE, to keep the format. Perhaps that was the wrong action?</div><div>Would it be better to simply perform consecutively smaller down-scale operations on the image until the destination size has been reached?</div>
<div><br></div><div><br></div><div>Oh! And one very interesting note: Both issues were resolved, when I used FFmpeg dlls compiled with the MSVC toolchain (same config). Hmm...</div><div><br></div><div>I will happily provide additional information if required (build configuration etc).</div>
<div>Thanks for your help, and for FFmpeg.</div><div><br></div><div><br></div>