Opened 8 years ago

Closed 8 years ago

#2308 closed defect (fixed)

bmovl allocates a too small image

Reported by: floemker Owned by: beastd
Priority: normal Component: vf
Version: unspecified Severity: blocker
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: yes Analyzed by developer: yes

Description

The bmovl filter allocates an image of size mpi->w * mpi->h, but writes to it
with mpi->width and mpi->height. For some videos under some circumstances h
is smaller than height. Example for one video:

VIDEO: [WMV3] 1280x720 24bpp 1000.000 fps 817.2 kbps (99.8 kbyte/s)
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.61.100 (internal)
[wmv3 @ 0x55f50c698f60]Extra data: 8 bits left, value: 0
Selected video codec: [ffwmv3] vfm: ffmpeg (FFmpeg WMV3/WMV9)
==========================================================================
Load subtitles in /RVM/ads/video/
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [gl_nosw] 1280x720 => 1280x720 Planar YV12
Movie-Aspect is undefined - no prescaling applied.
VO: [gl_nosw] 1280x720 => 1280x720 Planar YV12

For this the values are

*mpi: width = 1280, height = 736, x = 0, y = 0, w = 1280, h = 720
*dmpi: width = 1280, height = 720, x = 0, y = 0, w = 1280, h = 720

when called via

mplayer -vo x11 -framedrop -slave -really-quiet -vf bmovl=0:0:/tmp/mplayer.fifo,scale=640:-3 video.wmv

The attached patch, which simply uses mpi->width / mpi->heigth when getting
the image fixed it for me. I have absolutely no idea if that is correct.

Attachments (2)

bmovl-alloc.patch (632 bytes ) - added by floemker 8 years ago.
Allocate a bigger image in bmovl
vf_bmovl-mpi-dimension-mismatch.patch (1.4 KB ) - added by beastd 8 years ago.
only for testing

Download all attachments as: .zip

Change History (7)

by floemker, 8 years ago

Attachment: bmovl-alloc.patch added

Allocate a bigger image in bmovl

comment:1 by floemker, 8 years ago

Forgot the Mplayer version:

MPlayer SVN-r37901-5.4.0 (C) 2000-2016 MPlayer Team
CPU vendor name: GenuineIntel max cpuid level: 22
CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (Family: 6, Model: 78, Stepping: 3)
extended cpuid-level: 8
extended cache-info: 16801856
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1 SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX CMOV

comment:2 by beastd, 8 years ago

Reproduced by developer: set
Status: newopen

I can confirm visual artifacts and crashes here.

There is something wrong there. I need to have a closer look though.

Thanks again for the report and the patch.

by beastd, 8 years ago

only for testing

comment:3 by beastd, 8 years ago

Seems all a bit strange to me...

The problem here is AFAICT that the padded chroma height of the dmpi is smaller than chroma height of the source mpi.

Can you confirm if attachment:vf_bmovl-mpi-dimension-mismatch.patch I attached fixes the problem for you too?

comment:4 by floemker, 8 years ago

Looks good.

Tested with 6 videos. Two of them made mplayer crash before. valgrind is now happy as well.

comment:5 by beastd, 8 years ago

Analyzed by developer: set
Resolution: fixed
Status: openclosed

This should be fixed with r37904.

Please confirm if the fix works for you or re-open if it doesn't.

Sorry for the long delay!

Note: See TracTickets for help on using tickets.