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.

Inc
3rd April 2004, 15:56
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.

Inc
4th April 2004, 09:32
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.

Inc
4th April 2004, 12:45
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?

Inc
5th April 2004, 13:28
@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.

Inc
5th April 2004, 14:10
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...

DDogg
7th May 2004, 15:03
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

LigH
7th May 2004, 21:36
I'll have to kill my ffdshow mirror - someone is downloading there like hell, and this kills my ratio somehow...

DDogg
7th May 2004, 21:53
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

DDogg
8th May 2004, 03:20
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.

acrespo
8th May 2004, 04:05
Soulhunter: I didn't understand the conclusions of your test. Bigger size means better quality?

I need the best matrix for quality encodes of anime series (20 minutes each episode), with 640x480 and 175 Mbytes size.

I tried your Soulhunter anime, Jawor and H.263. The best is H.263!!!

I set xvid RC4 to no B-VOP, trellis, chroma motion and optimizer, vhq 1.

Soulhunter
8th May 2004, 17:34
Originally posted by DDogg
I wonder if you can add Bach1 (listed above) and Jawors' to you list.Done... :D

Originally posted by acrespo
Soulhunter: I didn't understand the conclusions of your test. Bigger size means better quality?
Nah, it only shows the maximum quality you can reach !!!

But that does mean nothing... ;)


Originally posted by acrespo
I need the best matrix for quality encodes of anime series (20 minutes each episode), with 640x480 and 175 Bytes size.

I tried your Soulhunter anime, Jawor and H.263. The best is H.263!!!

I set XviD RC4 to no B-VOP, trellis, chroma motion and optimizer, VHQ 1.
Ok, that means around 1100kbps for the video (assuming 128kbps audio here) !!!

1st. Each matrix is case/source sensitive...

2nd. I made my matrix not for such low bitrates !!!

3rd. Try to use B-VOP's for this kind of encodes...


Bye

acrespo
8th May 2004, 20:46
Soulhunter: I did some tests with B-VOP (1/1/1) and the quality really improve with your matrix and jawor, better than H263. I am doing tests with VHQ4 now, but the time for 2nd pass is really long (2hs instead 45 min with vhq1).

LigH
9th May 2004, 20:35
@ acrespo:

My ffdshow / XviD mirror killed my bandwidth, someone downloaded from there like hell - I'll have to remove it; but unfortunately, I'm not able to access my server part at the moment, I'll have to contact my provider as soon as possible. Hopefully tomorrow it may be repaired...
__

@ DDogg:

Would you mind asking the right person for hosting it at doom9 Downloads? Or do you have something else in mind (e.g. moving the thread)? Please forgive me, but english is not my main language - I might miss some background thoughts hidden deeply in your answer...

Soulhunter
9th May 2004, 21:30
@DDogg

Sorry, my first update was wrong... :scared:

I took the results from my 1024x768 encodes I do atm !!!

Have them updated again to fix this... ;)


Bye

DDogg
10th May 2004, 02:51
LigH, i will sure ask Doom9 to consider hosting it. It is fine work and all encoders of all MPx persuasions can benefit from using it and having it easily available.

Soulhunter, thanks, so I was not going nuts after all! :-D

kilg0r3
10th May 2004, 14:35
hi, one thing I would really like to see is a matrix explorer/browser. Currently one has to load matrices one by one in order to see what is 'inside'.

I imagine /dream of a second window which lists all the matrix files that are the current directory. One of thise is highlighted and the corresponding matrix is displayed in the right 'editor window'. And, 'of course', if you push the 'down-arrow' the next file is highlihted and the editor window updates to the 'content of this next file. Just dreaming ... :rolleyes:

Soulhunter
11th May 2004, 00:05
Originally posted by Soulhunter
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 !!!Ok, its already done... (http://forum.doom9.org/showthread.php?s=&threadid=76021) ;)


Bye

kilg0r3
11th May 2004, 07:34
Based on Soulhunter's results, I'd say, we could use an 'increase all cells by one' button in the editor :)

