View Full Version : Custom Quantization Matrix Editor 1.0
LigH
31st March 2004, 23:25
So, my friends, here the long awaited:
http://www.ligh.de/software/CQME.gif
http://www.ligh.de/software/CQME_1.0c.zip
And be sure: This is no April joke.
And a little extra on top: http://www.ligh.de/software/qmatrix.zip
_
I'm not sure where it fits best - it is made for editing XviD or ffvfw matrices, but also able to import and export CCE and TMPGEnc matrices. So if a moderator thinks about a better place for it, feel free to move...
Teegedeck
1st April 2004, 15:30
Love it. :)
Soulhunter
1st April 2004, 18:49
Finally !!!
And the modulation idea is also included... :cool:
Much thanks for this nice tool !!!
Bye
Sharktooth
1st April 2004, 19:07
Nice tool.
Thanks a lot LigH!
LigH
1st April 2004, 19:08
Thanks for the flowers.
I already fixed and enhanced the documentation - when the first complaints appear, I'll include it in the next release (probably not before next week, anyway).
Soulhunter
1st April 2004, 19:49
Did I hear next release... :D
Could you maybe add a option to "exchange" the inter n' intra matrix values ???
Would come very handy !!!
Bye
LigH
1st April 2004, 20:40
Why not... maybe that way, in the "New" dialog:
( ) Keep
( ) Int.r.
__
But I meant: The next release = the one where I fixed probably missed bugs.
Soulhunter
1st April 2004, 21:13
Originally posted by LigH
Why not... maybe that way, in the "New" dialog:
( ) Keep
( ) Int.r.
Would be superb... :D
Originally posted by LigH
But I meant: The next release = the one where I fixed probably missed bugs. Yeah, no haste... I can wait !!!
Bye
mikeX
2nd April 2004, 23:27
cool tool :)
hate to be the one starting the complaints, but a resizeable window would be really nice :) (the thing barely fits on my 1024x desktop with an expanded taskbar...)
evade
3rd April 2004, 01:42
Very Cool. Thank you Ligh!
The export feature is great for us linux users. Mencoder with libavcodec uses comma-seperated matricies while XviD under linux calls for space seperated files. This is much easier than typing them out.
The only thing I could possibly want is the ability to export as seperate inter and intra matrices.
Audionut
3rd April 2004, 06:38
What's the go with the alternate scan order.
BTW, nice tool, thanks.
LigH
3rd April 2004, 07:13
@ Audionut:
If you want to know what the "alternate scan order" is good for, please search the web for guides about how to handle interlaced MPEG-2 video (I already mentioned that part in the updated documentation, which will be included in the next bugfix release - or at latest next week, even if there are no bugs to fix).
__
@ mikeX:
"a resizeable window would be really nice" - probably not; I would not know how to handle the content of a resizing window properly and fast; I even have problems with runtime generated controls (did you notice how the spin-edits appear one after another? Creating them at runtime was necessary to handle them as array).
__
@ evade:
"export as seperate inter and intra matrices" - no, they belong together; cut & paste shall be easy enough, IMHO.
__
@ all:
I'm not sure if I will be able to support Nero Recode2: To export just the matrices, I would have to handle (e.g. duplicate) whole preset branches in an XML file if someone would want to add a new one. This seems too heavy to me right now.
LigH, .....
thats exactly what I have been looking for a long time!
A Matrix Editor/Composer which follows also the mathematical rules: MORE THAN NICE!
Thank you very much!
Now I can tweak very easy matrixes for tv purposes where the right collumn values could be cutting a bit more as I almost do mpeg1/mpeg2 jobs for TV purposes. :-)
Only a little question, is it posible to implementate a "reordering" routine so someone who gots a nice Matrix Like some of the angels ones ... he can import that one into your Editor and by just hitting a Key like "Switch ZigZag/Alternate" he can export that again as Alternate Ordered version. .... How do you think about it?
Respect to your work.
Greets from Cologne
Inc.
Soulhunter
3rd April 2004, 19:39
Originally posted by LigH
"a resizeable window would be really nice" - probably not; I would not know how to handle the content of a resizing window properly and fast; I even have problems with runtime generated controls (did you notice how the spin-edits appear one after another? Creating them at runtime was necessary to handle them as array). Maybe a simple "show @ half size" (50%) option would do it... :)
Or you could cut-down the 3D preview some pixels !!!
Cropping it 20 pixels down would be enough to fit it for 1024* resolutions... ;)
Bye
LigH
3rd April 2004, 22:35
@ incredible:
That's nonsense - one matrix is made for progressive encoding, another is made for interlaced encoding.
If I read the coefficients of a good progressive matrix in zig-zag order and wrote them back in alternate order, I wouldn't get a useful interlaced matrix, but instead a "noise maker". :scared:
Neo Neko
3rd April 2004, 23:00
Question. How is this written? It seems a simple enough aplication that it could be written with WXwidgets so this software would work under linux, OSX, and BSD in general!! That and Support for resizing would be spiffy! 1024x768 here. ;)
LigH
3rd April 2004, 23:44
It was written with Delphi 7 and VCL only.
The maths behind "parametrical" calculation are very simple, yet flexible enough I hope.
Leak
4th April 2004, 00:01
Originally posted by Neo Neko
Question. How is this written? It seems a simple enough aplication that it could be written with WXwidgets so this software would work under linux, OSX, and BSD in general!! That and Support for resizing would be spiffy! 1024x768 here. ;)
Looking at the binary, I'd say it's Delphi - there goes the portability.
Still can't figure out why creating a resizeable layout shouldn't be possible in Delphi, but then again I've never used it...
Also, am I the only one that finds the flickering when you adjust one of the spin controls annoying? Double-buffering the diagrams would be nice...
np: cLOUDDEAD - Our Name (Ten)
LigH
4th April 2004, 05:22
I know that they flicker, yet I did not yet find the best way to use double-buffering. I want to overlay the bars over an existing background and therefore used a transparent metafile. But I have something in mind: I probably have to transform from a metafile to a bitmap in memory, then draw not the metafile but the final bitmap... I'll have made it next week.
And about the layout... One begs me to make it resizable. Another one begs me to draw the input grid in squared dimensions. Hey, gals - I do not even know how to create controls at runtime in a way that they do not appear one after another when a window is shown for the very first time. And then I shall make the layout resizable - I would have to handle event handlers for runtime-generated controls.
And then the question: Which kind of resizing? Do you prefer resizing the input spin grid, or the bar graph instead (I used a pre-made bitmap for the background - I would have to kick that in this case)? And which part of the interface shall stay squared if possible? Questions, questions - and no time to answer.
If I would work on a resizable interface, I would never finish a new and much more complete GordianKnot guide I'm editing since last year...
Maybe one day I port it to Java, if I stay jobless much longer. Oh yeah, a software developer, network and database administrator, and media specialist - and still unemployed; this is only possible in Germany. :angry: How many years did they tell us that so many IT specialists are missing - and now so many IT specialists are missing available jobs.
I found out a little bug (maybe).
If exporting to TmpgEnc.ini file the values will be like "reverse" .... don't know how to describe it in german.
You will see it if comparing to the same marix instead exported as text incl. white spaces.
LigH
4th April 2004, 10:47
Originally posted by incredible
If exporting to TmpgEnc.ini file the values will be like "reverse" .... don't know how to describe it in german.
Heck... mathematicians call that "transposed" (top right <=> bottom left). Indeed, that's a bug I'll have to fix!
And I saw on one PC that I'm not able to export to text (start CQME, open a matrix file, export, select "Text (CSV)"... no dialog appears, although it should "onClick"). Very strange. But the only W2K Domain Controller with user login I tested so far.
Originally posted by LigH
And I saw on one PC that I'm not able to export to text (start CQME, open a matrix file, export, select "Text (CSV)"... no dialog appears, although it should "onClick"). Very strange. But the only W2K Domain Controller with user login I tested so far.
If you export to "text" ... its the case that you have to change just a letter or so in the Name and the "ok" button then appears.
(In case if you refer to that issue).
I just PNed you about the Alternate (F2) Diagram and how it interprets the manual settet values ....
LigH
4th April 2004, 13:49
Oh, I shall know my own program... I thought the export file dialog appears when I click onto the radiobox, but it appears when I click on the OK button. So I will have to check the logic, if I shall enable the OK button when I click on the radiobox and the matrix name is not empty...
And yes, indeed, also the scan order is read transposed, stupid me.
bill_baroud
4th April 2004, 20:23
Originally posted by LigH
Oh yeah, a software developer, network and database administrator, and media specialist - and still unemployed; this is only possible in Germany. :angry: How many years did they tell us that so many IT specialists are missing - and now so many IT specialists are missing available jobs.
No no, not only in Germany ... same here (France) ;)
btw, really nice tool.
SoonUDie
5th April 2004, 07:09
Good program, it's very helpful.
I may have a bug though - it seems that the diagrams for the scanning process don't math the scanning order.
The image goes like this
1 2 6
3 5
4
etc.
While the program seems to create the "scan order" bars by reading like this:
1 3 4
2 5
6
LigH
5th April 2004, 13:15
That is just the effect what "transposed" means: x <=> y, mirrored at the main diagonal...
__
http://www.ligh.de/software/CQME_1.0a.zip contains most fixes, and the enhanced documentation.
SoonUDie
5th April 2004, 13:23
Yes, but you talked about that in relation to exporting / importing something.
When I hit F2 and get the scan graph, it looks like the values have been scanned incorrectly. Am I right, or are they supposed to be scanned transposed?
@SoonUdie
Yep, thats exactly the point I mailed to LigH via PN yesterday, .... and what he explained above by "transposed" x <=> y. This should be fixed now if I understand LigH right.
LigH ...., did you also fixed the export to TmpgEnc.ini as there the ordering seemed to be "transposed" but not when doing just exporting to text file.
LigH
5th April 2004, 13:58
Look into the documentation, "History": I fixed transposed matrixes in the TMPGEnc.ini export, and in the Scan order window.
At work Im working on a MAC which can't open the .chm file, ... thats why I should wait until this evening when I get home to my PC.
bond
5th April 2004, 14:22
ligh, did you try to set nerodigital matrices?
LigH
5th April 2004, 14:24
Fixed:
TMPGEnc.ini output wrote a transposed matrix (x <=> y)
Scan order used transposed matrix indices, too
Enabled OK button for "Text (CSV)" export immediately, when the matrix name already was not empty
Added:
Provided more file type masks in some dialogs
Enhanced the documentation
Changed:
Increased the saturation of the bar colors in the scan order window
__
Nero Digital is too complicated currently: I would have to copy a whole preset branch inside an XML file, just to create new matrices.
Morpheus_xx
8th April 2004, 20:01
Originally posted by LigH
Nero Digital is too complicated currently: I would have to copy a whole preset branch inside an XML file, just to create new matrices. [/B]
Maybe you could only overwrite the matrix-value in one profile. You could let the user select it before writing...
Neo Neko
8th April 2004, 23:07
Originally posted by Leak
Looking at the binary, I'd say it's Delphi - there goes the portability.
Not really. I have a copy of Kylix (http://www.borland.com/kylix/) sitting on my shelves right here. Which is IIRC the linux component of delphi. Mind you not everything is portable from delphi to kylix. Like 3rd party or software specific modules. But the base interface design and component code is. When you talk cross platform code C/C++ is king. But Pascal and Obective Pascal should not be counted out. ;)
Originally posted by Leak
Still can't figure out why creating a resizeable layout shouldn't be possible in Delphi, but then again I've never used it...
I never created anything usefull in delphi. But I did create resizable layouts. So on a basic level I can't understand it either. The only thing I can figure is that the matrix visualisation module may not have good support for it. Or that the entry boxes for the matrix would get hard to read and scrunched if re-aranged and re-sized.
lordadmira
13th April 2004, 00:36
Real mathematicians use Fortran!
:cool:
lordadmira
13th April 2004, 00:38
Ligh:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
Please try again later.
Apache/1.3.27 Server at www.ligh.de Port 80
TorgoGuy
13th April 2004, 02:42
Originally posted by Leak
Still can't figure out why creating a resizeable layout shouldn't be possible in Delphi, but then again I've never used it...
Resizable layouts are easily doable in Delphi. In fact, if you just want everything to scale you can have it happen automatically with some pretty standard free controls (i.e., not a single line of code required). If you only want to certain area to scale then you'll have to write a bit of code which sometime can require a bit of "futzing."
Also, am I the only one that finds the flickering when you adjust one of the spin controls annoying? Double-buffering the diagrams would be nice...
Also easy to fix (a few lines of code). If LigH doesn't know how to fix it, he can PM me and I'll help him out.
LigH
13th April 2004, 13:34
"Service Temporarily Unavailable":
I don't have manual access to my lend server. So please wait for my provider to fix it...
__
"Double buffering":
I'm working on it. Probably I'll have to render the metafile offscreen, and draw the created bitmap.
__
"Resizing the window layout":
I still don't know how it shall be done (not just technically, this would be at least possible - but most important: which controls and which control dimensions shall resize, which shall not; are there minimum sizes for some control dimensions; which shall keep their proportions relatively to which others...). I made all the controls so fixed, it would take much time to rewrite everything, especially if you would insist in resizing the bar graph panels.
lordadmira
13th April 2004, 18:39
It crashed as soon as I ran it.
Zurgriffsverletzung bei Adresse BFF7B9A6 in Modul 'KERNEL32.DLL'. Schreiben von Adresse 0000000.
Exception EReadError in Modul CQME.EXe bei 00001910B. Fehler beim Lesen von ZigZagImage.Picture.Data: Zurgriffsverletzung bei Adresse 0042264A in Modul CQME.EXE blah blah blah....
I have 98SE.
LigH
14th April 2004, 00:09
Oops - never ran it under Win98; I hope it is not related to using UPX as EXE packer. I'll try and see...
Could somebody mirror these files?
/Add: I posted some results (http://forum.doom9.org/showthread.php?s=&threadid=75828) of using different matrices with CCE. The 6of9 showes a rather large increase of filesize. I'm wondering if the matrices you guys used are specific to XVid? Also, the matrix that gives one of the best compressions in MPEG2 is one called Bach1. I also wonder what effect it might have on XVid encodes?
Bach1
8, 16, 19, 22, 26, 27, 29, 34
16, 16, 22, 24, 27, 29, 34, 37
19, 22, 26, 27, 29, 34, 34, 38
22, 22, 26, 27, 29, 34, 37, 40
22, 26, 27, 29, 32, 35, 40, 48
26, 27, 29, 32, 35, 40, 48, 58
26, 27, 29, 34, 38, 46, 56, 69
27, 29, 35, 38, 46, 56, 69, 83
16, 18, 20, 22, 24, 26, 28, 30
18, 20, 22, 24, 26, 28, 30, 32
20, 22, 24, 26, 28, 30, 32, 34
22, 24, 26, 30, 32, 32, 34, 36
24, 26, 28, 32, 34, 34, 36, 38
26, 28, 30, 32, 34, 36, 38, 40
28, 30, 32, 34, 36, 38, 42, 42
30, 32, 34, 36, 38, 40, 42, 44
I'll have to kill my ffdshow mirror - someone is downloading there like hell, and this kills my ratio somehow...
LigH, you did a terrific job on this utility. You shouldn't let these XVid guys keep it all a secret :). Love the way it handles TMPG and CCE. That used to be such a pain to do by hand.
One very trivial thing for the list, I noticed when exporting to CCE 2.62 + you have to put a space in dialog to activate the OK button. No problem doing it, but at first glance I thought this feature was not available, so it might confuse somebody just starting to use it.
Thanks again for doing such a professional job on a utility this whole community can use.
acrespo
7th May 2004, 21:56
I can't get matrix editor, link is broken. Can anybody send to acrespo@wasbr.com pleas?
Teegedeck
7th May 2004, 22:22
Originally posted by DDogg
The 6of9 showes a rather large increase of filesize. I'm wondering if the matrices you guys used are specific to XVid?
Hi DDogg,
SixOfNine's quality at quant=3 is better than, for example, HVS-best-picture at quant=2; thus you should do a compressiblity-test with it at quant=3 (a first pass with 6of9 should be done at quant=3, also). Didée's idea with 6of9 was to have smaller, more accurate quantization steps and I guess this is mainly responsible for it.
That aside, quant=2 with 6of9 is well possible for '3-CD' (=half a DVD-R) encodes and looks quite marvellous. With XviD, that is; I suppose with MPEG-2 quant=2 the result will become too large.
BTW, it would be great if a piece of software could show us, how a matrix 'scales' at different quantizers...(*cough*) Perhaps we would find out that Bach's matrix at quant=3 has the same effect as HVS-best at quant=2 or something like that. :D
Soulhunter
7th May 2004, 22:35
Hmm, 2Pass encoding (low/med/high bitrates) followed by a PSNR test would be nice... ;)
If nobody else wants to do this, I could do it the next weeks !!!
Thought about this...
Matrix lobby shootout (as usually) @ 1000/2000/3000 kbps
Suggestions for settings etc. ???
Bye
Teegedeck
7th May 2004, 23:27
Use every feature and the kitchen-sink, of course. :D
(Just trying to push those encoding times to the max, again...)
Soulhunter
7th May 2004, 23:44
Originally posted by Teegedeck
Just trying to push those encoding times to the max, again...
About 5 min. for each pass @ VHQ1 !!!
So, with 3 different bitrates about 25 minutes... :rolleyes:
Using 10 matrices would give estimated 6 hours (including setup n' PSNR tests) !!!
Bye
Soulhunter
8th May 2004, 00:20
Btw, after reading DDogg's test I did this here... :D
Source:
The Matrix - Lobby Shootout / 3:07 min. @ 25fps / 1024x576 pix. (Lanczos)
XviD v.1 RC4 (Koepis) / Quantizer2 / No B-VOP's / VHQ 1
Results:
Matrix: Fox Home Entertainment / Filesize: 365.252.608 Bytes
Matrix: SemiInsane / Filesize: 338.434.048 Bytes
Matrix: Selur - High datarate / Filesize: 261.918.720 Bytes
Matrix: Selur's Matrix / Filesize: 260.757.504 Bytes
Matrix: Didees SixOfNine Max=20 / Filesize: 236.367.872 Bytes
Matrix: Didees SixOfNine Max=24 / Filesize: 235.177.984 Bytes
Matrix: Acaila's / Filesize: 228.622.336 Bytes
Matrix: Andreas 78er / Filesize: 195.287.040 Bytes
Matrix: Soulhunters (v3) / Filesize: 194.543.616 Bytes
Matrix: Soulhunters (v4) / Filesize: 160.976.896 Bytes
Matrix: HVS Best Picture / Filesize: 159.289.344 Bytes
Matrix: Standard MPEG / Filesize: 150.237.184 Bytes
Matrix: HVS Better Picture / Filesize: 140.699.648 Bytes
Matrix: HVS Good Picture / Filesize: 136.632.320 Bytes
Matrix: Standard H.263 / Filesize: 130.297.856 Bytes
Matrix: Bach1 / Filesize: 128.780.288 Bytes (update)
Matrix: Jawor 1CD Matrix / Filesize: 121.341.952 Bytes (update)
Matrix: AVAMAT6 / Filesize: 106.104.832 Bytes
Matrix: Bulletproof's Heavy Compression / Filesize: 101.152.768 Bytes
Matrix: Ultimate Matrix / Filesize: 93.820.928 Bytes
Bye
Soulhunter, I think I am seeing some direct relationships as I had also done 6of9-20 and Acaila's. They fell in the same relationship you are showing. I wonder if you can add Bach1 (listed above) and Jawors' to you list. I think they will fall the same place in your list and mine. If so, we have a correlation (somewhat) of techniques between Mpeg4 and Mpeg2 which might prove to have some value.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.