[MPlayer-users] fbdev output on rgb15 framebuffer display?

Alexander Stein alexander.stein at systec-electronic.com
Tue Mar 15 08:47:08 CET 2011


On Monday 14 March 2011, 18:31:18 Reimar Döffinger wrote:
> On Mon, Mar 14, 2011 at 01:04:00PM +0100, Alexander Stein wrote:
> > I'm struggling with the problem the video output on framebuffer is always
> > BGR5. But my display has RGB15 video format. Here's the output from
> > 
> > mplayer-1.0-rc4:
> > > VO: [fbdev] 320x240 => 320x240 BGR 15-bit
> > 
> > After searching through the code a bit, it seems fbdev doesn't support
> > non-BGR displays at all. Is this intended?
> 
> Yes, I have never ever seen a fbdev device requiring or even supporting
> RGB.
> Without anything to test it on there's little point in it.
> Correction: I think I had such a device once, however its driver
> claimed it to be BGR, which meant supporting it would break all
> devices that currently work, so I decided to forget about it.

Well, I have an AT91SAM9263 based board where I want to use a vl42 webcam to 
be display on the framebuffer.
cat /proc/cpuinfo:
> Processor       : ARM926EJ-S rev 5 (v5l)
> BogoMIPS        : 116.48
> Features        : swp half thumb fastmult edsp java
> CPU implementer : 0x41
> CPU architecture: 5TEJ
> CPU variant     : 0x0
> CPU part        : 0x926
> CPU revision    : 5
> 
> Hardware        : SYS TEC ECUcore-9263
> Revision        : 0000
> Serial          : 0000000000000000

Which is, I have to admit, a bit uncommon. Well, the problem is quite obvious: 
If I record my blue ethernet cable and my brown pencil, the colors are kinda 
switched on the display.

> > Has somebody an idea how to solve this problem?
> 
> I'd suggest starting with describing what the problem is.
> And that is things that are certain, not your guesses.
> mplayer -v output would be a good idea as well.

