Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#237 closed defect (fixed)

endianness problem when reading NuppelVideo format

Reported by: mala@… Owned by: reimar
Priority: normal Component: core
Version: 1.0pre5 Severity: critical
Keywords: VERIFIED Cc: diego@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I recently tried to read one of my favourite movies captured from an old VHS
tape in NuppelVideo? format on my G3 (under linux). MPlayer (1.0pre5) refuses to
play it, from the image dimensions it reports, I concluded that the issue must
have got something to with byte ordering. MPlayer prints the following:

==========================================================================
Opening video decoder: [nuv] NuppelVideo? decoder
VDec: vo config request - 1073872896 x 1073872896 (preferred csp: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xvidix] 1073872896x1073872896 => 1428251008x1073872896 Planar I420
Using colorkey: 3e0
==========================================================================

(I had to supply -aspect 1.33 and -fps 25 to get this far. The video size is
576x576 pixels, to be scaled to 768x576 by hardware.) Unfortunately, I haven't
got the time to fix it myself at the moment, so I hoped that you can help
(especially since you are more familiar with the source than I am...)

I don't think that this is fixed in MPlayer 1.0pre6 since NuppelVideo? seems to
be rarely used these days. I didn't try it though, because my G3 is currently
busy doing other things, and I won't have got the time to look into this matter
for the next few weeks (let alone compiling MPlayer on this machine) I couldn't
find a similar bug when I searched for a bug containing "nuppel", so I think
it's fair to assume that it is new.

Attachments (3)

nuv_be.diff (2.3 KB) - added by reimar 13 years ago.
Possible fix, needs testing
nuv_be.2.diff (3.1 KB) - added by reimar 13 years ago.
Fixed some typos, hopfully fixes encoder as well.
nuv_be.3.diff (4.8 KB) - added by reimar 13 years ago.
next try

Download all attachments as: .zip

Change History (20)

comment:1 Changed 13 years ago by reimar

Please provide a full -v log, this is not enough. The wrong dimensions almost
certainly have nothing to do with the decoder but with the demuxer...
Anyway, it really seems demux_nuv.c is lacking a lot of endianness conversions...

Changed 13 years ago by reimar

Possible fix, needs testing

comment:2 Changed 13 years ago by reimar

comment:3 Changed 13 years ago by mala@…

Here is the log you requested (with -v option). I'm currently rebuilding MPlayer
to test your fix... - Manuel

MPlayer 1.0pre5-3.4.3 (C) 2000-2004 MPlayer Team

CPU: PowerPC
Reading config file /usr/local/etc/mplayer/mplayer.confReading config file
/home/mala/.mplayer/config
Reading /home/mala/.mplayer/codecs.conf: Reading
/usr/local/etc/mplayer/codecs.conf: Using built-in default codecs.conf.
CommandLine?: '-v' '-aspect' '1.33' '-fps' '25' '-vo' 'xvidix' '-framedrop'
'-vop' 'cropdetect' '/mnt.mschiller5/home/mala/video/murke.nuv'
init_freetype
get_path('font/font.desc') -> '/home/mala/.mplayer/font/font.desc'
font: can't open file: /home/mala/.mplayer/font/font.desc
Font /usr/local/share/mplayer/font/font.desc loaded successfully! (206 chars)
Using Unoptimized OnScreenDisplay?
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using usleep() timing
get_path('input.conf') -> '/home/mala/.mplayer/input.conf'
get_path('murke.nuv.conf') -> '/home/mala/.mplayer/murke.nuv.conf'

