[MPlayer-dev-eng] Smeared video with screenshot and unsharp filter
Nicolas George
nicolas.george at normalesup.org
Sun Apr 7 17:18:03 CEST 2013
L'octidi 8 germinal, an CCXXI, Nicolas George a écrit :
> I can confirm the same problem with "-vf screenshot,pp=hb:c/vb:c/lb" (or
> other pp options), but it also happens with rectangle=10:10:10:10, mirror,
> etc. The common culprit seems to be screenshot before a frame-modifying
> filter.
>
> It can be reproduced using a test video from ffmpeg (the first artifact is
> visible at the fourth image):
>
> ffmpeg -filter_complex '
> color=c=black:d=20:r=2,
> drawtext=text=@:x=32:y=-24+10*t:fontsize=240:fontcolor=yellow
> ' -g 2 -y t.avi
>
> I have not yet had time to investigate further, but I know from a fact that
> I do not understand the various image types MPlayer uses. If someone could
> write a bit of documentation, that would be a great help.
After a few more checks, I find that the following trivial change fixes the
problem:
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 4a7de22..2f6593a 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -787,7 +787,7 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){
avctx->draw_horiz_band=NULL;
if(ctx->vo_initialized && !(flags&3) && !dr1){
mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE |
- (ctx->do_slices?MP_IMGFLAG_DRAW_CALLBACK:0),
+ 0*(ctx->do_slices?MP_IMGFLAG_DRAW_CALLBACK:0),
sh->disp_w, sh->disp_h);
if(mpi && mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
// vd core likes slices!
I have no idea what MP_IMGFLAG_DRAW_CALLBACK actually does, but it works.
This also gives a temporary solution for the problem: -noslices, that I just
temporarily added to my config file.
Regards,
--
Nicolas George
-------------- 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/mplayer-dev-eng/attachments/20130407/880c76df/attachment.asc>
More information about the MPlayer-dev-eng
mailing list