mrbass
12th May 2004, 03:17
Originally posted by DDogg
[B]Could somebody mirror these files?


I mirrored them on the frontpage May 11th entry

DDogg
12th May 2004, 03:46
Thanks, mrbass. You always have such good stuff for download. LigH's CQME should be a perfect addition and may take some pressure off of his server.

unmei
25th July 2004, 16:36
http://www.hta-bi.bfh.ch/~seilf/doom9/CME-bork.png

At this point it used 151MB RAM. All other programs continued to work fine (its not like windows was out of memory, i have 768MB in this comp).
Maybe i should have restarted it before modifiying for the next matrix.. (it happened after one complete editing and a second time the intra, about in the middle if the second time editing the inter ..so not too long of a running time)

[edit]
The other popup says someting along the line of "matrix editor erlabut kein zeichnen", so i think something in the 3d views accumulates (does not get deleted when it redraws).

movmasty
18th October 2004, 01:34
(thanks in retard)

NOW.....

-option to hide the image panels, so one could keep visible more instances of the prog(and no need to resize)

-make visible "all files" in the save as window(many files have txt ext)

-save in binary or plain text format

-import and export single matrices, as copy and paste 64 values is not easy enough.

-copy one mat in the other

-automatic filling( :D ) , with these options
-fill in one number
-fill a number adding x to each step
-fill giving first(2 first for intra) and last, and the rest proportional
-fill one number in upper left half and another in down right
-fill one of 4 numbers in every angle(4 squares)
-fill one number adding x for each step in up left and y in down right
-fill one number adding w,x,y or z for each step in each of 4 squares

Leak
18th October 2004, 07:04
Originally posted by unmei
The other popup says someting along the line of "matrix editor erlabut kein zeichnen", so i think something in the 3d views accumulates (does not get deleted when it redraws).

Well, that's Windows 9x for you - CQME gobbled up all GDI resources (which there are only 64 kB of, no matter how much memory is installed in your computer - that's part of Windows 9x's Windows 3.11 legacy), which makes Windows freak out. Either upgrade to a newer (read: NT based) version of Windows (which have a much, much higher limit on handles), or start the "Systemressourcenanzeige" (it's in the Start menu under "Zubehoer") and watch it closely while using this program - when it starts getting red, quit immediately.

unmei
18th October 2004, 18:27
Leak i did not know windows XP pro is called win9x ..
this happened on 2 comps both with winXP pro :scared:

Leak
18th October 2004, 19:28
Originally posted by unmei
Leak i did not know windows XP pro is called win9x ..
this happened on 2 comps both with winXP pro :scared:

Ugh. I could've sworn that those messages could only be produced by Windows 9x, but since I have never really used CQME... maybe it's a 16-bit Windows program that's of course also susceptible to the same quirks...

If so, there ain't much you can do - but who writes such programs in this day and age anymore? :confused:

np: Patrick Wolf - A Boy Like Me (Children Of Mu (Disc 1))

lordadmira
18th October 2004, 19:47
The only difference between 9x and NT series is that under NT's each program has it's own GDI pool. Programs are just as susceptible to running out of resources under XP as they are with 95. It just takes longer. The app was probably made using some primitive controls that shouldn't be used in large numbers.

LA

Sharktooth
18th October 2004, 21:03
Well... i think i will release a beta version of QMFactory for xmas...
A cool opengl quantization matrix editor :)

LigH
19th October 2004, 08:12
Thank you, sharktooth: Because I don't have any time to apply changes to CQME; I really doubt there would ever be a next version...

Sharktooth
19th October 2004, 12:26
Oh well... im really busy too. But i will try to produce a decently stable version for xmas (that means i have to do a lot of work to check the compatibility with ATI,SIS,VIA/S3 and Matrox drivers).

Teegedeck
19th October 2004, 12:44
Well, it would also be nice to have the "SixOfNine max=20" matrix in the package properly renamed to just SixOfNine and the "SixOfNine max=24" matrix replaced with the corrected version attached below and properly renamed SixOfNine-HVS. :)

