[MPlayer-users] PGS, -vf scale and artifacts.

Gaute Strokkenes gs234-mplayer.users at srcf.ucam.org
Tue Apr 5 22:52:42 CEST 2011


Recently I noticed that PGS subtitle rendering, when used in conjunction
with the scale filter and some, but not all, vo drivers, results in some
highly noticeable artifacts along the right edge of the "bounding box"
that the subtitles are contained in on screen.  For example:

  mplayer -v -demuxer lavf -sid 0 -nosound -vo xv -vf scale=1280:720 pgs_and_vf_scale_artifacts.m2ts

This works if I change the -vo driver to vdpau or gl, or if I remove the
-vf scale invocation.

The problem also occurs when using mencoder, which is where I first
noticed it.  (It took me a while to convince myself that it wasn't
simply a case of the encoder introducing artifacts in the face of hard
subtitles.)

I have a small (less than 100MB) sample file that demonstrates the
problem, but I would prefer not to upload it to a public space.  It is
available over http at a URL that I can share in private communication.

Below are some details as requested in
<http://www.mplayerhq.hu/DOCS/HTML/en/bugreports_what.html>.  My system
is a semi-up-to-date Debian unstable install, using the proprietary nvidia
driver version 256.53.

I would appreciate any help that anyone can give me.  If there is
anything else I can do to investigate the problem, please do let me know.

~Gaute.

$ mplayer -v -demuxer lavf -sid 0 -nosound -vo xv -vf scale=1280:720 pgs_and_vf_scale_artifacts.m2ts
MPlayer SVN-r33226-4.4.5 (C) 2000-2011 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 11
CPU: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz (Family: 6, Model: 26, Stepping: 5)
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 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/gs234/.mplayer/codecs.conf'
Reading /home/gs234/.mplayer/codecs.conf: Can't open '/home/gs234/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/gs234/.mplayer/fonts'
Configuration: 
CommandLine: '-v' '-demuxer' 'lavf' '-sid' '0' '-nosound' '-vo' 'xv' '-vf' 'scale=1280:720' 'pgs_and_vf_scale_artifacts.m2ts'
Using nanosleep() timing
get_path('input.conf') -> '/home/gs234/.mplayer/input.conf'
Can't open input config file /home/gs234/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('pgs_and_vf_scale_artifacts.m2ts.conf') -> '/home/gs234/.mplayer/pgs_and_vf_scale_artifacts.m2ts.conf'

Playing pgs_and_vf_scale_artifacts.m2ts.
get_path('sub/') -> '/home/gs234/.mplayer/sub/'
[file] File size is 100000000 bytes
STREAM: [file] pgs_and_vf_scale_artifacts.m2ts
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: MPEG-2 transport stream format
libavformat file format detected.
[mpegts @ 0x1d78f20] max_analyze_duration reached
[NULL @ 0x1d94b70] start time is not set in av_estimate_timings_from_pts
[NULL @ 0x1d96ae0] start time is not set in av_estimate_timings_from_pts
[NULL @ 0x1d98a90] start time is not set in av_estimate_timings_from_pts
[NULL @ 0x1d9aa00] start time is not set in av_estimate_timings_from_pts
==> Found video stream: 0
======= VIDEO Format ======
  biSize 162
  biWidth 1920
  biHeight 1080
  biPlanes 0
  biBitCount 0
  biCompression 875967048='H264'
  biSizeImage 0