Playing /mnt.mschiller5/home/mala/video/murke.nuv.
[file] File size is 3383203202 bytes
STREAM: [file] /mnt.mschiller5/home/mala/video/murke.nuv
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
DEMUXER: freeing demuxer at 0x10483400
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x10483400
Checking for Nullsoft Streaming Video
DEMUXER: freeing demuxer at 0x10483400
Checking for NuppelVideo?
NuppelVideo? file format detected.
==> Found video stream: 0
==> Found audio stream: 0
[V] filefmt:13 fourcc:0x3156554E size:1073872896x1073872896 fps: 0.00
ftime:= inf
get_path('sub/') -> '/home/mala/.mplayer/sub/'
get_path('default.sub') -> '/home/mala/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 176400->176400 (1411.2 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
No vidix driver name provided, probing available ones (-v option for details)!
X11 opening display: :0.0
vo: X11 color mask: 7FFF (R:7C00 G:3E0 B:1F)
vo: X11 running at 1280x1024 with depth 15 and 15 bpp (":0.0" => local display)
[x11] Detected wm supports layers.
[x11] Detected wm supports NetWM.
[x11] Unknown wm type...
[x11] Current fstype setting doesn't honour any X atoms
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/rage128_vid.so
[rage128] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/pm3_vid.so
[pm3] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/mga_crtc2_vid.so
[mga] probe
[mga] found 13 pci devices
[mga] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/sis_vid.so
[SiS] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/radeon_vid.so
[radeon] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/nvidia_vid.so
[nvidia_vid] Can't find chip
vidixlib: PROBING: /usr/local/lib/mplayer/vidix/mach64_vid.so
[mach64] Found chip: 3D Rage Pro 215GP
vidixlib: /usr/local/lib/mplayer/vidix/mach64_vid.so probed o'k
vidixlib: will use /usr/local/lib/mplayer/vidix/mach64_vid.so driver
vidixlib: Attempt to initialize driver at: 0xf478410
[mach64] version 1.0pre5-3.4.3
[mach64] Video memory = 6Mb
[mach64] Planar YUV formats are supported :)
vidixlib: '/usr/local/lib/mplayer/vidix/mach64_vid.so'successfully loaded
VIDIX: Description: BES driver for Mach64/3DRage cards
VIDIX: Author: Nick Kurshev and Michael Niedermayer
Opening video filter: [cropdetect]
==========================================================================
Opening video decoder: [nuv] NuppelVideo? decoder
VDec: vo config request - 1073872896 x 1073872896 (preferred csp: Planar I420)
Trying filter chain: cropdetect vo
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config
(1073872896x1073872896->1428251008x1073872896,flags=0,'MPlayer',0x30323449)
REQ: flags=0x437 req=0x0
VO: [xvidix] 1073872896x1073872896 => 1428251008x1073872896 Planar I420
VO: Description: X11 (VIDIX)
VO: Author: Alex Beregszaszi
Using colorkey: 3e0
Type: 0, display: 104946e8, resourceid: 0, serial: 23
Error code: 2, request code: 1, minor code: 0
uninit audio: pcm
DEMUXER: freeing demuxer at 0x10483400
DEMUXER: freeing sh_audio at 0x10483e38
DEMUXER: freeing sh_video at 0x10483da0
vo: uninit ...

Changed 13 years ago by reimar

Fixed some typos, hopfully fixes encoder as well.

comment:4 Changed 13 years ago by reimar

comment:5 Changed 13 years ago by reimar

  • attachments.isobsolete changed from 0 to 1

comment:6 Changed 13 years ago by reimar

Not quite as easy... There are still more problems left...

comment:7 Changed 13 years ago by mala@…

(In reply to comment #5)

Not quite as easy... There are still more problems left...

Tested attachment 112 - mplayer no longer crashes if one specifies -fps 25 at
the commandline (an improvement), but the image is garbage: in a black and white
movie, mplayer displays many multicolored sqares, probably on the order of 16 by
16 pixels (not sure, I'm just guessing their size...) - Manuel

Changed 13 years ago by reimar

next try

comment:8 Changed 13 years ago by reimar

  • attachments.isobsolete changed from 0 to 1

This one AFAICT works on HP-UX, except for that fps problem - I don't really
understand what causes that...

comment:9 Changed 13 years ago by mala@…

(In reply to comment #7)

Created an attachment (id=116) [edit]
next try

This one AFAICT works on HP-UX, except for that fps problem - I don't really
understand what causes that...

this works for me, too, apart from the fps problem - a big, big thanks, Reimar!
Really excellent work! - Manuel

comment:10 Changed 13 years ago by nicolas.plourde@…

working on osx.

comment:11 Changed 13 years ago by mala@…

Just tried encoding to mpeg4 - works well with a minor gitch apart from the
known -fps 25 issue... I don't get it working when the audio pass control file
(frameno.avi created with -ovc frameno) was made on a computer with opposite
byte order - this seems to be yet another thing to fix, although it is not
strictly the same bug... -- Manuel

comment:12 Changed 13 years ago by reimar

Applied that last patch. Fixing the fps problem seems to need endian conversion
for float - and it seems that unfortunately float endianness is independant of
int endianness... I'm waiting for somebody to come up with a good configure
check :-(

comment:13 Changed 13 years ago by diego@…

  • Owner changed from alex@… to Reimar.Doeffinger@…

Reimar, is this fixed now that you applied the patch? Then resolve it,
otherwise pass along some stuff for testing, I have a PPC now.

comment:14 Changed 13 years ago by diego@…

  • Cc diego@… added

comment:15 Changed 13 years ago by reimar

(In reply to comment #12)

Reimar, is this fixed now that you applied the patch? Then resolve it,
otherwise pass along some stuff for testing, I have a PPC now.

There is not much to test - it seems the fps doesn't work because it is a float,
and there currently is no code in MPlayer to find out what the correct format is
for that :-( Unless somebody else fixes that this part of the bug will stay...

comment:16 Changed 13 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

The fps problem should now be fixed as well, can somebody please test and report?

comment:17 Changed 13 years ago by diego@…

  • bug_file_loc set to http://mplayerhq.hu/MPlayer/samples/nuv/
  • Keywords VERIFIED added

Just checked back, it's working after I did a CVS update, for the nirvana.nuv
sample I had to specify -fps 25 before, now it works out of the box. Good work!

Note: See TracTickets for help on using tickets.