Errr... how do attach something in edit-mode?

Teegedeck
19th October 2004, 12:53
Not at all I guess. Here it is:

LigH
19th October 2004, 12:53
So did I.

http://www.ligh.de/software/qmatrix.zip
__

Attachments have to be released in this board. Uploads to someone's webspace appear immediately... ;)

Teegedeck
19th October 2004, 12:57
Ah. So indeed you did. :)

What a WOB from my side. So you are entirely not to blame if still some people call it ..."max=something" :D

LigH
19th October 2004, 13:40
:eek: Must have re-uploaded the backup instead of the updated archive... :mad:

Just added Soulhunter's and Sharktooth's matrices, too.

Sharktooth
19th October 2004, 14:05
:D

Soulhunter
19th October 2004, 14:25
Yay... :D

khmann
21st March 2005, 05:48
under 1.0a when I "show scan order", it looks to me like the graph is computed wrong - X + Y axis are swapped.

wonderful tool though, thankyou!

Prodater64
29th May 2005, 13:07
@LigH: Would it be possible to add an option to save in a text file, but with mencoder style, I mean only 2 rows, one for intra one for inter.

LigH
29th May 2005, 14:36
Good idea, easy to implement (in addition to some more fixes and extras):

http://www.ligh.de/software/CQME_1.0b.zip

Sharktooth
29th May 2005, 15:00
is the zig-zag scan order graph thing fixed?

LigH
29th May 2005, 15:11
The transposed matrix interpretation? - Since 1.0a, I thought?!

Sharktooth
29th May 2005, 15:13
try making a matrix with incremental coefficients following the zig zag order and look at the graph.
in 1.0a there was an error.

EDIT: and it's still there :)
http://www.webalice.it/f.corriga/misc/scanorder.png

LigH
29th May 2005, 16:17
Okay, finally...

And: The "Scan Order" window is updated while changing coefficients.

Silent update -- please re-download.

Prodater64
29th May 2005, 20:38
Thank you very much.
:D

Edited: Did you think in a command line option, to input a type of matrix and output another?

feedback
20th June 2005, 20:03
To avoid any potential problems would it be better to first uninstall Custom Quantization Matrix Editor 1.0a? Then install Custom Quantization Matrix Editor 1.0b.
Or should I just install Custom Quantization Matrix Editor 1.0b over Custom Quantization Matrix Editor 1.0a?

Regards,:)

LigH
20th June 2005, 20:05
There is no installation. Just unzip and overwrite.

Prodater64
20th June 2005, 20:13
Hi LigH, nice to see you here again.
Maybe you did miss my last question in my previous edited post?

LigH
20th June 2005, 20:50
Missed it, yes. -- No, this won't be possible easily. My target was an editor, not a converter.

Sharktooth
22nd June 2005, 19:47
With the latest version everytime i try to modify a coefficient i get this error:
http://www.webalice.it/f.corriga/misc/cqme_error.png
rolled back to 1.0a.

LigH
22nd June 2005, 19:55
Temporary workaround: Open the scan order window at least once.

I'll update soon...

Sharktooth
22nd June 2005, 20:07
could you also add a warning if the matrix is unsaved before closing the app? :D
and 4x4 matrices support or better JVT AVC matrices format... (but only if you want or have time...).

LigH
22nd June 2005, 21:05
- Access violation: fixed.
- Unsaved edit warning on close: Added.
- 4x4 matrices: No! (As already mentioned somewhere; my tool is not scalable enough.)
- Furthermore: Fixed a memory leak while updating the bar graphs.

* UPDATE: http://www.ligh.de/software/CQME_1.0c.zip *

Sharktooth
22nd June 2005, 21:22
thanks :)

feedback
4th July 2005, 23:02
No, this won't be possible easily. My target was an editor, not a converter.
I have used it in the past to convert .CQM and .XCM files to text files so I could import and use them in DVD Rebuilder PRO.
Very recently, at my request :D the Rebuilder Matrix Editor v.1.0.8 was updated to allow direct import of .XCM and .CQM Matrices.

