[Ffmpeg-devel] pip.c - PiP (Picture in Picture) v1.0patch.Remakeof watermark.c

Mihail Stoyanov screamer
Wed Oct 25 13:46:06 CEST 2006


I'm unable to reproduce these errors using the sample and etc
I'm using ffmpeg for linux if it has anything to do with it

If you want i can send you each of the test sample results


----- Original Message ----- 
From: "V?ctor Paesa" <wzrlpy at arsystel.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at mplayerhq.hu>
Sent: Wednesday, October 25, 2006 12:54 PM
Subject: Re: [Ffmpeg-devel] pip.c - PiP (Picture in Picture) 
v1.0patch.Remakeof watermark.c


Hi,
> Cheers,
> I hope you like it

Sure.

> This code was taken from pip.c
>                 // Convert the image from its native format to RGBA32
>                 ci->watermark_convert_ctx =
>                     sws_getCachedContext(ci->watermark_convert_ctx,
>                         ci->pCodecCtx->width, ci->pCodecCtx->height,
> ci->pCodecCtx->pix_fmt,
>                         ci->x_size, ci->y_size, PIX_FMT_RGBA32,
>                         sws_flags, NULL, NULL, NULL);
>
> I don't know how you get that ci->watermark_conver_ctx = +
> sws_getCachedContext...
>
> I'm attaching you zipped pip.c
>
It worked strightforward this time.

I have found a few corner cases where it doesn't work as expected:

# Any input PNG will do, the idea is to have a good contrast
# against border so that is easy to see artifacts
pamgradient red green blue yellow 720 576 | pnmtopng  > input.png

# Let's put a border around a square
ffmpeg -loop_input -vframes 25 -f image2 -i input.png -an -vcodec ffv1 \
-s 100x100 -padcolor C0C0FF -padtop 2 -padbottom 2 -padleft 2 -padright 2\
-y 'border_enclosed.avi'

# This produces a wrong 4 pixel black border at bottom
ffmpeg -loop_input -vframes 25 -f image2 -i input.png \
-vhook 'pip.dll -f border_enclosed.avi -m 2 -x 360 -y 288 -w 102 -h 102 ' \
-vcodec ffv1 -y 'border_enclosed_result.avi'

# This produces a wrong 8 pixel black border at bottom
ffmpeg -loop_input -vframes 25 -f image2 -i input.png \
-vhook 'pip.dll -f border_enclosed.avi -m 2 -x 360 -y 288 -w 98 -h 98 ' \
-vcodec ffv1 -y 'border_enclosed_result.avi'

# This produces a wrong black pixel at bottom right corner
ffmpeg -loop_input -vframes 25 -f image2 -i input.png \
-vhook 'pip.dll -f border_enclosed.avi -m 2 -x 360 -y 288 -w 107 -h 106 ' \
-vcodec ffv1 -y 'border_enclosed_result.avi'


# Now let's put a border around a rectangle
ffmpeg -loop_input -vframes 25 -f image2 -i input.png -an -vcodec ffv1 \
-s 144x114 -padcolor C0C0FF -padtop 2 -padbottom 2 -padleft 2 -padright 2 \
-y 'border_enclosed.avi'

# This produces a wrong 4 pixel black border at the right
ffmpeg -loop_input -vframes 25 -f image2 -i input.png \
-vhook 'pip.dll -f border_enclosed.avi -m 2 -x 360 -y 288 -w 148 -h 118 ' \
-vcodec ffv1 -y 'border_enclosed_result.avi'

Could you please check them?

Thanks&regards,
V?ctor
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at mplayerhq.hu
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.11/496 - Release Date: 24.10.2006 
_.






More information about the ffmpeg-devel mailing list