[FFmpeg-devel] discussion around the best way to patch the swscale for Blackfin

Marc Hoffman mmhoffm
Thu Jun 14 19:45:11 CEST 2007


I'm think of creating 2 functions this psedo patch shows the idea around
unscaled converters.  Is this an acceptable approach for changing the
c->swScale, if my architecture doesn't have a filter it returns the value of
c->swScale.

Or do you think we/I should just call my function
ff_bfin_get_unscaled_swscale(c) and have it modify c->swScale directly, I
kind of liked the fact that you can see the function modifies c->swScale at
this level of the code.

Thanks
Marc

This is not a patch just an idea which I inlined for readability.

Index: swscale.c
===================================================================
--- swscale.c   (revision 23547)
+++ swscale.c   (working copy)
@@ -229,6 +229,7 @@
 static unsigned char clip_table[768];

 static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b);
+extern SwsFunc ff_bfin_get_unscaled_swscale (SwsContext *c);

 extern const uint8_t dither_2x2_4[2][8];
 extern const uint8_t dither_2x2_8[2][8];
@@ -2219,6 +2220,10 @@
             c->swScale= gray16swap;
         }

+#ifdef ARCH_BFIN
+       c->swScale = ff_bfin_get_unscaled_swscale (c);
+#endif
+
         if (c->swScale){
             if (flags&SWS_PRINT_INFO)
                 av_log(c, AV_LOG_INFO, "SwScaler: using unscaled %s -> %s
special converter\n",




More information about the ffmpeg-devel mailing list