[FFmpeg-devel] [PATCH] swscale: factorize plane copying code out of 2 functions

Michael Niedermayer michaelni
Sun Sep 26 23:14:36 CEST 2010


On Sun, Sep 26, 2010 at 05:40:01PM -0300, Ramiro Polla wrote:
> On Fri, Sep 17, 2010 at 9:10 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, Sep 16, 2010 at 11:19:22AM -0300, Ramiro Polla wrote:
> >> On Thu, Sep 16, 2010 at 11:08 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > On Wed, Sep 15, 2010 at 10:14:30PM -0300, Ramiro Polla wrote:
> >> >> ?swscale.c | ? ?2 +-
> >> >> ?1 file changed, 1 insertion(+), 1 deletion(-)
> >> >> 711561766d150bb05875d28bc61a1f3419d18cd3 ?copyPlane_width_stride.diff
> >> >> Index: swscale.c
> >> >> ===================================================================
> >> >> --- swscale.c (revision 32258)
> >> >> +++ swscale.c (working copy)
> >> >> @@ -1313,7 +1313,7 @@
> >> >> ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dst, int dstStride)
> >> >> ?{
> >> >> ? ? ?dst += dstStride * srcSliceY;
> >> >> - ? ?if (dstStride == srcStride && srcStride > 0) {
> >> >> + ? ?if (width == dstStride == srcStride && srcStride > 0) {
> >> >
> >> > that does not work
> >>
> >> heh, late at night I sometimes forget C syntax doesn't work like
> >> normal math. but is this the correct idea?
> >
> >> ?swscale.c | ? ?2 +-
> >> ?1 file changed, 1 insertion(+), 1 deletion(-)
> >> da7fc52b2199dce621c4bbe6080369eeac9b2cae ?copyPlane_width_stride_2.diff
> >> Index: swscale.c
> >> ===================================================================
> >> --- swscale.c (revision 32265)
> >> +++ swscale.c (working copy)
> >> @@ -1313,7 +1313,7 @@
> >> ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dst, int dstStride)
> >> ?{
> >> ? ? ?dst += dstStride * srcSliceY;
> >> - ? ?if (dstStride == srcStride && srcStride > 0) {
> >> + ? ?if (width == dstStride && width == srcStride && srcStride > 0) {
> >
> > can this code be called with >8bps <8bps formats?
> 
> No, and it's not supposed to. There's planarCopyWrapper() for >8bps.
> This one's only used by nv12 (mix of planar/packed so it needs its own
> function) and yvu9ToYv12.

ok then

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

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100926/0f5935bb/attachment.pgp>



More information about the ffmpeg-devel mailing list