View Full Version : Lagarith 1.3.13 encodes all Magenta & Green
grannyGeek
27th June 2007, 03:35
I had been using Lagarith 1.3.9, worked great.
Installed 1.3.13 on my P4 3.2 dual-proc with XP-Pro.
It captures great, color is good.
But when I encode an existing YUY2 clip, whether captured/encoded with Lagarith itself, or with Huffyuv, the clip is totally in Green and Magenta. (like greyscale, only in RGB-type green and magenta.)
If I uninstall and put 1.3.9 back in, that one works fine with no color issues.
I would like to use the new version though, because it is fast enough to use for capture, and encoding speed seems improved as well.
I have a vague memory of seeing something a long time ago about this kind of color problem, but Google is not being kind.
Does anyone have advice?
stegre
27th June 2007, 17:42
Well, this is not a solution, anyway, but if if it's not too much hassle, I'd suggest a carefully controlled experiment: Make sure you have the new (.13) version installed, and then encode a file that would otherwise fail. Then re-install the old (.9) version, reboot, and see if you can play that same file back.
The point being to carefully determine if its an "encode only" or "decode only" problem. Since a normal re-install will change both the encoder and decoder, unless you're paying close attention or performing a careful experiment like above, you may get misled.
I just have a funny feeling it's actually a decode problem, though it's really just speculation. Either way, that'll cut the problem in half, so to speak.
grannyGeek
28th June 2007, 04:11
stegre, thank you for responding.
I'll try your suggestion tonight.
I'm in correspondence with the author now, and I sure wish I had seen your post before I sent him a pile of test results.
The most interesting result of my tests was that if I changed from 720x480 to 640x480 frame size in my capture, Lagarith 1.3.13 could encode to YUY2 with no problem, and playback with1.3.13 installed looked just fine.
Encoding 720x480 using v 1.3.9 for YUY2 was perfect.
Every attempt to encode to YV12 with v 1.3.13 crashed immediately.
Anyway, maybe the author can help me out.
I LOVE his work!
stegre
28th June 2007, 09:04
If you haven't already, you don't have to do the experiments now, as I was precisely able to precisely reproduce everything you described , including the weird difference when the size is changed and the fact that YV12 always crashes. I no longer think its decoder related; definitely in the encoder.
If "Ben" is having trouble reproducing the problems, I might even be able to debug or help debug problem - certainly the crash part, I would think, if he would just post updated source. The posted executable is up v1.3.13 whereas the latest source is only 1.3.11, And I've determined that you can upgrade as high as 1.3.12 with no problems. It's only the latest version that's buggy.
So if you talk to him, ask if he can post updated source...
stegre
28th June 2007, 23:35
Actually, on further inspection, the bug depends only on the size of the image being encoded (and the fact that the codec is set to YUY2).
And what it's doing is mapping YUY2 to RGB32. The luminance of pairs of adjacent pixels in th original, usually almost equal, become equal parts of R & G for a single resulting pixel, hence all the magenta. The "U" part of the color information is what you see as the green, and the "V" which gets thrown altogether out because one of every four bytes of RGB32 is always disposed of.
Anyway, seems if you choose image sizes that are, say exactly multiples of 32 in both height and width, it tends to work - might be useful as a workaround until the bugs get fixed, hopefully soon - it's pretty messed up...
>> Screenshots of the bug & workarounds (http://www.ftypes.com/unrelated/lagloss/)
grannyGeek
29th June 2007, 04:04
Thanks so much for confirming the problem, I am relieved that it wasnt' a hardware problem.
I emailed Ben, and told him of your kind offer to help debug.
Meanwhile, I'm going to try the 1.3.12 version until this one gets fixed. I still love the compression I get from Lagarith!
Thanks again --
granny
PS - I almost forgot.
thank YOU for GSpot, it has helped me solve a number of puzzles about my video clips. A very handy tool, ya done real good there !
stegre
29th June 2007, 07:29
thanks!
But back to Lagarith: At this point I bet he'll end up fixing it himself first. In re-reading my "offer" above, I certainly hope no one took it to mean that I might be able to debug it "better" or "faster" than him; that's an almost inconceivable notion. But as a programmer myself, I know how difficult & frustrating it is when you get a report of a bug and you can't reproduce it yourself - that's when some "outsider" might really be able to help, and I thought this problem was going to turn out to be "elusive".
But as of my very last post (and I've tried it on three different OS's now) I believe all you have to do to reproduce it is, say, for example, encode any 720 x 480 file - as you were. In fact anyone reading this thread might want to further confirm that - it only takes a few minutes.
I guess he had a few standard test files that just happened to be the "right" frame sizes, and I guess he didn't think anything he was modifying would change any behavior related to framesize. But if my theory is correct, and he reads this or you tell him what I said, he should be able to reproduce it in a second.
That said, I'd still love it if he posted his updated source :)
keys
30th June 2007, 12:19
grannyGeek how did you get into correspondence with the guy who does Lagarith? I myself seem to have a problem of a different nature and would like to contact him.
grannyGeek
2nd July 2007, 07:34
His email address is on the Lagarith homepage.
http://lags.leetcode.net/index.htm
And in the readme included in the zip download.
I won't type it here, not too sure about policy of email addresses in forum posts.
He tried to send me a fixed version, but my firewall deleted the attachment. I am impressed by the speed of his response to this bug report
:)
Thanks for the reply - sorry to have hijacked your thread as well. I didn't see the e-mail address on the homepage and I never thought to look in the zip file. I'll get in touch with him in due course and many thanks again.
squid_80
2nd July 2007, 16:39
The author is actually registered on this forum (Sir_Lagsalot) but I'm not sure if he ever checks in here.
Revgen
2nd July 2007, 18:00
His AIM is sLrlagsalot
Make sure to keep the uppercase L.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.