Still, before this update that was the only way to Convert for me. So, don't sell the Custom Quantiztion Matrix Editor or yourself short as it is a versatile tool.

Thanks for it and keep up the good work.:)

P.S. I like trying Sharktooth, Soulhunter, and others matrices for mpeg2, some work in my standalone some don't.

edit: added P.S.

bloodem
7th September 2005, 12:27
could anyone please tell me what is the best quantization matrix for most DVDs when it comes to encoding with CCE ?

Sharktooth
7th September 2005, 13:09
:readrule:
12) How NOT to post on this forum:
...
Do not ask "what's best" because this question cannot be answered objectively. Each and everyone has their own view about what's best in a certain area. The best is what works best for you!

bloodem
7th September 2005, 14:08
ok, sorry... let me rephrase that... Untill recently I've been using the Standard matrix. But I want to try Bach1, do you guys believe it's worth it?

LigH
7th September 2005, 17:27
Worth what - "worth a try"? Always! You can only win, at least experience.

The best way to get a confirmative answer is: Try it. Encode the same material with different matrices. Compare them. Then you'll discover which matrix is useful for a) which kind of material, and b) which kind of side parameters.

4 hours on one DVD-5 at full resolution will be nonsense, no matter which matrix you try - IMHO. ;)

bloodem
7th September 2005, 19:46
:rolleyes: my god... if you don't mind my saying so... your answers are so bizarre, ambiguous, vague, guys :) LigH, I understand your point but... I don't know... just give me something to work with here.... There are MANY QMs out there and I could be wasting my time with some which don`t offer a good quality. So basically I just want to know a list of *the best* (i know that "best" is in the eye of the beholder, but come on ! there must be one or two QMs out there which stand out as being better than others). I'm not trying to be a pro like you guys are, I just want a good picture quality for my DVDs. That's all. And no, LigH, I'm referring to a normal 2 hour - 2 hour and a half DVD...

Sharktooth
7th September 2005, 21:07
Ok, here's the Dr. House (http://www.fox.com/house/) answer: you're not a "pro" and never you will be. Change your attitude or use AutoGK.
Seriously, there isn't a "best" matrix. It all depends on various factors including:
target resolution, target bitrate, duration, source complexity, frames per second, compressibility, source type, interlaced encoding, etc...
So, as you can see the "best" cant be determined until YOU TRY to encode THAT MOVIE (or whatever) with different custom quantization matrices and YOU CHOOSE the one which looks best for you.

Shinigami-Sama
7th September 2005, 23:45
bad little newbie, asking for 'the best' is like asking for a kick in the sac around here
'always use this format
~~~
I'm looking for X(sharp,smooth,neutral.ect) picture so..
Is X QMC good for X content
-sample is optional
~~~
or better yet
:search: :readfaq: :readguid: :readrule:

bloodem
8th September 2005, 10:53
ok... so... I`m looking for a QM to compress a DVD with CCE 6 pass: DVD Details: PAL (25 FPS) progressive frame, 2.35:1 and I want a sharp picture. I sure hope I got it right this time... :(

Inc
8th September 2005, 12:19
@ Prodater

I saw your request on a matrix converter.
I think you got enough skills in VB to readout bytes from a given file and writing strings to a target textfile.

- open the source byte-format matrix file, the byteorder is 8x8+8x8
- read out the intra (8x8 bytes) and the inter ( directly followed by another 8x8 bytes).
- Convert the multiarray values of the intra and inter values to numerical strings.
- Build a string architecture in a txt target file using a format which is needed for the target encoder (tab-, or comma-, or whatever separated).

voila. That would be a simple xvid to txt matrix file converter. Same vice versa.

So a CLI syntax would be

matrixconverter.exe -i SourceMatrix.xcm -o TargetTxtMatrix.txt -f cce

where -f could be ...

-f tmpgenc
-f cce

-f space
-f tab
-f comma

Mucho exito.

Sharktooth
8th September 2005, 12:53
ok... so... I`m looking for a QM to compress a DVD with CCE 6 pass: DVD Details: PAL (25 FPS) progressive frame, 2.35:1 and I want a sharp picture. I sure hope I got it right this time... :(
No :rolleyes:
Duration? Motion (action, static, both...)? Source type (Anime, Toons, Film, Capture, B&W, "ye olde'n grainy" movie, Computer graphics...)? Amount of noise/grain (even the smallest dots...)? There are particular/unusual scenes (like big pannings, heavy camera dollies, flashes, frenetic scene changes, etc)?

bloodem
8th September 2005, 13:26
I`m referring to Indiana Jones and the Raiders of the Lost Ark (1981). Duration aprx: 1h 53m, it's kinda` grainy, there are big pannings and a lot of motion...

manono
8th September 2005, 14:06
Hi-

This is a tough forum, eh? I sure wouldn't use Bach1 for a movie backup. For low bitrate extras, maybe, but not the movie if you wanted to keep it as sharp and detailed as possible. My suggestion is to get your matrices off of commercial DVDs, and then plug the numbers into CCE. If you have one of the collections of matrices floating around, then the one called Fox Home Entertainment (comes with LigH's package, I believe), is about the best one in general use by the large DVD production companies. BUT, you can't just blindly use it every time. It depends on how much you're compressing, the "overhead" in the original DVD, if a similarly high bitrate matrix was used originally, as well as other factors already mentioned. I've made very few backups with that matrix, as the resulting average quant was just too high. So I usually use one that compresses a bit better.

