[MPlayer-users] Bicubic scaling in vo_gl - does it ever work?
Vladimir Mosgalin
mosgalin at VM10124.spb.edu
Mon Jun 12 19:51:20 CEST 2006
I was really happy when read about ability to use hardware shader
bicubic scaling with vo:gl output driver in changelog. A really nice
feature, I waited for it for a long time since I've seen similar one in
different windows players. What bothered me, however, is that I missed
the moment it was submitted.. I don't remember reading about anything
like that in either -users or -dev-eng lists. Also, the fact that it's
there in changelog, but not in manpage or -vo gl:help message is
strange. However, I quickly found a reason: it just doesn't work.. While
documenting a feature before implementing it is of course a good
practice, it's strange that it went to release changelog without any
tests or announces. Well anyway, it IS implemented, I can see that in
source code, so thanks for it!
Here is mplayer -v output. I'll recompile mplayer with debugging symbols
if necessary. mplayer just hangs when trying to use lscale=1 or
cscale=1. With lscale=2/cscale=2, the scaling shader isn't used, but
something is shifted incorrectly, so there is garbage instead of
output.. but that's just a minor bug.
I'm using X.org X11 6.9.0 and fglrx 8.25.18 (latests drivers)
$ mp /tmp/q.asf -vo gl:yuv=3:lscale=1 -vf-clr -v
MPlayer dev-SVN-r18689-4.0.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Скомпилировано для x86 CPU со следующими расширениями: MMX MMX2 3DNow 3DNowEx SSE SSE2
get_path('codecs.conf') -> '/home/mosgalin/.mplayer/codecs.conf'
Читаю '/home/mosgalin/.mplayer/codecs.conf': Не могу открыть '/home/mosgalin/.mplayer/codecs.conf': No such file or directory
Читаю '/usr/local/etc/mplayer/codecs.conf': Не могу открыть '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Используется встроенный codecs.conf.
Командная строка: '/tmp/q.asf' '-vo' 'gl:yuv=3:lscale=1' '-vf-clr' '-v'
init_freetype
/home/mosgalin/.mplayer/fonts/arial.ttf doesn't look like a font description, ignoring.
Не могу загрузить шрифт: /home/mosgalin/.mplayer/fonts/arial.ttf
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Используется аппаратная Linux RTC синхронизация (1024Гц).
get_path('input.conf') -> '/home/mosgalin/.mplayer/input.conf'
Parsing input config file /home/mosgalin/.mplayer/input.conf
Input config file /home/mosgalin/.mplayer/input.conf parsed: 90 binds
get_path('menu.conf') -> '/home/mosgalin/.mplayer/menu.conf'
Меню инициализировано: /home/mosgalin/.mplayer/menu.conf
get_path('q.asf.conf') -> '/home/mosgalin/.mplayer/q.asf.conf'
Проигрывание /tmp/q.asf.
get_path('sub/') -> '/home/mosgalin/.mplayer/sub/'
[file] File size is 199768 bytes
STREAM: [file] /tmp/q.asf
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 199768 pre:1677721 eof:1
Cache fill: 2.38% (199768 bytes)
Checking for YUV4MPEG2
Обнаружен ASF формат файла!
stream type: guid_audio_stream
stream concealment: guid_audio_conceal_interleave
type: 28 bytes, stream: 8 bytes ID: 1
unk1: 0 unk2: 951F954
FILEPOS=0x13F1
==> Нашёл аудио поток: 1
======= WAVE Format =======
Format Tag: 353 (0x161)
Channels: 2
Samplerate: 44100
avg byte/sec: 40001
Block align: 14861
bits/sample: 16
cbSize: 10
Unknown extra header dump: [0] [88] [0] [0] [f] [0] [35] [e8] [0] [0]
==========================================================================
ASF: audio scrambling: 1 x 1 x 14861
stream type: guid_video_stream
stream concealment: unknown guid 0057fb20-555b-cf11-a8fd00805f5c442b
type: 55 bytes, stream: 0 bytes ID: 2
unk1: 0 unk2: 0
FILEPOS=0x1463
==> Нашёл видео поток: 2
======= VIDEO Format ======
biSize 44
biWidth 640
biHeight 480
biPlanes 1
biBitCount 24
biCompression 861293911='WMV3'
biSizeImage 0
Unknown extra header dump: [4f] [f1] [a] [1]
===========================
ASF: packets: 5173 flags: 2 max_packet_size: 14892 min_packet_size: 14892 max_bitrate: 6644759 preroll: 3000
============ ASF Stream group == START ===
stream count=[0x2][2]
stream id=[0x1][1]
max bitrate=[0x4e478][320632]
stream id=[0x2][2]
max bitrate=[0x607f9f][6324127]
============ ASF Stream group == END ===
Found movie at 0x14F2 - 0x497900E
ASF: 1 audio and 1 video streams found
Auto-selected ASF video ID = 2
ASF: Ищу аудиопоток (id:-1).
Auto-selected ASF audio ID = 1
VIDEO: [WMV3] 640x480 24bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:6 fourcc:0x33564D57 size:640x480 fps:1000.00 ftime:=0.0010
get_path('sub/') -> '/home/mosgalin/.mplayer/sub/'
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
[gl] Using 16 as slice height (0 means image height).
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1600x1200 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
xscreensaver_disable: xscreensaver wid=52428801.
==========================================================================
Попытка форсировать семейство видео кодеков dmo...
Открываю декодер видео: [dmo] DMO video codecs
get_path('registry') -> '/home/mosgalin/.mplayer/registry'
DMO dll supports VO Optimizations 0 1
DMO dll might use previous sample when requested
GetOutput r=0x0 size:921600 align:1
StreamCount r=0x0 1 1
Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555 RGB565 RGB24 RGB32
Decoder is capable of YUV output (flags 0x1b)
VDec: запрос vo config - 640 x 480 (предпочитаемый csp: Packed YUY2)
Trying filter chain: menu vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect не определён - премасштабирование не применяется.
VO Config (640x480->1000x750,flags=4,'MPlayer',0x32315659)
Unicode font: 1185 glyphs.
REQ: flags=0x437 req=0x0
VO: [gl] 640x480 => 1000x750 Planar YV12 [zoom]
VO: Description: X11 (OpenGL)
VO: Author: Arpad Gereoffy <arpi at esp-team.scene.hu>
OpenGL extensions string:
GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ARB_draw_buffers GL_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_separate_stencil GL_ATI_shader_texture_lod GL_ATI_texture_compression_3dc GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_ATI_vertex_attrib_array_object GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_SUN_multi_draw_arrays GLX_EXT_visual_info GLX_EXT_visual_rating GLX_EXT_import_context GLX_ARB_get_proc_address GLX_ARB_multisample
[gl] Creating 1024x512 texture...
[gl] generated fragment program:
!!ARBfp1.0
OPTION ARB_precision_hint_fastest;TEMP coord, cdelta, parmx, parmy, a, yuv;MAD coord.xy, fragment.texcoord[0], {1024.000000, 512.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000977, 0, 0.000977, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.001953, 0, 0.001953};ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;ADD coord, fragment.texcoord[0].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.a, parmy.b, a.rrrr, a.gggg;LRP yuv.r, parmx.b, a.bbbb, a.aaaa;TEX yuv.g, fragment.texcoord[1], texture[1], 2D;TEX yuv.b, fragment.texcoord[2], texture[2], 2D;PARAM ycoef = {1.1640, 1.1640, 1.1640};PARAM ucoef = {0.0000, -0.3910, 2.0180};PARAM vcoef = {1.5960, -0.8130, 0.0000};PARAM offsets = {-0.8742, 0.5313, -1.0860};PARAM gamma = {1.0000, 1.0000, 1.0000};TEMP res;MAD res.rgb, yuv.rrrr, ycoef, offsets;MAD res.rgb, yuv.gggg, ucoef, res;MAD_SAT res.rgb, yuv.bbbb, vcoef, res;POW result.color.r, res.r, gamma.r;POW result.color.g, res.g, gamma.g;POW result.color.b, res.b, gamma.b;END
[gl] Program statistics:
[gl] instructions: 0/0
[gl] native instructions: 0/0
[gl] temporaries: 0/0
[gl] native temporaries: 0/0
[gl] parameters: 0/0
[gl] native parameters: 0/0
[gl] attribs: 0/0
[gl] native attribs: 0/0
[gl] ALU instructions: 0/0
[gl] TEX instructions: 0/0
[gl] TEX indirections: 0/0
[gl] native ALU instructions: 0/0
[gl] native TEX instructions: 0/0
[gl] native TEX indirections: 0/0
[gl] Resize: 1000x750
[gl] generated fragment program:
!!ARBfp1.0
OPTION ARB_precision_hint_fastest;TEMP coord, cdelta, parmx, parmy, a, yuv;MAD coord.xy, fragment.texcoord[0], {1024.000000, 512.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000977, 0, 0.000977, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.001953, 0, 0.001953};ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;ADD coord, fragment.texcoord[0].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.a, parmy.b, a.rrrr, a.gggg;LRP yuv.r, parmx.b, a.bbbb, a.aaaa;TEX yuv.g, fragment.texcoord[1], texture[1], 2D;TEX yuv.b, fragment.texcoord[2], texture[2], 2D;PARAM ycoef = {1.1640, 1.1640, 1.1640};PARAM ucoef = {0.0000, -0.3910, 2.0180};PARAM vcoef = {1.5960, -0.8130, 0.0000};PARAM offsets = {-0.9742, 0.4313, -1.1860};PARAM gamma = {1.0000, 1.0000, 1.0000};TEMP res;MAD res.rgb, yuv.rrrr, ycoef, offsets;MAD res.rgb, yuv.gggg, ucoef, res;MAD_SAT res.rgb, yuv.bbbb, vcoef, res;POW result.color.r, res.r, gamma.r;POW result.color.g, res.g, gamma.g;POW result.color.b, res.b, gamma.b;END
[gl] Program statistics:
[gl] instructions: 0/0
[gl] native instructions: 0/0
[gl] temporaries: 0/0
[gl] native temporaries: 0/0
[gl] parameters: 0/0
[gl] native parameters: 0/0
[gl] attribs: 0/0
[gl] native attribs: 0/0
[gl] ALU instructions: 0/0
[gl] TEX instructions: 0/0
[gl] TEX indirections: 0/0
[gl] native ALU instructions: 0/0
[gl] native TEX instructions: 0/0
[gl] native TEX indirections: 0/0
[gl] generated fragment program:
!!ARBfp1.0
OPTION ARB_precision_hint_fastest;TEMP coord, cdelta, parmx, parmy, a, yuv;MAD coord.xy, fragment.texcoord[0], {1024.000000, 512.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000977, 0, 0.000977, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.001953, 0, 0.001953};ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;ADD coord, fragment.texcoord[0].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;LRP a.a, parmy.b, a.rrrr, a.gggg;LRP yuv.r, parmx.b, a.bbbb, a.aaaa;TEX yuv.g, fragment.texcoord[1], texture[1], 2D;TEX yuv.b, fragment.texcoord[2], texture[2], 2D;PARAM ycoef = {1.1640, 1.1640, 1.1640};PARAM ucoef = {0.0000, -0.4692, 2.4216};PARAM vcoef = {1.9152, -0.9756, 0.0000};PARAM offsets = {-1.1344, 0.5522, -1.3886};PARAM gamma = {1.0000, 1.0000, 1.0000};TEMP res;MAD res.rgb, yuv.rrrr, ycoef, offsets;MAD res.rgb, yuv.gggg, ucoef, res;MAD_SAT res.rgb, yuv.bbbb, vcoef, res;POW result.color.r, res.r, gamma.r;POW result.color.g, res.g, gamma.g;POW result.color.b, res.b, gamma.b;END
[gl] Program statistics:
[gl] instructions: 0/0
[gl] native instructions: 0/0
[gl] temporaries: 0/0
[gl] native temporaries: 0/0
[gl] parameters: 0/0
[gl] native parameters: 0/0
[gl] attribs: 0/0
[gl] native attribs: 0/0
[gl] ALU instructions: 0/0
[gl] TEX instructions: 0/0
[gl] TEX indirections: 0/0
[gl] native ALU instructions: 0/0
[gl] native TEX instructions: 0/0
[gl] native TEX indirections: 0/0
ИНФОРМАЦИЯ: Win32/DMO видео кодек успешно инициализирован.
Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
==========================================================================
==========================================================================
Попытка форсировать семейство аудио кодеков dmo...
Открываю декодер аудио: [dmo] Win32/DMO decoders
======= WAVE Format =======
Format Tag: 353 (0x161)
Channels: 2
Samplerate: 44100
avg byte/sec: 40001
Block align: 14861
bits/sample: 16
cbSize: 10
Unknown extra header dump: [0] [88] [0] [0] [f] [0] [35] [e8] [0] [0]
==========================================================================
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 44100
avg byte/sec: 176400
Block align: 4
bits/sample: 16
cbSize: 0
==========================================================================
GetOutput r=0x0 size:16384 align:1
StreamCount r=0x0 1 1
INFO: Win32/DMO audio codec init OK!
dec_audio: Захватываю 59444 байт(а/ов) для входного буфера.
dec_audio: Захватываю 65536 + 65536 = 131072 байт(а/ов) для буфера вывода.
AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40001->176400)
Selected audio codec: [wmadmo] afm: dmo (Windows Media Audio DMO)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter lavcresample
ao2: 48000 Hz 2 chans s16le
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 2 channels (requested: 2)
audio_setup: using 48000 Hz samplerate (requested: 48000)
audio_setup: frags: 8/8 (8192 bytes/frag) free: 65536
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/2ch/s16le...
Начало воcпроизведения...
ds_fill_buffer: EOF reached (stream: audio)
[libaf] Reallocating memory in module lavcresample, old len = 0, new len = 65536
avg. framerate: 15 fps
*** [vo] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [menu] Direct Rendering mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [vo] Exporting mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
Unicode font: 1185 glyphs.
[gl] Resize: 1000x750
---------- I press C-break here ---------
MPlayer прерван сигналом 2 в модуле: enable_cache
vo: x11 uninit called but X11 not inited..
---------- I press C-\ here (SIGQUIT) -------
MPlayer прерван сигналом 2 в модуле: flip_page
Uninit audio filters...
[libaf] Removing filter lavcresample
деинициализация аудио: dmo
деинициализация видео: dmo
MPlayer прерван сигналом 3 в модуле: uninit_vo
vo: uninit ...
Without lscale=1, mplayer just starts playing after that moment. No more
init-related messages. Playing with options like -noslices/-dr/etc
doesn't help. It happens with yuv=2/3/4. With yuv=0/1/5 lscale is just
ignored (not to mention yuv=1 doesn't work as expected on ati cards).
I tried running mplayer under gdb, but the results are no good.
0x00582bc0 in s1557 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
(gdb) where
#0 0x00582bc0 in s1557 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
#1 0x0057dab8 in s1533 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
#2 0x005770c0 in s1531 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
#3 0x00580028 in s1545 () from /usr/X11R6/lib/modules/dri/fglrx_dri.so
--
Vladimir
More information about the MPlayer-users
mailing list