#gemrb@irc.freenode.net logs for 15 Dec 2009 (GMT)

Archive Today Yesterday Tomorrow
GemRB homepage


[00:00:46] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[00:00:46] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[00:02:28] --> wjp has joined #GemRb
[00:02:28] --> fuzzie has joined #GemRb
[01:15:21] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:15:21] <-- CIA-28 has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:15:21] <-- xrogaan has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:15:21] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:21:14] --> xrogaan has joined #gemrb
[01:41:46] --> tombhadAC has joined #GemRb
[01:41:46] --> CIA-28 has joined #GemRb
[01:41:46] --> anji has joined #GemRb
[01:42:42] --- xrogaan is now known as Guest97775
[01:51:09] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:51:09] <-- CIA-28 has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:51:09] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:52:01] --> tombhadAC has joined #GemRb
[01:52:01] --> CIA-28 has joined #GemRb
[01:52:01] --> anji has joined #GemRb
[01:57:47] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:57:47] <-- CIA-28 has left IRC (kornbluth.freenode.net irc.freenode.net)
[01:57:47] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:01:26] --> tombhadAC has joined #GemRb
[02:01:26] --> CIA-28 has joined #GemRb
[02:01:26] --> anji has joined #GemRb
[02:08:45] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:08:45] <-- CIA-28 has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:08:45] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:10:14] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:10:14] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:10:32] --> wjp has joined #GemRb
[02:10:32] --> fuzzie has joined #GemRb
[02:14:22] --> tombhadAC has joined #GemRb
[02:14:22] --> CIA-28 has joined #GemRb
[02:14:22] --> anji has joined #GemRb
[02:24:07] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:24:07] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:25:46] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:25:46] <-- CIA-28 has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:25:46] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:25:49] --> wjp has joined #GemRb
[02:25:49] --> fuzzie has joined #GemRb
[02:27:05] --> CIA-28 has joined #gemrb
[02:28:09] <-- CIA-28 has left IRC (Killed by Md (stuck))
[02:28:11] --> CIA-84 has joined #gemrb
[02:28:25] --> tombhadAC has joined #GemRb
[02:28:25] --> anji has joined #GemRb
[02:29:22] <-- anji has left IRC (Connection reset by peer)
[02:29:29] --> anji has joined #gemrb
[02:35:06] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:35:06] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:38:54] --> anji has joined #GemRb
[02:38:54] --> tombhadAC has joined #GemRb
[02:48:05] --> tomprince has joined #gemrb
[02:50:53] <-- tombhadAC has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:50:53] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[02:52:21] --> anji has joined #GemRb
[02:52:21] --> tombhadAC has joined #GemRb
[02:58:32] --> [1]Forgetful_Lio has joined #GemRB
[03:00:27] <-- tombhadAC has left IRC ("Verlassend")
[03:00:41] <-- CIA-84 has left IRC (kornbluth.freenode.net irc.freenode.net)
[03:00:41] <-- Forgetful_Lion has left IRC (kornbluth.freenode.net irc.freenode.net)
[03:00:43] --- [1]Forgetful_Lio is now known as Forgetful_Lion
[03:02:08] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[03:02:08] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[03:02:35] --> wjp has joined #gemrb
[03:02:55] --> fuzzie has joined #GemRb
[03:03:18] <-- fuzzie has left IRC (Read error: 104 (Connection reset by peer))
[03:03:27] --> CIA-72 has joined #gemrb
[03:04:27] --> fuzzie has joined #gemrb
[03:20:45] <-- CIA-72 has left IRC (kornbluth.freenode.net irc.freenode.net)
[03:21:27] --> CIA-90 has joined #gemrb
[03:22:21] --> CIA-72 has joined #GemRb
[03:22:51] <-- CIA-72 has left IRC ()
[03:44:21] --> Maighstir has joined #gemrb
[03:49:10] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[04:03:11] --> anji has joined #GemRb
[04:08:41] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[04:11:20] <-- Maighstir has left #gemrb ()
[04:27:24] --> anji has joined #GemRb
[04:48:07] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[04:56:08] --> anji has joined #GemRb
[05:03:38] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[05:10:04] --> fuzzie has joined #GemRb
[05:11:24] --> fuzzie_ has joined #gemrb
[05:11:50] <-- fuzzie has left IRC (Read error: 131 (Connection reset by peer))
[05:36:34] <-- tomprince has left IRC (Read error: 60 (Operation timed out))
[05:39:05] --> tomprince has joined #gemrb
[05:54:20] --> raevol has joined #GemRB
[06:01:05] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[06:05:17] --> anji has joined #GemRb
[06:10:47] --- ChanServ gives channel operator status to wjp
[07:15:12] <-- raevol has left IRC ("Leaving.")
[08:58:38] --> lynxlynxlynx has joined #gemrb
[08:58:38] --- ChanServ gives channel operator status to lynxlynxlynx
[09:02:23] <-- tomprince has left IRC (Read error: 110 (Connection timed out))
[09:08:57] <-- Forgetful_Lion has left IRC (Read error: 113 (No route to host))
[09:29:44] <-- |Cable| has left IRC (Remote closed the connection)
[09:57:38] --> Avenger has joined #gemrb
[09:57:42] --- ChanServ gives channel operator status to Avenger
[09:58:00] <Avenger> hi
[10:00:13] --> Gekz has joined #GemRB
[10:00:18] --> Forgetful_Lion has joined #GemRB
[10:00:28] <Gekz> Forgetful_Lion: STOP DOING THAT
[10:00:32] <Gekz> it's getting creepy xD
[10:02:53] <Avenger> he can't help it, he got a no route to host an hour ago
[10:03:26] <Gekz> lolk
[10:47:00] <CIA-90> gemrb: 03avenger_teambg * r7462 10/gemrb/trunk/gemrb/plugins/BIKPlayer/ (Makefile.am common.h jrevdct.cpp): removed jrevdct.cpp (now using bink_idct)
[11:09:44] <CIA-90> gemrb: 03avenger_teambg * r7463 10/gemrb/trunk/gemrb/plugins/BIKPlayer/ (BIKPlay.cpp dsputil.h fft.cpp): removed unneeded stuff from ffmpeg code
[11:10:34] <Gekz> does GemRB still compile and run on windows
[11:10:38] <Gekz> with the addition of bikplayer?
[11:11:29] <fuzzie_> well, avenger tests vc6, so i see no reason why mingw would complain
[11:11:43] <Avenger> it runs on msvc6
[11:11:48] <Avenger> dunno about msvc7
[11:12:58] <Avenger> so far you can hear the audio part of iwd2 movies
[11:13:25] <Avenger> fuzzie, can you do the yuv plane rendering or it is up to me?
[11:14:19] <fuzzie_> you just need a little bit of code changed in showFrame, right?
[11:14:31] <Avenger> and possibly new code in sdlvideo
[11:14:38] <fuzzie_> i mean, in SDLVideo's showFrame
[11:14:50] <Avenger> well, and the call to it in bikplayer
[11:15:07] <Avenger> and possibly the output buffer allocation fixed, and the double buffering :)
[11:15:15] <fuzzie_> do you know which format in particular the input is in? YV12?
[11:15:25] <Avenger> YUV16, i think
[11:15:34] <Avenger> i left in a comment
[11:15:56] <Avenger> pixel format is PIX_FMT_YUV420P
[11:16:00] <Avenger> whatever that means
[11:16:39] <fuzzie_> and your code outputs that?
[11:16:58] <fuzzie_> or the original code uses img_convert?
[11:17:00] <Gekz> Pixel format YUV 420p
[11:17:13] <Gekz> 420x280 or whatever that obscure res was
[11:17:25] <Gekz> I believe.
[11:17:52] <Avenger> the original code uses something like that, yes
[11:19:30] <Avenger> but this is handled by the ffmpeg framework
[11:19:38] <Avenger> and i didn't really understood that part
[11:19:54] <Avenger> all the bink decoder says is that pixel format
[11:20:06] <Avenger> and the rest is done by the ffmpeg framework
[11:20:11] <fuzzie_> yes
[11:20:27] <Avenger> i somewhere saw a description what that format means
[11:20:52] <Avenger> decode_frame gives this format directly, the rest is in ffmpeg core
[11:21:02] <fuzzie_> ah, you have some hacked-up AVFrame struct
[11:21:16] <Avenger> yes
[11:21:43] <Avenger> because the decoder directly uses the linesize attribute
[11:21:47] <fuzzie_> so this nice c_pic.data you hand to showFrame is actually some array
[11:21:49] <Avenger> it directly decodes into the planes
[11:22:09] <Avenger> c_pic data is 3 planes
[11:22:14] <Avenger> they are separate
[11:22:18] <fuzzie_> so (ieByte **), not (ieByte *)?
[11:22:57] <fuzzie_> maybe we should just add a showYUVFrame function, then
[11:23:06] <Avenger> uh yes
[11:23:18] <Avenger> actually it is only 3
[11:23:19] <Avenger> not 4
[11:23:27] <Avenger> so some code here is still bad
[11:23:39] <fuzzie_> i guess your linesizes are going to differ from what i need
[11:23:50] <Avenger> well it is allocated
[11:23:52] <fuzzie_> so we have to rewrite the arrays anyway
[11:23:57] <Avenger> really?
[11:24:26] <fuzzie_> well, i mean, when we copy it into video memory
[11:24:54] <Avenger> well, if there is any conversion it is done in ffmpeg core
[11:25:03] <fuzzie_> that img_format is the conversion function
[11:25:09] <fuzzie_> erm, i mean, img_convert
[11:25:15] <fuzzie_> and that is in ffmpeg core, yes
[11:25:18] <Avenger> it is in ffplay
[11:26:00] <Avenger> i use only linesize and data from the avframe
[11:26:18] <Avenger> and only 3 planes
[11:26:29] <fuzzie_> for our purposes, it is only interesting in the sense that it converts linesize/data from one avframe to another
[11:26:41] <fuzzie_> i'll try writing some code to do that for SDL
[11:26:56] <Avenger> well, and that if there is a conversion anyway, then we can cut the 4th plane from my output
[11:27:30] <Avenger> i'm afk
[11:27:44] <CIA-90> gemrb: 03avenger_teambg * r7464 10/gemrb/trunk/gemrb/plugins/BIKPlayer/ (BIKPlay.h dsputil.h fft.cpp rdft.cpp): removed even more cruft
[11:33:43] <Avenger> hah, i think i found the crasher in the video code
[11:33:44] <CIA-90> gemrb: 03avenger_teambg * r7465 10/gemrb/trunk/gemrb/plugins/BIKPlayer/BIKPlay.cpp: don't free memory garbage
[11:33:56] <Avenger> at least, one of them :)
[11:38:44] <fuzzie_> hm, try to avoid changing showFrame code :)
[11:39:54] <fuzzie_> wow, everything includes Video.h
[11:40:12] <Avenger> you need to change it
[11:40:18] <Avenger> i mean, you need a new one
[11:40:26] <fuzzie_> i added the new function, so everything recompiles
[11:40:39] <Avenger> yes
[11:40:49] <fuzzie_> i was wondering why everything recompiles :)
[11:41:17] <Avenger> well, i guess we cannot split the interface into smaller pieces
[11:41:28] <fuzzie_> no, it is fine as it is
[11:41:44] --- fuzzie_ is now known as fuzzie
[11:44:40] <fuzzie> and now again, because i am an idiot and forgot the '= 0'.
[11:56:10] <fuzzie> hm
[11:56:21] <fuzzie> ok, this code works better without DecodeVideoFrame commented out, too :)
[11:56:55] <fuzzie> squee, i see the black isle logo
[11:57:01] <fuzzie> and then it crashes
[12:02:10] <Avenger> wow
[12:02:31] <Avenger> did you download the changes i just uploaded?
[12:02:34] <fuzzie> yes
[12:02:55] <Avenger> so at least it can decode the keyframe
[12:03:10] <Avenger> oh yes, there is some croptbl
[12:03:23] <Avenger> i don't know how that supposed to work
[12:03:35] <Avenger> nothing initializes it, but copy block and stuff uses it
[12:04:20] <Avenger> from my 'studies' it is supposed to be some clipboard where other block functions should copy stuff
[12:05:24] <fuzzie> well, my renderer is very broken, everything is green
[12:05:39] <fuzzie> i'm not sure whether this is my fault or whether it's the BIKPlayer output
[12:06:06] <Avenger> everything is green sounds fishy, but then how do you see the logo
[12:06:14] <fuzzie> it is green :)
[12:06:22] <Avenger> ahh, then you see only one plane
[12:06:38] <lynxlynxlynx> planescape: color
[12:06:44] <fuzzie> but sometimes data for all planes just disappears
[12:07:10] <Avenger> maybe the code for double buffering isn't correct?
[12:07:21] <Avenger> the stuff that copies the current frame to the previous one
[12:07:28] <fuzzie> it seems fine from frame-to-frame
[12:07:37] <Avenger> then i'm puzzled :)
[12:08:08] <Avenger> at least you made an improvement and could render if only one plane :)
[12:08:14] <Avenger> that means lots of code is correct
[12:12:03] <CIA-90> gemrb: 03fuzzie * r7466 10/gemrb/trunk/gemrb/plugins/ (5 files in 3 dirs): add showYUVFrame function (probably broken)
[12:12:21] <fuzzie> someone else can spot my stupid errors, afk for a bit
[12:13:03] <fuzzie> SDL doesn't render it properly without SDL_VIDEO_YUV_HWACCEL=0 for me, but i think that is the compiz on this machine.
[12:13:41] <fuzzie> i think the WOTC logo is a good example to test with right now: the colours are there sometimes
[12:18:45] <Avenger> k
[12:19:39] <Avenger> after several minutes ...
[12:22:08] <fuzzie> it is that slow for you?
[12:24:13] <Avenger> yep, a full recompile takes some minutes
[12:24:26] <fuzzie> oh, the compile :)
[12:24:28] <Avenger> especially if i switch to another window
[12:25:13] <Avenger> hmm i didn't see a pixel
[12:26:07] <fuzzie> try with SDL_VIDEO_YUV_HWACCEL=0 if you just get black on Linux. so, 'SDL_VIDEO_YUV_HWACCEL=0 gemrb -c blah.cfg'
[12:26:12] <Avenger> hmm something appeared
[12:26:21] <Avenger> a piece of green thing in the wotc logo
[12:27:57] <Avenger> crash is here, btw #6 0x00007f968b2a2880 in BIKPlay::EndVideo (this=0x1509030) at BIKPlay.cpp:564
[12:28:02] <Avenger> double free or such
[12:28:27] <Avenger> heh, i thought i fixed that
[12:28:41] <fuzzie> c_last is c_pic there, i guess?
[12:30:20] <Avenger> av_freep nulls the pointer it just freed
[12:30:27] <Avenger> so it shouldn't cause any mixup like that
[12:30:42] <fuzzie> you copy the pointers
[12:30:49] <Avenger> hmm
[12:30:51] <fuzzie> with the 'c_last = c_pic'
[12:30:52] <Avenger> true
[12:31:22] <Avenger> i thought i do the same as the original :)
[12:31:35] <Avenger> ok, after copy, i guess it should NULL the previous instances
[12:32:29] <fuzzie> for wotc logo, you should get some weird green blocky logo, followed by all-green, followed by blocky green bits around the colour WOTC logo, i guess
[12:32:45] <Avenger> memset(c_last.data,0, sizeof(c_last.data)); ?
[12:32:47] <fuzzie> since it's all blocky and there is colour there, i am going to guess it is BIKPlayer's data that is odd, for now
[12:32:51] <fuzzie> sure
[12:32:52] <Avenger> err, c_pic
[12:33:38] <Avenger> ahh the logo is blocky?
[12:33:50] <Avenger> i thought it is all fine at least one plane
[12:33:50] <fuzzie> the memset fixes it for me
[12:34:01] <fuzzie> i think all planes are there, but the data is bad
[12:34:02] <Avenger> fixes what?
[12:34:07] <Avenger> the crashes?
[12:34:07] <fuzzie> the crash :)
[12:34:45] <Avenger> got another crash
[12:34:46] <Avenger> on quit
[12:35:01] <Avenger> #5 0x00007f73f20668da in SDL_FreeSurface () from /usr/lib/libSDL-1.2.so.0
[12:35:03] <Avenger> #6 0x00007f73f08290ed in ~SDLVideoDriver (this=0x6341f0) at SDLVideoDriver.cpp:56
[12:35:04] <Avenger> #7 0x00007f73f4d56f3b in ~Interface (this=0x602010) at Interface.cpp:471
[12:35:15] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[12:35:51] <fuzzie> oops
[12:36:00] <fuzzie> my committed patch was corrupt
[12:37:47] <CIA-90> gemrb: 03fuzzie * r7467 10/gemrb/trunk/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp: remember to call SDL_FreeYUVOverlay
[12:37:49] <fuzzie> don't know if that helps
[12:38:14] <Avenger> i guess it should fix my crash
[12:38:15] <CIA-90> gemrb: 03avenger_teambg * r7468 10/gemrb/trunk/gemrb/plugins/BIKPlayer/BIKPlay.cpp: don't jump some hoops when not needed
[12:39:43] <Avenger> hmm comparing f to 32767 does one unnecessary conversion, right?
[12:39:55] <Avenger> if i write f>32767.0 it is faster
[12:39:57] <Avenger> right?
[12:40:33] <fuzzie> the compileer will optimise that :)
[12:40:51] <Avenger> oh you say, it will convert f to int only once?
[12:41:31] <fuzzie> it'll convert the 32767 to float when it compiles
[12:41:38] <Avenger> aah
[12:41:53] <Avenger> i should trust my compiler better
[12:42:12] <Gekz> hhaha
[12:42:14] <fuzzie> no harm in doing it yourself :)
[12:42:19] --> anji has joined #GemRb
[12:43:01] <Avenger> k
[12:43:09] <CIA-90> gemrb: 03avenger_teambg * r7469 10/gemrb/trunk/gemrb/plugins/BIKPlayer/BIKPlay.cpp: in compiler we don't trust
[12:46:40] <Avenger> huh, something ate all my cpu time
[12:47:24] <Avenger> i wonder if it was any of my recent changes :)
[12:48:10] <fuzzie> the BIKPlayer timing is so inaccurate that it's difficult to tell exactly how bad the cpu usage is
[12:50:10] <Avenger> no this is something heavy, it is more like eating memory with a big spoon
[12:50:27] <Avenger> almost totally takes over the comp
[12:50:40] <Avenger> kill -9 helps it
[12:52:31] <fuzzie> you have r7467?
[12:52:57] <Avenger> yes
[12:53:01] <fuzzie> wow, we leak memory a lot
[12:53:17] <fuzzie> i play the introduction and gemrb is at 200mb quickly
[12:54:18] <Avenger> i got 2G memory
[12:54:30] <Avenger> and i have 1.7G free
[12:54:41] <fuzzie> well, i killed it before it got further :)
[12:54:51] <-- Forgetful_Lion has left IRC (" HydraIRC -> http://www.hydrairc.com <- IRC with a difference")
[12:54:59] <Avenger> mine freezes around the first frame now
[12:55:04] <Avenger> so it is more serious
[12:55:07] <fuzzie> huh :(
[12:55:14] <Avenger> first frame of wotc.bik
[12:55:40] <Avenger> it is like an infinite loop
[12:55:45] <fuzzie> hm, still fine here
[12:56:18] <Avenger> it reads only about 602 bits of video data
[12:56:29] <Avenger> i see the debug printfs of the video decoder
[12:58:08] <fuzzie> damn, valgrind complains but i missed it
[12:58:14] <fuzzie> let me write to a log
[12:58:46] <Avenger> if i comment out the video decoder it is fine, so it is not my recent audio changes
[12:59:45] <Avenger> i did that memset only
[13:00:08] <Avenger> ok, i comment out showframe
[13:00:12] <fuzzie> probably something uninitialised
[13:00:54] <Avenger> still works
[13:01:08] <Avenger> so it freezes in showframe for some reason
[13:01:19] <fuzzie> yes
[13:01:44] <Avenger> did you upload all changes in sdlvideo?
[13:01:48] <fuzzie> c_pic.data is bad
[13:03:29] <fuzzie> i don't see how that would ever happen, since get_buffer allocates it again
[13:04:33] <Avenger> what is bufw in that copy?
[13:04:45] <Avenger> afaik, the linesize is different in the first plane
[13:04:58] <Avenger> thats why there is a separate linesize variable
[13:05:02] <fuzzie> that is why i pass the linesizes around :)
[13:05:25] <Avenger> but in memcpy it is bufw
[13:05:37] <fuzzie> bufw should always be <= linesize, no?
[13:05:56] <Avenger> dunno
[13:05:58] <fuzzie> otherwise you are rendering garbage
[13:06:07] <fuzzie> maybe i am stupid
[13:06:19] <Avenger> i don't know how this is supposed to work
[13:06:27] <Avenger> i don't know why the first plane is double size
[13:06:40] <Avenger> i just read the comments
[13:07:49] <fuzzie> well, since mine doesn't hang, it is difficult to tell
[13:08:34] <fuzzie> i changed it to use the minimal stride and it doesn't make any difference to output
[13:09:34] <Avenger> in the ffplay code i see this: pict.data[0] = vp->bmp->pixels[0];
[13:09:36] <Avenger> pict.data[1] = vp->bmp->pixels[2];
[13:09:37] <Avenger> pict.data[2] = vp->bmp->pixels[1];
[13:09:37] <fuzzie> http://fuzzie.org/nfs/gemrb/use_stride.txt
[13:09:47] <Avenger> so it switches 2 planes
[13:09:56] <Avenger> this could explain green?
[13:10:03] <fuzzie> no, i tried with switched planes already
[13:10:34] <Avenger> yes, fuzzie, i think that patch makes sense, to me :)
[13:10:38] <fuzzie> what does ffplay pass to SDL?
[13:10:46] <fuzzie> well, i mean, try the patch :-)
[13:11:03] <fuzzie> or i can just apply it, it surely does no harm
[13:11:45] <CIA-90> gemrb: 03fuzzie * r7470 10/gemrb/trunk/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp: use minimal stride, not width, when copying YUV data
[13:12:10] <Avenger> but this shouldn't cause a freeze
[13:12:14] <Avenger> only garbage
[13:12:32] <Avenger> or segfault or such
[13:12:34] <fuzzie> yes, i can't reproduce the freeze, maybe run it in a debugger and ctrl-c it to see where it is?
[13:12:49] <Avenger> i don't think it would respond to ctrl-c
[13:16:32] <Avenger> i'm glad if i can switch to another shell window and issue the kill -9 :)
[13:17:00] <Avenger> it eats up all available memory in a wink
[13:17:08] <fuzzie> well, you can do some 'sleep 5; kill <pid>' before you click play
[13:17:10] <Avenger> i guess it is something like malloc(-x)
[13:17:36] <fuzzie> and gdb should catch the signal and break
[13:17:37] <Avenger> it allocates some insane memory size at one point
[13:18:01] <Avenger> since i got av_malloc, i could simply printf the allocated sizes
[13:19:09] <Avenger> if size>1000k abort
[13:19:12] <Avenger> maybe
[13:21:54] <Avenger> well, it is not that
[13:22:09] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[13:23:18] --> anji has joined #GemRb
[13:23:19] <Avenger> why it doesn't freeze for you :(
[13:23:54] <fuzzie> i am on 32-bit
[13:24:27] <Avenger> hmm, why do you always create the yuv overlay
[13:26:11] <Avenger> yes, i'm on 64 bit, so that is a difference
[13:26:34] <Avenger> so you say, the freeze could be in sdl's yuv code?
[13:26:35] <Avenger> haha
[13:27:15] <fuzzie> i think it is more likely that i do something stupid
[13:27:29] <fuzzie> perhaps the strides are negative or something
[13:29:07] <Avenger> well, i move the overlay creation outside
[13:30:22] <fuzzie> well, i checked it doesn't leak :) but ok
[13:30:50] <fuzzie> i guess it could have some bug where it leaks on 64-bit
[13:30:58] <fuzzie> and it's much better outside anyway
[13:31:07] <fuzzie> you just want to make sure you don't always create it
[13:31:13] --> kettuz has joined #gemrb
[13:31:19] <fuzzie> since you can often only have one system overlay and gemrb hogging it will not be so good
[13:33:00] <Avenger> yes
[13:33:15] <Avenger> i added an optional yuv parameter to initmoviescreen
[13:34:02] <fuzzie> great :)
[13:39:34] <Avenger> ok, i commented out the sdl calls, but let all memcpy to run. also the overlay is allocated in the beginning. (it is freed only on quit, once it is allocated)
[13:40:12] <Avenger> works now
[13:40:20] <Avenger> except at the end :)
[13:40:30] <Avenger> does in freeyuvoverlay
[13:40:35] <Avenger> dies
[13:40:44] <Avenger> #1 0x00007fd3d347db32 in SDL_FreeYUVOverlay () from /usr/lib/libSDL-1.2.so.0
[13:40:46] <Avenger> #2 0x00007fd3d1c3d0c4 in ~SDLVideoDriver (this=0x6341f0) at SDLVideoDriver.cpp:58
[13:45:05] <Avenger> i have only displayyuvoverlay commented out now
[13:45:16] <Avenger> i don't know why it dies in the end
[13:46:39] <Avenger> oh hehe
[13:46:44] <Avenger> i free it after sdl_quit
[13:47:13] <Avenger> btw, now it doesn't freeze
[13:47:19] <Avenger> all i did is to allocate the overlay once
[13:49:14] <CIA-90> gemrb: 03avenger_teambg * r7471 10/gemrb/trunk/gemrb/plugins/Core/Video.h: part of last commit
[13:49:47] <Gekz> does the video work yet
[13:49:51] <Avenger> hmm, you changed something ?
[13:50:32] <Gekz> me?
[13:50:38] <CIA-90> gemrb: 03avenger_teambg * r7472 10/gemrb/trunk/gemrb/plugins/ (4 files in 2 dirs): allocate yuv overlay only once during a movie
[13:50:39] <Gekz> the world
[13:51:51] <Avenger> no video, we work on it
[13:52:41] <Avenger> i see only some greenish flickering on top of the screen
[13:53:59] <Gekz> cool
[13:57:02] <fuzzie> you should really see a full green
[13:57:17] <fuzzie> did you try the SDL_VIDEO_YUV_HWACCEL=0?
[14:01:29] <Avenger> config iwd2
[14:01:31] <Avenger> SDL_VIDEO_YUV_HWACCEL=0
[14:01:32] <Avenger> #rm -rf plugins/plugins/libOpen*
[14:01:34] <Avenger> gdb gemrb -x run
[14:01:35] <Avenger> this is what i run
[14:01:52] <Avenger> should be fine
[14:02:30] <fuzzie> you need 'export SDL_VIDEO_YUV_HWACCEL=0' if you run it like that
[14:03:10] <Avenger> like this?: SDL_VIDEO_YUV_HWACCEL=0;export SDL_VIDEO_YUV_HWACCEL
[14:03:38] <Avenger> yes better
[14:03:51] <Avenger> now i see a green mess in middle of the screen
[14:03:58] <fuzzie> :)
[14:04:23] <Avenger> wow, at some times i see bit perfect images
[14:04:29] <Avenger> on green background, but still
[14:04:41] <Avenger> so some opcodes are working
[14:04:43] <Avenger> some don't
[14:04:45] <fuzzie> yes, it looks quite hopeful, just buggy
[14:04:48] <Avenger> i guess raw copy is working
[14:05:19] <Avenger> the bottom of the area is garbage
[14:05:30] <Avenger> so the height is not good
[14:05:46] <Avenger> nor the width
[14:05:57] <fuzzie> it works for me, but i didn't look at your patch
[14:06:02] <Avenger> it seems it uses only half of the allocated height
[14:06:11] <Avenger> and the graphic is distorted
[14:06:19] <Avenger> so it uses only every 2nd line
[14:06:20] <fuzzie> if you moved the yuv overlay then i don't know where you get the width/height from, the header?
[14:06:34] <Avenger> initvideodisplay ?
[14:06:44] <fuzzie> the w/h to InitMovieScreen are presumably bad?
[14:06:51] <Avenger> InitMovieScreen
[14:06:54] <Avenger> ah
[14:06:55] <Avenger> hmm
[14:06:57] <Avenger> could be
[14:07:00] <fuzzie> that is output width/height
[14:07:06] <Avenger> yes you are right
[14:07:37] <Avenger> it should use header.width/header.height
[14:07:56] <fuzzie> well, i guess you need new parameters
[14:08:04] <Avenger> i guess no
[14:08:29] <Avenger> just make sure the input/output values don't clash
[14:08:47] <Avenger> it goes in, you use it up, then whatever goes out, should be last
[14:09:33] <Avenger> i mean, the if(yuv) block should be the first
[14:09:47] <Avenger> then the values won't clash :)
[14:10:21] <fuzzie> oh, i see
[14:10:48] <Avenger> needs an int cast, but that's all
[14:10:59] <Avenger> oh damn, no
[14:11:03] <Avenger> more than that
[14:11:09] <Avenger> they are references of course
[14:11:52] <Avenger> still doable
[14:12:05] <Avenger> a bit uglier than i thought at first
[14:12:24] <Avenger> yeah this really helped
[14:12:43] <Avenger> and i can tell you what's wrong
[14:12:50] <Avenger> the croptbl thingie
[14:13:07] <Avenger> it never gets value, but used later in these block opcodes
[14:14:18] <Avenger> btw, i moved the line width calculation outside of a loop
[14:14:21] <CIA-90> gemrb: 03avenger_teambg * r7473 10/gemrb/trunk/gemrb/plugins/ (BIKPlayer/BIKPlay.cpp SDLVideo/SDLVideoDriver.cpp): use correct width/height
[14:14:49] <fuzzie> also a good idea :)
[14:15:09] <fuzzie> the memcpy would mess up any optimisation the compiler would try, i guess
[14:25:24] <Avenger> btw, you could somehow avoid the memcpy
[14:25:53] <Avenger> isn't it possible to output with the correct strides in the first place?
[14:26:06] <fuzzie> sure
[14:26:15] <fuzzie> but i thought it dangerous to mess with it for now
[14:26:29] <fuzzie> since we can always fix that once it renders ok
[14:26:56] <fuzzie> and i think the SDL strides will differ between machines..
[14:30:30] <Avenger> yes, but we could 'ask' for them
[14:30:38] <Avenger> i think it is how ffmpeg works
[14:31:15] <fuzzie> well, SDL seems to memcpy internally
[14:31:41] <fuzzie> it does 'pict.data[0] = blah->pixels[0]' and then calls some function which copies to 'pict'
[14:31:52] <fuzzie> i mean, ffplay seems to memcpy internally!
[14:32:30] <Avenger> i see
[14:33:01] <Avenger> i didn't see any memcpy in it, but i hardly understood that code :)
[14:33:54] <Avenger> when i read your code with the yuv overlay, i immediately understood it
[14:34:08] <Avenger> i somehow don't see the same lock/copy/unlock/display routine
[14:34:28] <fuzzie> well, nowadays i think it uses swscale
[14:34:46] <fuzzie> since img_convert is dead
[14:35:07] <Avenger> yes, i see that string in the code, but i don't know what is it, so you follow ffmpeg development more than i :)
[14:35:44] <fuzzie> so the 'sws_scale' call is what is doing the copy
[14:35:50] <Avenger> so they use some external lib?
[14:35:59] <Avenger> heh good to know
[14:36:00] <fuzzie> well, i think it is an ffmpeg-maintained library
[14:36:12] <fuzzie> it is kept in their repository, anyway
[14:36:29] <Avenger> libswscale
[14:36:46] <fuzzie> yes
[14:37:49] <fuzzie> it is a very useful library, it can convert between many different display formats
[14:37:51] <Avenger> anyway, the worst part is in the decoding opcodes now
[14:38:00] <fuzzie> yes, and i dare not look at them
[14:38:17] <Avenger> and the primary candidate is the croptbl array
[14:38:26] <Avenger> it never gets assigned
[14:58:44] <Avenger> ahh finally i found where it is initialized
[15:00:17] <Avenger> woo, almost perfect
[15:01:50] <CIA-90> gemrb: 03avenger_teambg * r7474 10/gemrb/trunk/gemrb/plugins/BIKPlayer/ (BIKPlay.cpp dsputil.h): now the video is recognisable
[15:02:07] <fuzzie> cool
[15:04:06] <fuzzie> seems to work fine here too
[15:04:14] <fuzzie> just still a bit too much green :)
[15:05:05] <Avenger> yep
[15:07:04] <lynxlynxlynx> nice
[15:09:31] <Avenger> so it would help if we know which block type is acting funny
[15:11:09] <Avenger> i guess, i can cut out the permutation thingie
[15:11:26] <Avenger> or maybe, it needs to be set correctly
[15:11:47] <lynxlynxlynx> gemrb crashes if you close it during the video
[15:13:02] --> Maighstir has joined #gemrb
[15:14:46] <Avenger> that might happen with mve videos too
[15:15:45] <Avenger> strange, it doesn't crash here
[15:15:48] <Avenger> it just stops the movie
[15:16:07] <Avenger> did you download all commits?
[15:16:57] <lynxlynxlynx> yep
[15:18:34] <lynxlynxlynx> well, first it stop the movie, but if i try to quit again, it aborts
[15:19:03] <lynxlynxlynx> SDL_VIDEO_YUV_HWACCEL=0 was crucial for me too
[15:19:13] <lynxlynxlynx> killed most of the flickering
[15:19:17] <Avenger> yep
[15:20:38] <fuzzie> are you all running compositing window managers?
[15:21:56] <Avenger> standard ubuntu install with kde
[15:22:22] <lynxlynxlynx> no compositing
[15:23:02] <fuzzie> hm, maybe my code does something stupid, if it doesn't work without compositing.
[15:23:18] <Avenger> ahh that would be this compiz thingie?
[15:23:22] <Avenger> i don't have it
[15:23:53] <fuzzie> Avenger: or the kde window manager
[15:24:09] <lynxlynxlynx> kde4 does its own
[15:24:16] <Avenger> oops kwin?
[15:24:23] <Avenger> well, i have it then
[15:24:51] <Avenger> well lets see, which version
[15:25:00] <fuzzie> any kde4 one
[15:25:09] <Avenger> 3.5
[15:25:10] <Avenger> so no
[15:25:22] <Avenger> no compositing here
[15:29:08] <-- kettuz has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- Avenger has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- CIA-90 has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- lynxlynxlynx has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- Maighstir has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:29:08] <-- Gekz has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:31:31] --> Avenger has joined #GemRb
[15:31:31] --> Maighstir has joined #GemRb
[15:31:31] --> kettuz has joined #GemRb
[15:31:31] --> anji has joined #GemRb
[15:31:31] --> Gekz has joined #GemRb
[15:31:31] --> lynxlynxlynx has joined #GemRb
[15:31:31] --> fuzzie has joined #GemRb
[15:31:31] --> CIA-90 has joined #GemRb
[15:32:11] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[15:37:14] --> wjp has joined #GemRb
[15:52:01] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[16:02:01] --> wjp has joined #GemRb
[16:12:39] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[16:23:40] --> wjp has joined #GemRb
[16:27:17] <Avenger> sdl_flip is in the other movie player
[16:28:42] <CIA-90> gemrb: 03avenger_teambg * r7475 10/gemrb/trunk/gemrb/plugins/BIKPlayer/ (BIKPlay.cpp mem.cpp): removed some debug prints
[16:31:04] <fuzzie> yes, but we allocate the main surface differently
[16:32:31] <fuzzie> oh, i see what you mean
[16:32:43] <fuzzie> you mean, mveplayer? it does sdl_flip because it is rendering onto the SDL surface
[16:32:54] <fuzzie> i think sdl_flip in the yuv overlay code is just overwriting the overlay
[16:33:03] <Avenger> hmm
[16:33:46] <Avenger> SDL_Flip( disp );
[16:33:52] <fuzzie> the yuv overlay stuff writes directly to the video card in hw-accelerated mode
[16:33:53] <Avenger> disp is the normal sdl surface
[16:33:58] <Avenger> aah
[16:34:00] <Avenger> i see
[16:34:08] <Avenger> but we cannot really do that
[16:34:15] <Avenger> we need to render subtitles too
[16:34:39] <Avenger> and that is done (supposed to be done) on the standard surface
[16:34:52] <Avenger> it doesn't work, though :)
[16:35:10] <Avenger> i see 'fetched subtitle: ...' but i never see it on screen
[16:35:10] <fuzzie> well, they're meant to be rendered below the video anyway
[16:35:26] <fuzzie> but, yes, i don't understand how it is meant to work
[16:35:29] <Avenger> that is still the disp surface
[16:35:53] <Avenger> maybe not...
[16:35:57] <Avenger> it is some backBuf
[16:35:59] <Avenger> hmm
[16:36:11] <Avenger> ahh then backBuf= disp
[16:36:11] <fuzzie> but i tried creating disp with all the relevant hw-accelerated flags etc, and it still flickers every other frame
[16:37:52] <Avenger> huh
[16:38:00] <Avenger> i simply got a crash
[16:38:04] <fuzzie> and we don't set doublebuf, so meh
[16:38:43] <Avenger> with hwaccel enabled, something corrupts memory
[16:38:44] <Avenger> #0 0x00007fcfa9a7a580 in GetBitContext::get_bits (this=0xc36690, n=4) at GetBitContext.cpp:35
[16:38:44] <Avenger> #1 0x00007fcfa9a7ac10 in GetBitContext::read_tree (this=0xc36690, tree=0xc341d4)
[16:38:45] <Avenger> at GetBitContext.cpp:100
[16:38:47] <Avenger> #2 0x00007fcfa9a7711c in BIKPlay::read_bundle (this=0xc2fda0, bundle_num=0)
[16:38:48] <Avenger> at BIKPlay.cpp:951
[16:38:54] <Avenger> buffer for the getbitcontext is corrupted
[16:39:12] <fuzzie> you didn't modify the strides code?
[16:39:17] <Avenger> very odd
[16:41:30] <fuzzie> we can simply putenv("SDL_VIDEO_YUV_HWACCEL=0");
[16:41:33] <fuzzie> but it is slow
[16:42:02] <Avenger> why does hwaccel corrupt memory
[16:42:21] <fuzzie> run it under valgrind?
[16:42:37] <Avenger> yes good idea
[16:42:53] <fuzzie> that is what i've been doing, but i don't see your problems :/
[16:52:03] <fuzzie> you would think only doing bufh/2 lines for U and V would be a fix
[16:52:06] <fuzzie> since they should be 2x2 blocks
[16:52:16] <fuzzie> but if i do that, it segfaults, i guess because there is uninitialised data
[16:57:49] <CIA-90> gemrb: 03fuzzie * r7476 10/gemrb/trunk/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp: horizontal resolution is halved for U and V planes
[16:57:56] <fuzzie> try that, i guess. not sure why it is still segfaulting for me in hw mode.
[16:59:53] <Avenger> did it fix some artifacts?
[16:59:58] <Avenger> hmm guess no
[17:00:03] <Avenger> it is global stuff
[17:00:35] <Avenger> now i see nothing
[17:01:07] <Avenger> without hwaccel it is the same
[17:01:13] <lynxlynxlynx> i see as before, but of course the speed is better
[17:01:19] <Avenger> well you fixed the hwaccel
[17:01:29] <Avenger> it doesn't crash :)
[17:01:49] <lynxlynxlynx> still flickers though
[17:02:01] <lynxlynxlynx> hardly any speed gain
[17:02:14] <-- fuzzie has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:03:01] <Avenger> i will comment out sdl_Flip
[17:04:13] <Avenger> yep, i guess fuzzie is right, it is not needed in either mode
[17:05:30] <Avenger> this should fix your flicker, i guess
[17:05:34] <CIA-90> gemrb: 03avenger_teambg * r7477 10/gemrb/trunk/gemrb/plugins/SDLVideo/SDLVideoDriver.cpp: commented out sdl_flip in yuv mode
[17:05:48] --> fuzzie has joined #gemrb
[17:06:08] <Avenger> fuzzie: i commented out sdl_flip, now i see it in both modes
[17:08:22] <lynxlynxlynx> indeed it does
[17:08:41] <fuzzie> i wonder what takes all the cpu time
[17:09:05] <Avenger> all that memcpy :)
[17:09:21] <fuzzie> if you comment out the memcpy and render it's still way too slow
[17:09:59] <Avenger> actually, how you you tell it is slow?
[17:10:12] <fuzzie> print times to render a frame
[17:10:33] <fuzzie> huh, on my powerpc laptop it is using only 10% cpu
[17:10:41] <fuzzie> and it is perfect, no stuttery audio
[17:11:08] <Avenger> the audio stutter is not in all movies
[17:11:14] <Avenger> only in intro.bik
[17:11:16] <fuzzie> i am watching the introduction movie
[17:11:27] <fuzzie> no frames dropped..
[17:11:30] <Avenger> but it is buggy data
[17:11:43] <Avenger> the reported size is not the same as the decoded size
[17:11:55] <Avenger> if you are fine on ppc, then it is an endian problem
[17:12:07] <fuzzie> well, maybe i hit some bug on x86 which makes it worse
[17:12:13] <fuzzie> if i listen closely on ppc i can hear it is not perfect
[17:12:47] <fuzzie> which is to say, there is clicking
[17:16:15] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:25:20] --> wjp has joined #GemRb
[17:25:53] <-- Maighstir has left IRC ()
[17:42:56] --> Maighstir has joined #gemrb
[17:43:43] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:44:18] --> wjp has joined #GemRb
[17:45:20] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:45:45] <-- kettuz has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:46:37] --> kettuz has joined #GemRb
[17:54:58] --> anji has joined #GemRb
[17:55:11] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[17:55:41] --> wjp has joined #GemRb
[18:01:43] <-- Avenger has left IRC ("bye!")
[18:12:27] <-- Maighstir has left IRC ()
[18:25:23] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:25:57] <-- kettuz has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:26:16] --> kettuz has joined #GemRb
[18:29:08] --> anji has joined #GemRb
[18:31:15] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:31:19] --> tomprince has joined #gemrb
[18:33:31] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:33:32] --> anji has joined #GemRb
[18:40:04] --> wjp has joined #GemRb
[18:46:29] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:49:11] --> |Cable| has joined #gemrb
[18:49:53] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[18:53:56] --> wjp has joined #GemRb
[18:58:02] --> anji has joined #GemRb
[19:11:04] <-- anji has left IRC (kornbluth.freenode.net irc.freenode.net)
[19:12:49] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[19:18:07] --> wjp has joined #GemRb
[19:19:28] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[19:21:56] --> anji has joined #GemRb
[19:22:13] --> wjp has joined #GemRb
[19:39:14] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[19:42:41] --> wjp has joined #GemRb
[20:01:21] <-- tomprince has left IRC (Read error: 110 (Connection timed out))
[20:10:56] <-- kettuz has left IRC ("Leaving")
[20:38:51] --> tombhadAC has joined #gemrb
[21:16:46] <fuzzie> i forgot to ask avenger if he'd seen what wjp noted about the buggy audio
[21:40:29] <-- Gekz has left IRC (Read error: 60 (Operation timed out))
[21:57:45] --> Edheldil has joined #gemrb
[21:57:45] --- ChanServ gives channel operator status to Edheldil
[21:57:57] <Edheldil> hello
[21:59:50] <fuzzie> hi
[22:01:37] <-- |Cable| has left IRC (kornbluth.freenode.net irc.freenode.net)
[22:16:15] --> |Cable| has joined #GemRb
[22:20:03] <-- Edheldil has left #gemrb ("Ex-Chat")
[22:38:36] <-- lynxlynxlynx has left IRC (Remote closed the connection)
[22:43:54] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[22:47:20] --> wjp has joined #GemRb
[22:56:03] <-- |Cable| has left IRC (kornbluth.freenode.net irc.freenode.net)
[23:04:50] --> |Cable| has joined #GemRb
[23:16:03] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[23:16:47] --> wjp has joined #GemRb
[23:18:30] <-- wjp has left IRC (kornbluth.freenode.net irc.freenode.net)
[23:23:04] --> wjp has joined #GemRb
[23:26:04] --> Forgetful_Lion has joined #GemRB
[23:55:52] --> Avenger has joined #gemrb
[23:56:03] --- ChanServ gives channel operator status to Avenger
[23:56:38] <Avenger> fuzzie: when did wjp say anything about the buggy audio?
[23:57:19] --> tomprince has joined #gemrb
[23:58:22] <Avenger> well, i gotta sleep, tell me next time :)
[23:58:26] <-- Avenger has left IRC (Client Quit)