Unknown extra header dump: [0] [0] [0] [1] [9] [10] [0] [0] [0] [1] [67] [64] [0] [29] [ac] [1b] [1a] [50] [1e] [0] [89] [f9] [70] [16] [a0] [20] [20] [28] [0] [0] [1f] [48] [0] [5] [dc] [7] [13] [0] [0] [23] [49] [30] [0] [3] [93] [87] [46] [27] [1] [f1] [c3] [a] [58] [0] [0] [0] [1] [68] [ea] [43] [ce] [51] [d1] [d8] [43] [88] [c5] [45] [48] [22] [33] [11] [cd] [9a] [21] [28] [e8] [ec] [21] [c4] [62] [a2] [a4] [11] [19] [88] [e6] [cd] [10] [c9] [31] [48] [6e] [4f] [15] [f2] [7e] [4f] [e4] [fc] [9f] [27] [9b] [93] [24] [94] [22] [42] [90] [9c] [9e] [4f] [af] [c9] [fd] [7e] [4f] [af] [27] [26] [a4] [c0] 
===========================
[lavf] stream 0: video (h264), -vid 0
==> Found audio stream: 1
======= WAVE Format =======
Format Tag: 8193 (0x2001)
Channels: 6
Samplerate: 48000
avg byte/sec: 192000
Block align: 1
bits/sample: 0
cbSize: 0
==========================================================================
[lavf] stream 1: audio (dca), -aid 0
==> Found audio stream: 2
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 2
Samplerate: 48000
avg byte/sec: 28000
Block align: 1
bits/sample: 0
cbSize: 0
==========================================================================
[lavf] stream 2: audio (ac3), -aid 1
[lavf] stream 3: subtitle (pgssub), -sid 0
[lavf] stream 4: subtitle (pgssub), -sid 1
[lavf] stream 5: subtitle (pgssub), -sid 2
[lavf] stream 6: subtitle (pgssub), -sid 3
[lavf] stream 7: subtitle (pgssub), -sid 4
LAVF: Program 1 
LAVF: 2 audio and 1 video streams found
LAVF: build 3434752
VIDEO:  [H264]  1920x1080  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:35  fourcc:0x34363248  size:1920x1080  fps:23.976  ftime:=0.0417
Load subtitles in ./
get_path('sub/') -> '/home/gs234/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1920x1200 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
Disabling DPMS
DPMSDisable stat: 1
[VO_XV] Using Xv Adapter #0 (NV17 Video Texture)
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 2046x2046
Opening video filter: [ass auto=1]
[vo] query(Planar YV12) -> 3
[ass] auto-open
Opening video filter: [scale w=1280 h=720]
SwScale params: 1280 x 720 (-1=no scaling)
[ass] FreeType library version: 2.4.2
[ass] FreeType headers version: 2.4.2
[ass] Init
get_path('fonts') -> '/home/gs234/.mplayer/fonts'
get_path('subfont.ttf') -> '/home/gs234/.mplayer/subfont.ttf'
[ass] Updating font cache
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
[h264 @ 0xd9ffe0]no picture
[h264 @ 0xd9ffe0]no picture
[h264 @ 0xd9ffe0]no picture
[h264 @ 0xd9ffe0]no picture
[ffmpeg] aspect_ratio: 1.777778
VDec: vo config request - 1920 x 1080 (preferred colorspace: Planar YV12)
Trying filter chain: scale ass vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (1920x1080->1920x1080,flags=1,'MPlayer',0x32315659)
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 8
SwScaler: reducing / aligning filtersize 7 -> 6
SwScaler: reducing / aligning filtersize 7 -> 6
[swscaler @ 0xe503e0]BICUBIC scaler, from yuv420p to yuv420p using MMX2
[swscaler @ 0xe503e0]using 8-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xe503e0]using 8-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xe503e0]using n-tap MMX scaler for vertical scaling (YV12 like)
[swscaler @ 0xe503e0]1920x1080 -> 1280x720
[swscaler @ 0xe503e0]lum srcW=1920 srcH=1080 dstW=1280 dstH=720 xInc=98304 yInc=98304
[swscaler @ 0xe503e0]chr srcW=960 srcH=540 dstW=640 dstH=360 xInc=98304 yInc=98304
REQ: flags=0x2437  req=0x0  
REQ: flags=0x437  req=0x0  
VO: [xv] 1280x720 => 1280x720 Planar YV12  [fs]
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 254 for hw scaling
*** [scale] Exporting mp_image_t, 1920x1080x12bpp YUV planar, 3110400 bytes
*** [vo] Allocating mp_image_t, 1280x720x12bpp YUV planar, 1382400 bytes
*** [ass] Direct Rendering mp_image_t, 1280x720x12bpp YUV planar, 1382400 bytes
Unicode font: 5103 glyphs.
Unicode font: 5103 glyphs.
V:  51.8   0/  0 42% 20%  0.0% 0 0                                                                          
[h264 @ 0xd9ffe0]error while decoding MB 27 58, bytestream (-21)
[h264 @ 0xd9ffe0]concealing 1222 DC, 1222 AC, 1222 MV errors
V:  51.9   0/  0 42% 20%  0.0% 0 0                                                                          
ds_fill_buffer: EOF reached (stream: video)  
V:  51.9   0/  0 42% 20%  0.0% 0 0                                                                          
EOF code: 1  

Uninit video: ffmpeg
Successfully enabled DPMS
vo: uninit ...

Exiting... (End of file)

$ uname -a
Linux hagu 2.6.35.5 #1 SMP PREEMPT Fri Sep 24 17:22:28 BST 2010 x86_64 GNU/Linux
$ ls -l /lib/libc[.-]*
-rwxr-xr-x 1 root root 1432968 2010-10-31 00:33 /lib/libc-2.11.2.so
lrwxrwxrwx 1 root root      14 2010-11-07 11:27 /lib/libc.so.6 -> libc-2.11.2.so
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-15' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-15) 
$ ld -v
GNU ld (GNU Binutils for Debian) 2.20.1-system.20100303
$ as --version
GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.
$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5329.86
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 1
cpu cores	: 4
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 2
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 2
cpu cores	: 4
apicid		: 4
initial apicid	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 6
initial apicid	: 6
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 4
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 0
cpu cores	: 4
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 5
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 1
cpu cores	: 4
apicid		: 3
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 6
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 2
cpu cores	: 4
apicid		: 5
initial apicid	: 5
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.68
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 5
cpu MHz		: 1596.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5328.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:


-- 
Gaute Strokkenes


More information about the MPlayer-users mailing list