Again, study and save the matrices used in your favorite commercial DVDs. Or get the Rockas Matrix Editor, which has a number of good ones included along with vague directions about when they can be used.

bloodem
8th September 2005, 14:40
well, indeed thanks for the pointers manono, you were very helpful... unlike others... :D

Inc
8th September 2005, 14:50
Related to matrixes in commercial DVD Streams: AFAIK "Restream" is able to a) parse out the source stream included matrix and (imho) b) to safe it.

Also do watch out as in these provided matrix packages are many matrixes purposed for line based TV Device output where especially the last columns are heavely filtered and not only straight diagonally proportional filtered from the lower right corner.

I`m referring to Indiana Jones and the Raiders of the Lost Ark (1981). Duration aprx: 1h 53m, it's kinda` grainy, there are big pannings and a lot of motion...
Where does that source come from?
From the Re-Mastering out of the Indy-BoxSet?

The Box Set edition doesnt seem to be grainy at all

http://mitglied.lycos.de/incredibleweb/dc30dvd.jpg

Sharktooth
8th September 2005, 14:57
well, indeed thanks for the pointers manono, you were very helpful... unlike others... :D
What was the meaning of the word "TRY" you didnt understand? However i wont suggest to use the same matrix as the source unless you use nearly the same bitrate as the source...
Also the mpeg 4 matrices may not be good for mpeg 2 encoding.

