[FFmpeg-devel] SWSCLAE: Colorspace conversion for small images

Michael Niedermayer michaelni
Thu Jul 22 14:33:52 CEST 2010


On Tue, Jul 20, 2010 at 03:43:17AM -0400, Pavel Pavlov wrote:
> I use libswscale. I had some problems when loading high quality jpegs and converting them to rgb565 (https://roundup.ffmpeg.org/issue2113 )
> Other than that I had other problems related to swsacale.
> First one is because of this code:
> #if ARCH_X86
> #define VOFW 5120
> #else
> #define VOFW 2048 // faster on PPC and not tested on others
> #endif
> 
> I use swscale on mobile and there are pictures that wider than 2048. Actually, the problematic picture required me to match 5120 for mobile build as well ;)

a patch that lifts this limitation without speedloss is welcome


> 
> 
> The other problem is the opposite end. I have some image resources in the app and some of them can be something like 4x120 pixels (for tiled background for example). What's the way to load such images with libavcodec-avformat-libswscale? Today, swscale considers them insane (doesn't pass sanity check):
> 
>     /* sanity check */
>     if (srcW<4 || srcH<1 || dstW<8 || dstH<1) { //FIXME check if these are enough and try to lowwer them after fixing the relevant parts of the code
>         av_log(NULL, AV_LOG_ERROR, "swScaler: %dx%d -> %dx%d is invalid scaling dimension\n",
> 
> Does it still need to do these checks if I simply want to do colorspace conversion without scaling? Is there any other routine that I should use to convert from YUV444 to rgb565?

as the comment says, if someone checks that they are unneeded orfixes the
parts that need them without speedloss then they can be removed

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100722/25e53507/attachment.pgp>



More information about the ffmpeg-devel mailing list