Ok, here we go. I know it is still 1.0rc2 which is really old, but the rc4 I 
have is only a debug build which would only spam lots of messages. The problem 
hasn't changed though.
> ./mplayer -v -tv driver=v4l2:width=320:height=240:device=/dev/video0 tv://
> MPlayer 1.0rc2-4.4.1 (C) 2000-2007 MPlayer Team
> CPU: ARM
> get_path('codecs.conf') -> '/home/.mplayer/codecs.conf'
> Reading /home/.mplayer/codecs.conf: Can't open
> '/home/.mplayer/codecs.conf': No such file or directory Reading
> /usr/etc/mplayer/codecs.conf: Can't open '/usr/etc/mplayer/codecs.conf':
> No such file or directory Using built-in default codecs.conf.
> Configuration: --prefix=/usr --disable-runtime-cpudetection
> --enable-cross-compile --cc=arm-none-linux-gnueabi-gcc
> --as=arm-none-linux-gnueabi-as --ar=arm-none-linux-gnueabi-ar
> --host-cc=gcc --ranlib=arm-none-linux-gnueabi-ranlib --language=en
> --target=arm-none-linux-gnueabi
> --with-extraincdir=/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform
> -ECUcore-9263/sysroot-target/usr/include
> --with-extralibdir=/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform
> -ECUcore-9263/sysroot-target/usr/lib
> --with-extraincdir=/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform
> -ECUcore-9263/sysroot-target/include
> --with-extralibdir=/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform
> -ECUcore-9263/sysroot-target/lib
> --extra-libs=-L/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform-ECU
> core-9263/sysroot-target/lib
> -L/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform-ECUcore-9263/sys
> root-target/usr/lib -Wl,-rpath-link
> -Wl,/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform-ECUcore-9263/s
> ysroot-target/lib -Wl,-rpath-link
> -Wl,/systec/LinuxBSP-2.6/ptxdist/ECUcore-9263/platform-ECUcore-9263/s
> ysroot-target/usr/lib --enable-iconv --disable-vidix-internal
> --disable-vidix-external --disable-gl --disable-dga2 --disable-dga1
> --disable-vesa --disable-svga --disable-sdl --disable-aa --disable-caca
> --disable-ggi --disable-ggiwmh --disable-directx --disable-dxr2
> --disable-dxr3 --disable-ivtv --disable-dvb --disable-dvbhead
> --disable-mga --disable-xmga --disable-xvmc --disable-vm
> --disable-xinerama --disable-x11 --disable-xshape --disable-mlib
> --disable-3dfx --disable-tdfxfb --disable-s3fb --disable-directfb
> --disable-zr --disable-bl --disable-tdfxvid --disable-xvr100 --disable-tga
> --disable-pnm --disable-md5sum --disable-mencoder --enable-mplayer
> --disable-gui --disable-gtk1 --disable-largefiles --disable-linux-devfs
> --disable-termcap --disable-termios --disable-langinfo --disable-lirc
> --disable-lircc --disable-joystick --disable-apple-remote --disable-vm
> --disable-xf86keysym --disable-radio --disable-radio-capture
> --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-tv-bsdbt848
> --disable-tv-teletext --disable-pvr --disable-rtc --disable-network
> --disable-winsock2 --disable-smb --disable-live --disable-nemesi
> --disable-dvdnav --disable-dvdread --disable-dvdread-internal
> --disable-libdvdcss-internal --disable-cdparanoia --disable-cddb
> --disable-bitmap-font --disable-freetype --disable-fontconfig
> --disable-unrarlib --disable-menu --disable-sortsub --disable-fribidi
> --disable-enca --disable-macosx --disable-maemo
> --disable-macosx-finder-support --disable-macosx-bundle --disable-inet6
> --disable-gethostbyname2 --disable-ftp --disable-vstream
> --disable-pthreads --disable-w32threads --disable-ass --disable-rpath
> --disable-gif --disable-png --disable-jpeg --disable-libcdio
> --disable-liblzo --disable-win32dll --disable-qtx --disable-xanim
> --disable-real --disable-xvid --disable-x264 --disable-libnut
> --disable-libpostproc_a --disable-libpostproc_so --disable-tremor-internal
> --disable-tremor-low --disable-tremor-external --dis CommandLine: '-v'
> '-tv' 'driver=v4l2:width=320:height=240:device=/dev/video0' 'tv://' Using
> Unoptimized OnScreenDisplay
> Using nanosleep() timing
> get_path('input.conf') -> '/home/.mplayer/input.conf'
> Can't open input config file /home/.mplayer/input.conf: No such file or
> directory Can't open input config file /usr/etc/mplayer/input.conf: No
> such file or directory Falling back on default (hardcoded) input config
> get_path('.conf') -> '/home/.mplayer/.conf'
> 
> Playing tv://.
> get_path('sub/') -> '/home/.mplayer/sub/'
> STREAM: [tv] tv://
> STREAM: Description: TV Input
> STREAM: Author: Benjamin Zores, Albeu
> STREAM: Comment:
> TV file format detected.
> Selected driver: v4l2
> 
>  name: Video 4 Linux 2 input
>  author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
>  comment: first try, more to come ;-)
> 
> v4l2: ioctl get standard failed: Invalid argument
> Selected device: USB Camera (046d:08da)
> 
>  Capabilites:  video capture  read/write  streaming
>  supported norms:
>  inputs: 0 = zc3xx;
>  Current input: 0
>  Format unknown (0x4745504a) ( 0 bits, JPEG): Unknown 0x4745504a
>  Current format: unknown (0x4745504a)
> 
> v4l2: unknown control: 1281
> v4l2: set format: YVU420
> v4l2: set input: 0
> tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
> Selected norm : pal
> v4l2: ioctl enum norm failed: Invalid argument
> Error: Cannot set norm!
> v4l2: set width: 320
> v4l2: set height: 240
> Selected input hasn't got a tuner!
> ==> Found video stream: 0
> v4l2: get format: unknown (0x4745504a)
> v4l2: get fps: nan
> v4l2: get width: 320
> v4l2: get height: 240
> Using a ring buffer for maximum 2 frames, 0 MB total size.
> v4l2: ioctl set mute failed: Invalid argument
> v4l2: ioctl query control failed: Invalid argument
> v4l2: ioctl query control failed: Invalid argument
> v4l2: ioctl query control failed: Invalid argument
> v4l2: set Contrast: 128 [0, 255]
> v4l2: unknown control: 1363
> [V] filefmt:9  fourcc:0x4745504A  size:320x240  fps:  nan  ftime:=   nan
> get_path('sub/') -> '/home/.mplayer/sub/'
> using /dev/fb0
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> INFO: libavcodec init OK!
> Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
> ==========================================================================
> Audio: no sound
> Freeing 0 unused audio chunks.
> Starting playback...
> v4l2: going to capture
> [mjpeg @ 0x705398]mjpeg decode frame unused 0 bytes
> [mjpeg @ 0x705398]mjpeg decode frame unused 0 bytes
> [mjpeg @ 0x705398]mjpeg decode frame unused 0 bytes
> [mjpeg @ 0x705398]marker=d8 avail_size_in_buf=29388
> [mjpeg @ 0x705398]buffer too small, expanding to 29388 bytes
> [mjpeg @ 0x705398]marker parser used 0 bytes (0 bits)
> [mjpeg @ 0x705398]marker=db avail_size_in_buf=29386
> [mjpeg @ 0x705398]index=0
> [mjpeg @ 0x705398]qscale[0]: 6
> [mjpeg @ 0x705398]index=1
> [mjpeg @ 0x705398]qscale[1]: 13
> [mjpeg @ 0x705398]marker parser used 132 bytes (1056 bits)
> [mjpeg @ 0x705398]marker=c4 avail_size_in_buf=29252
> [mjpeg @ 0x705398]class=0 index=0 nb_codes=12
> [mjpeg @ 0x705398]class=0 index=1 nb_codes=12
> [mjpeg @ 0x705398]class=1 index=0 nb_codes=251
> [mjpeg @ 0x705398]class=1 index=1 nb_codes=251
> [mjpeg @ 0x705398]marker parser used 418 bytes (3344 bits)
> [mjpeg @ 0x705398]marker=c0 avail_size_in_buf=28832
> [mjpeg @ 0x705398]sof0: picture: 320x240
> [mjpeg @ 0x705398]component 0 2:1 id: 0 quant:0
> [mjpeg @ 0x705398]component 1 1:1 id: 1 quant:1
> [mjpeg @ 0x705398]component 2 1:1 id: 2 quant:1
> [mjpeg @ 0x705398]pix fmt id 211111
> [ffmpeg] aspect_ratio: 0.000000
> VDec: vo config request - 320 x 240 (preferred colorspace: Planar 422P)
> Trying filter chain: vo
> Could not find matching colorspace - retrying with -vf scale...
> Opening video filter: [scale]
> SwScale params: -1 x -1 (-1=no scaling)
> Trying filter chain: scale vo
> VDec: using Planar 422P as output csp (no 1)
> Movie-Aspect is undefined - no prescaling applied.
> VO Config (320x240->320x240,flags=0,'MPlayer',0x50323234)
> [swscaler @ 0x7035f8]No accelerated colorspace conversion found
> [swscaler @ 0x7035f8]SwScaler: using unscaled yuv422p -> bgr555 special
> converter REQ: flags=0x403  req=0x0
> VO: [fbdev] 320x240 => 320x240 BGR 15-bit
> VO: Description: Framebuffer Device
> VO: Author: Szabolcs Berecz <szabi at inf.elte.hu>
> Can't set graphics mode: Invalid argument
> var info:
> xres: 320
> yres: 240
> xres_virtual: 320
> yres_virtual: 240
> xoffset: 0
> yoffset: 0
> bits_per_pixel: 16
> grayscale: 0
> red: 0 5 0
> green: 5 5 0
> blue: 10 5 0

Here you can see it's actually an rgb15 framebuffer.

> transp: 0 0 0
> nonstd: 0
> fix info:
> framebuffer size: 2097152 bytes
> type: 0
> [snipped the displaying verbose output]

Regards,
Alexander


More information about the MPlayer-users mailing list