[MPlayer-dev-eng] Direct rendering and -vo x11: problems on RGB16 screen

Roberto Togni rtogni at bresciaonline.it
Fri Mar 22 23:45:43 CET 2002


Hi all.

I have a problem with x11 driver and rgb output.
My screen uses RGB16 format, codec output is BGR32 (BGR24 has the same 
problem).
I'm playing a 200x150 movie (HuffYUV encoded,but it's true for all RGB 
out codecs).

Image type is MP_YMGTYPE_TEMP, no flags.

If I use -nodr everything is ok, and i get mpi->stride[0] = 800 with 
mpi->width = 200
If i don't use -nodr i get mpi->stride[0] = 400 with mpi->width = 200

It seems to me that without -nodr x11 always allocates a RGB16 image, 
ignoring output format.


Mplayer output for dr case:
[...]
VIDEO:  [HFYU]  200x150  24bpp  6.00 fps  1502.8 kbps (183.4 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 RGB
[HuffYUV] Method stored in extra data
[HuffYUV] Method: Predict Left with decorrelation
[HuffYUV] Using Huffman tables stored in file
VDec: vo config request - 200 x 150, BGR 24-bit  Movie-Aspect is 
undefined - no prescaling applied.
VO: [x11] 200x150 => 200x150 BGR 32-bit VO: Description: X11 ( 
XImage/Shm )
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
video_out->init(200x150->200x150,flags=0,'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
Detected video codec: [mphuffyuv] drv:23 prio:0 (HuffYUV Mplayer Native 
Decoder)==========================================================================
Audio: no sound!!!
Freeing 0 unused audio chunks
Start playing...
*** Direct Rendering mp_image_t, 200x150x32bpp RGB packed, 120000 bytes
Stride: 400, Width: 200, mpiwidth: 200
Using X86 Optimized OnScreenDisplay
Stride: 400, Width: 200, mpiwidth: 200
Stride: 400, Width: 200, mpiwidth: 200
Stride: 400, Width: 200, mpiwidth: 200
Stride: 400, Width: 200, mpiwidth: 200
V:   0.7    5  45%  4%  0.0% 0 0 0%
*** free_stream() called ***

Exiting... (Quit)



Mplayer output for -nodr case
[...]
VIDEO:  [HFYU]  200x150  24bpp  6.00 fps  1502.8 kbps (183.4 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 RGB
[HuffYUV] Method stored in extra data
[HuffYUV] Method: Predict Left with decorrelation
[HuffYUV] Using Huffman tables stored in file
VDec: vo config request - 200 x 150, BGR 24-bit  Movie-Aspect is 
undefined - no prescaling applied.
VO: [x11] 200x150 => 200x150 BGR 32-bit VO: Description: X11 ( 
XImage/Shm )
VO: Author: Aaron Holtzman <aholtzma at ess.engr.uvic.ca>
video_out->init(200x150->200x150,flags=0,'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
Detected video codec: [mphuffyuv] drv:23 prio:0 (HuffYUV Mplayer Native 
Decoder)==========================================================================
Audio: no sound!!!
Freeing 0 unused audio chunks
Start playing...
*** Allocating mp_image_t, 200x150x32bpp RGB packed, 120000 bytes
Stride: 800, Width: 200, mpiwidth: 200
Using X86 Optimized OnScreenDisplay
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
Stride: 800, Width: 200, mpiwidth: 200
V:   1.2    8  57% 63%  0.0% 0 0 0%
*** free_stream() called ***

Exiting... (Quit)


In both cases i exited mplayer after a few frames.
The valuse for stride and width are written by a printf added to 
vd_huffyuv at line 540:

printf("Stride: %d, Width: %d, mpiwidth: %d\n", mpi->stride[0], 
sh->disp_w, mpi->width);


My system is Linux 2.2.20, P133 no MMX, GCC 2.95.2, X11 v3.3.6, S3 
accelerated server, card S3 Trio64 V+

Mplayer is tonight CVS version.

If you need more info or a full bugreport please ask.

Ciao,
  Roberto



More information about the MPlayer-dev-eng mailing list