bloodem
8th September 2005, 15:22
yes, incredible, it's the boxset... Well, some parts aren`t grainy at all, but there are some dark areas where you can see grains... I've compressed it using fox home entertainment, at 4130 kbps and everything is fine, except for the fade in at the beginning of the movie, when the Paramount Logo appears, i can see some nasty macroblocks :( but the movie itself is just fine. what could be the cause?

manono
8th September 2005, 18:07
If you're using CCE 2.50, then there's not much you can do (except to maybe give a higher bitrate for that section manually), as it handles fade ins/outs poorly. If you have a more recent version, it has a box you can check to help with those difficult transitions. Also, I don't know how you set your max bitrate, but if you kept the DD 5.1 448 and the subs, you can set it for at least 9500. A lot of times setting it for 8 or 9000 doesn't always allow enough bits for the complex scenes.

Check the ave quant for your reencoded M2V in Bitrate Viewer. If it's too high (maybe more than 10 or so for that matrix), try a more compressible matrix. Here's another very good one in common use in commercial DVDs. It's what I find I'm able to use most often:

INTRA
08 08 09 11 13 13 14 17
08 08 11 12 13 14 17 18
09 11 13 13 14 17 17 19
11 11 13 13 14 17 18 20
11 13 13 14 16 17 20 24
13 13 14 16 17 20 24 29
13 13 14 17 19 23 28 34
13 14 17 19 23 28 34 41
NON-INTRA
08 08 09 09 10 10 11 11
08 09 09 10 10 11 11 12
09 09 10 10 11 11 12 12
09 10 10 11 11 12 13 13
10 10 11 11 12 13 13 14
10 11 11 12 13 13 14 15
11 11 12 13 13 14 15 15
11 12 12 13 14 15 15 16

In addition to getting the matrices from ReStream, as incredible mentioned, in the Options Tab of the latest versions of DGIndex is a box to check to get them in text form at the same time as making the D2V. However, neither your question (or my suggestions in response) are really XviD related.

Forgive me for pointing this out, but earlier in the thread, while you showed the willingness to improve your encodes by using better matrices (CCE's default Standard matrix is crap for DVD movie backups), you also showed that you hadn't done the study or experimentation necessary to gain understanding of their importance, or which ones to use under which circumstances. LigH said it politely, and Sharktooth more forcefully, but it had to be said.

LigH
8th September 2005, 19:15
Furthermore, I feel sad, that such a stuff is discussed in a thread about a specific application. The topic here should be details of this application, not philosophy about using matrices in general. If this part could probably be cut off?!

Prodater64
8th September 2005, 19:46
@ Prodater

I saw your request on a matrix converter.
I think you got enough skills in VB to readout bytes from a given file and writing strings to a target textfile....

Thanks, inc.

bloodem
8th September 2005, 22:21
manono, thanks so very very much for your reply... it was exactly what I needed. However, I still can't solve the problem with the fade in... I have CCE 2.70 and I can`t seem to find the box that should be checked

PS: I'm sorry for being off-topic guys, but I`m a newbie and this was a thread about QMs...

manono
9th September 2005, 04:32
Furthermore, I feel sad, that such a stuff is discussed in a thread about a specific application.

Yes, you're right, LigH. My fault, and I apologize for hijacking your thread.

I'll PM you, bloodem.

CirTap
22nd September 2005, 00:34
Furthermore, I feel sad, that such a stuff is discussed in a thread about a specific application. maybe a mod can demux this thread and re-encode the OT stuff in a separate stream.. err thread?
although there were interesting aspects :)

Oh, and I really like the app, btw.

CirTap

foomonger
24th November 2005, 16:05
It's clear to me that the differences induced by one's "favourite" matrix are often less than the differences one can visually perceive, and perceptually alter, due to one matrix or another being one's "favourite". Homebrew wine tastes better, if you are the brewer.

I swear that matrix that looks like Angelina Jolie sideways produces *excellent* results!

If you have time on your hands, you can take each individual source, cut out a few frames, encode it with a variety of mitrix, and then chose the sample best suited to the target media. Or else, the default is fine.

-fm

ps.. a really cool app! many thanks!

LigH
24th November 2005, 22:20
"Enough bitrate" is always the best way to achieve better quality - and if you have "more than enough bitrate", you should try HQ matrices.

PS: Thank you.

Kayaker
21st June 2006, 15:18
Just to report a simple and stupid bug.
Don't think you ever bother to fix it, but maybe you can add to the list of things to fix if you ever make another release.

If you go to Help / Documentation it tries to load the CQME.chm from the last directoy you load a matrix from.

Obviously if you load a matrix from another directory the chm won't be there and it gives Help not found.

Not that this matters at all for this nice tool of yours.

LigH
21st June 2006, 17:36
Thank you for that hint; sure, that would be a really small update. I even wonder if that depends on the OS version...

Kayaker
21st June 2006, 17:49
I don't think it depends on SO version.

but then... who knows...

I've tested it at home ( Win 2K advanced server ) and at work ( Win XP Professional ) with the same small bug.

XMEN3
24th October 2010, 19:36
anyone can upload somewhere this software.
tnx

Audionut
25th October 2010, 01:37
What's the matter with the links in the first post. They're working fine here.

XMEN3
25th October 2010, 12:28
What's the matter with the links in the first post. They're working fine here.
sorry..
I thought 1st release was needed for last to work...
1.0c link works

Thanks

LigH
25th October 2010, 14:27
Indeed; I once removed older files, only 1.0c is left.

j19861986
14th September 2011, 06:57
I want to share one modified with CQME (one from mine JT_IDCT_0.98.xcm in ffdshow tryouts project: Discussion & Development page 700 (http://forum.doom9.org/showthread.php?t=120465&page=700))...
Have looked at Professional cqm file... looks like it has similar quantizer quality... dunno if it a bit better or less better...
Try look at this matrix:
8,18,20,19,20,22,20,24
17,17,19,19,21,22,23,24
18,19,21,20,22,23,23,25
19,21,20,22,23,24,25,26
20,22,22,24,26,26,27,28
20,21,23,24,27,29,28,30
22,23,23,25,26,26,30,31
23,25,24,28,29,32,32,34

15,19,18,19,20,22,21,23
17,17,19,19,23,22,23,24
18,20,21,20,22,23,23,25
19,21,21,23,23,24,26,26
20,22,22,24,26,27,27,28
19,22,23,24,27,28,28,30
22,23,23,25,27,28,30,32
23,25,23,28,29,31,32,34

It works very well at flv videos and H.264 videos... (and named it 1.03)
Be sure to try that...
Thx (didn't know that there was CQME, improved my earlier matrix code 0.98)

LigH
14th September 2011, 08:20
As already mentioned before - CQME assumes that the Intra coefficient (0,0) = the top left one, used to quantize the average level of the whole block, is always 8. As long as I can't be certain that there are encoders which will respect any different value in this place, I don't feel like removing this restriction.

By the way: Linking to page numbers is not reliable. One user may have 10 posts per page, another may have 20 ... the linked Link (http://forum.doom9.org/showthread.php?p=1525993#post1525993) in the top right corner of each post is the useful one.

j19861986
14th September 2011, 11:17
One Helluva good matrix for AVC1 (H.264)
8,16,20,19,20,22,21,24
17,18,20,20,21,22,24,24
18,18,19,20,21,23,24,25
18,21,20,22,23,24,28,26
20,22,21,24,26,27,28,29
20,22,23,24,26,30,29,30
22,23,23,25,27,26,30,30
23,25,24,28,29,32,32,34

15,20,18,19,20,22,21,23
17,17,18,20,24,22,23,24
18,20,22,20,21,23,23,25
19,21,20,22,23,25,26,26
20,23,23,24,26,27,27,28
19,22,23,24,28,28,28,30
21,23,23,25,27,28,30,32
23,25,23,28,29,32,32,34

Test it

LigH
14th September 2011, 12:15
I see no sense in your posts. Please stop this matrix spamming.

j19861986
14th September 2011, 12:27
K, I will stop...

Midzuki
14th September 2011, 13:26
As long as I can't be certain that there are encoders which will respect any different value in this place,
I don't feel like removing this restriction.

Not a problem, since we can always use a plain-text/hexadecimal editor as a workaround ;) :D But seriously, the (in-)famous BDVD matrix has a big 16 :eek: for its (0,0) coefficient, and I think it was used with QuEnc / NuEnc / FreeEnc /whateverEnc :p . Anyway, and as I stated elsewhere (http://forum.doom9.org/showthread.php?p=1381010#post1381010), an intra-matrix with (0,0)=1 is most useful for MPEG still pictures :cool:

P.S.: and if I were you, I'd rather fix the minor bugs in the current .EXE, before adding any new "features" ;)