[MPlayer-dev-eng] [PATCH] HuffYUV native support

Roberto Togni rtogni at bresciaonline.it
Fri Mar 22 22:05:53 CET 2002


On 2002.03.22 14:57 Mike Melanson wrote:
> On Thu, 21 Mar 2002, Roberto Togni wrote:
> 
> > Attached you can find a patch that implements control() for HuffYUV
> > decoder.
> 
> 	Applied. However, whenever I load one of the RGB files without
> specifying "-vo x11" (so that it falls back on the default "-vo
> xmga"), it
> tries to load the Windows DLL.
> 
I have the same problem with YUV files and -vo x11: my codec get 
selected, but video driver rejects its output format request (x11 
does't support YUY2). With the new codec selction code Mplayer tries 
out other codecs that can decode the video format (see A'rpi's mailto 
find out the exact algorithm used). Since win32 dll uses only 
codecs.conf to accept output format,it's selected for playback (even if 
it can't decode the source video to the output format). In my example, 
win32 tries to play a YUV file on a RGB surface... (obiously I get 
sig11).

This is what happens exactly:

[...]
VIDEO:  [HFYU]  200x150  24bpp  6.00 fps  1032.2 kbps (126.0 kbyte/s)
[V] filefmt:3  fourcc:0x55594648  size:200x150  fps: 6.00  ftime:=0.1667
get_path('sub/') -> '/home/r/.mplayer/sub/'
X11 opening display: :0
vo: X11 color mask:  FFFF  (R:F800 G:7E0 B:1F)
vo: X11 running at 1024x768 with depth 16 and 16 bits/pixel (":0" => 
local display)
==========================================================================
Opening Video Decoder: [huffyuv] HuffYUV Video decoder
[HuffYUV] Allocating above line buffer
[HuffYUV] Image type is YUV
                         ^^^^My codec says image format is YUV

[HuffYUV] Method stored in extra data
[HuffYUV] Method: Predict Left
[HuffYUV] Using Huffman tables stored in file
VDec: vo config request - 200 x 150, Packed YUY2
                                      ^^^^^^^^^^Codec suggests YUY2 
image

Sorry, selected video_out device is incompatible with this codec.
VDecoder init failed :(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^-vo x11 rejects my request

Opening Video Decoder: [vfw] Win32/VfW video codecs
                        ^^^^^^^^^^^^^^^^^^^^^^^Mplayer tries with win32

VDec: vo config request - 200 x 150, Packed YUY2
                                      ^^^^^Win32 Codec suggests YUY2

Movie-Aspect is undefined - no prescaling applied.
VO: [x11] 200x150 => 200x150 BGR 32-bit flip
                             ^^^^^^^^^^^^^^^-vo x11 uses a BGR image!!!!

VO: Description: X11 ( XImage/Shm )
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
video_out->init(200x150->200x150,flags=8,'MPlayer',0x42475220)
Sharing memory.
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 4 -> 4

SwScaler: BICUBIC scaler, from BGR 32-bit to dithered BGR 16-bit using C
SwScaler: using X86-Asm scaler for horizontal scaling
SwScaler: using n-tap C scaler for vertical scaling (BGR)
SwScaler: using C YV12->BGR16 Converter
SwScaler: 200x150 -> 200x150
======= Win32 (VFW) VIDEO Codec init =======
[omitting win32 codec init]
ICDecompressQuery OK
VIDEO CODEC Init OK!!! ;-)
INFO: Win32 video codec init OK!
Detected video codec: [huffyuv] drv:2 prio:0 (HuffYUV)
                                 ^^^^^^^win32 codec selected

==========================================================================
Audio: no sound!!!
Freeing 0 unused audio chunks
Start playing...
*** Allocating mp_image_t, 200x150x32bpp RGB packed, 120000 bytes
                                          ^^^^^!!!!!!RGB used!!!!!!!!

MPlayer interrupted by signal 4 in module: decode_video
                                    ^^^^^^^^CRASH!
[...]
*** free_stream() called ***



So I don't think it's a problem of my codec, and i can't think a 
solution for it (except disabling win32 huffyuv dll). Else we should 
force win32 dll to always output RGB: it can be done using dll config 
dialog, but i have no idea how to do it in Mplayer (maybe forcing some 
register values?).


Ciao,
  Roberto



More information about the MPlayer-dev-eng mailing list