Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th November 2008, 12:04   #561  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
Merlin7777:

yes, one export will be dvd, x264 will be for flash and one version will be HD, wmv will be web.

source is 1280x720, dvd will be anamorfic pal.
__________________
certain other member
smok3 is offline   Reply With Quote
Old 19th November 2008, 16:15   #562  |  Link
tom942
Registered User
 
Join Date: Aug 2005
Location: Santander, Spain
Posts: 178
In summary:

If I use CCE, Basic or SP(2), to do a backup of a DVD, doing all the steps by hand or using DVD-RB (for instance), I should use BT.601 because it is ŋsure? that CCE expects as input this color matrix, shouldnīt I?

If I use HC, what color matrix should I use?, which one HC expects, 601 or 709?. I have read the FAQ, and it says 709, but it needs confirmation...

Any advice? .

Last edited by tom942; 20th November 2008 at 00:55.
tom942 is offline   Reply With Quote
Old 19th November 2008, 20:28   #563  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
There was a separate thread with some useful analysis:
http://forum.doom9.org/showthread.ph...65#post1193065

As for what CCE expects, then according to its manual (SP), in some cases (when it needs conversion between YUV&RGB32) it uses BT601 coefficients. In case you feed YUY2 or any avi file that can be decompressed to YUY2, the manual doesn't mention any calculations of ColorMatrix' style.
Alex_ander is offline   Reply With Quote
Old 20th November 2008, 13:31   #564  |  Link
tom942
Registered User
 
Join Date: Aug 2005
Location: Santander, Spain
Posts: 178
@Alex_ander

I was re-reading the link (and some of the threads) that you gave me (this is the FAQ that I was talking about).

If I understood it right, when I'm doing a backup from DVD to DVD, using DGIndex, DVD-RB or other similar, there is no need to use ColorMatrix meanwhile I do not convert to RGB. I donīt talk of upconvert to HD or downconvert to SD.

CCE doesnīt expect a concrete color space. It doesnīt do internal color conversion while encoding.

The same applies to HC encoder, deesnīt it?

The doubt that I've got comes because in that link says HC expects 709, but reading Hanks's posts, he seems to say that HC doesnīt expect a concrete color space, is it right?

In the past I have used the line "Colormatrix (mode=rec.601->rec.709)" but if I undestand it right, I donīt need to use it anymore neither CCE nor HC, is it right?.

Last edited by tom942; 20th November 2008 at 16:40.
tom942 is offline   Reply With Quote
Old 20th November 2008, 19:20   #565  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
@smok3
You may get a kick out of this thread:
http://forum.doom9.org/showthread.ph...rmation+bt.601

However, here is what I believe is correct:

Quote:
Use Rec.601 for HCenc. Be sure to set the flag correctly when you encode it with HCenc.

For the x264 flash, since it will be SD, I believe you also use Rec.601.
For the HD x264, use Rec.709.

For WMV, I have no idea. My best suggestion would be to try both and see which one looks better. This approach can be applied to all of the above encoding situations.
@tom942
Yes, it's sounding like you are right. There should be no need for colormatrix when going from DVD to DVD. The trick with CCE is that it wants YUY2 input, but that is about it. DVD-RB should handle this all correctly for you.

And if you look at HCenc's documentation, I believe that it likes Rec.601 for SD and Rec.709 for HD. Again, refer to the above link that I posted for more information.
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo

Last edited by Adub; 20th November 2008 at 19:24.
Adub is offline   Reply With Quote
Old 20th November 2008, 20:31   #566  |  Link
tom942
Registered User
 
Join Date: Aug 2005
Location: Santander, Spain
Posts: 178
Thank you Merlin7777 .

I was reading that thread (that Alex_ander already point me before) and there was a point that confuse me:

Quote:
What encoders expect BT.709?
HCenc, any other encoder that by default flags the output stream as BT.709
(verification would be appreciated)
But then, after re-reading nearly all threads, I found tests that Hank done with his encoder and I can undestand that it doesnīt expect anything. It takes what you give him.

http://forum.doom9.org/showthread.ph...20#post1061520

As you said, I suppose that Hank is following the rule of 601 for SD and 709 for HD.

What I'm looking for is that I want do the correct steps with the apps. Later, if my DVD player do other things, it doesnīt mind me, because it wouldnīt be my fault.

Thank you for your time and answers .

P.S.: This was the table I used to follow. I found it here some time ago:

Quote:
Source_Colorimetry------------------Encoder-------------------Conversion_to_Use
Rec.709----------------------------CCE/HC/QuEnc-------------No Conversion or 'Rec.601 -> Rec.709 with hints=true'
Rec.601----------------------------CCE/HC/QuEnc-------------Rec.601->Rec.709 or 'Rec.601 -> Rec.709 with hints=true'
Rec.709----------------------------TMPGEnc------------------Rec.709 -> Rec.601 or 'Rec.709 -> Rec.601 with hints=true'
Rec.601----------------------------TMPGEnc------------------No Conversion or 'Rec.709 -> Rec.601 with hints=true'
As you can see, it was the opposite .

Last edited by tom942; 20th November 2008 at 20:35. Reason: Add the table
tom942 is offline   Reply With Quote
Old 20th November 2008, 20:57   #567  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Quote:
Rec.709----------------------------CCE/HC/QuEnc-------------No Conversion or 'Rec.601 -> Rec.709 with hints=true'
That table seems screwed. Why would one use the 601->709 conversion on a source that is already 709? It makes absolutely no sense.
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 20th November 2008, 21:23   #568  |  Link
tom942
Registered User
 
Join Date: Aug 2005
Location: Santander, Spain
Posts: 178
I donīt know.
It is a table that was in the forum before last year color matrix discussion. I found it when everybody assumed that DVD's MPEG2 was 709 due to the way that old versions of DGMPGDec report the absence of the colorimetry flag.
tom942 is offline   Reply With Quote
Old 20th November 2008, 21:54   #569  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
about luma range (and flash playback);

a. puting the whole 0-255 'RGB' range into yv12 -> x264 and then playing that back via flash seems wrong (the blacks are clipped? dunno...), doing the pc->tv conversion before will give more acceptable results (if little washed out)

about DVD;

b. i fed hcenc with squashed range (16-235) and again it seems a bit washed out (with mpui or vlc), but more black would look wrong again as it seems

__________________
certain other member
smok3 is offline   Reply With Quote
Old 16th January 2009, 09:23   #570  |  Link
fano
Registered User
 
Join Date: Feb 2006
Posts: 41
I'm having some problem resing a 632*264 video to 1920*108p and using colormatrix to restore the right colors.
I see a little band on the right part of the image: it seems as a repetition of a part of image.

In this screenshot you can see clearly what is the problem:


This the avisinth script that I'm using:

Code:
setMtmode(2)
ColorMatrix(mode="Rec.601->Rec.709")
ffdshow_setDAR(ffdshow_dar_x, ffdshow_dar_y)
MT("hqdn3d(2)", threads=4)
DisposeAxis(1920, 1080, ffdshow_dar_x, ffdshow_dar_y)
MT("Spline16Resize(da_w, last.height)", threads=4)
MT("Spline16Resize(last.width, da_h)", threads=4, splitvertical=true)
If I delete the colormatrix line or pospone it after resize the colored line disappear... but Colormatix after resize has not effect, right?

There is a known solution for this or maybe is a bug?

Thanks for your help,
fanoI
fano is offline   Reply With Quote
Old 17th January 2009, 07:33   #571  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
There's a bug in the mmx/sse2 routines causing it not to process the last (width&15) for sse2 and (width&7) for mmx worth of pixels for non mod 16 and non mod 8 widths respectively (you end up with whatever values happen to be at that those memory locations in the destination frame). A temporary fix is to set opt=0 to force the C routines. I'll put up a fixed version later tonight, it just needs one line changed.

Last edited by tritical; 17th January 2009 at 07:36.
tritical is offline   Reply With Quote
Old 18th January 2009, 14:35   #572  |  Link
fano
Registered User
 
Join Date: Feb 2006
Posts: 41
I've tried to add opt=0 and now works right!

Thanks for your help,
fanoI
fano is offline   Reply With Quote
Old 19th January 2009, 00:53   #573  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
I put up v2.4 on my website. Only change was fixing this little problem.
tritical is offline   Reply With Quote
Old 19th January 2009, 09:38   #574  |  Link
fano
Registered User
 
Join Date: Feb 2006
Posts: 41
Ok I'll try it tonight
fano is offline   Reply With Quote
Old 21st January 2009, 10:16   #575  |  Link
vucloutr
Registered User
 
vucloutr's Avatar
 
Join Date: Nov 2008
Posts: 64
hi, got a problem with colormatrix (using the latest 2.4).

Code:
LoadPlugin("..\DGDecode.dll")
DGDecode_MPEG2Source("file.d2v")

ColorMatrix(d2v="file.d2v")
Source is a MPEG2 HDTV .ts and I used DGIndex 1.5.3 for indexing.
With this script, I get an error message "ColorMatrix: d2v and filter frame counts do not match!"
Without the .d2v param and with info=3&hints=true i get strange colors in some frames.
normal.png (2.3 MB)
strange.png (2.1 MB)

any help is appreciated
vucloutr is offline   Reply With Quote
Old 24th January 2009, 21:45   #576  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
If you turn on debug output what source colorimetry does it detect for the good frames and the bad frames? That d2v error about frame count mismatch will only trigger if multiple colorimetrys are present. Could you post a sample?
tritical is offline   Reply With Quote
Old 25th January 2009, 15:20   #577  |  Link
vucloutr
Registered User
 
vucloutr's Avatar
 
Join Date: Nov 2008
Posts: 64
debugview log says:
Code:
00000173	14.75968838	[1248] ColorMatrix:1784:  frame 86432:  detected hint = 1 (Rec.709)	
00000174	14.75977802	[1248] ColorMatrix:2908:  frame 86432:  using YV12 Rec.709->Rec.601 conversion (SSE2).	
00000175	15.04918671	[1248] ColorMatrix:1784:  frame 86433:  detected hint = 4 (FCC)	
00000176	15.04928112	[1248] ColorMatrix:2908:  frame 86433:  using YV12 FCC->Rec.601 conversion (SSE2).
first is the "normal" frame and second is the "strange" one.

here's a sample (.7z ~45MB) (P4S5VV0RD: fw48czlqw94bgt g-f45tw-3.6mw.56w-v3mn)

Last edited by vucloutr; 25th January 2009 at 15:22.
vucloutr is offline   Reply With Quote
Old 25th January 2009, 21:53   #578  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
There were two bugs causing problems. First was that the d2v parsing was never updated for v16 DGIndex project files. This didn't effect colorimetry detection in v16 d2vs, but frame count detection was incorrect (only a problem if multiple colorimetrys were present). Second, there was a bug in the mmx/sse2 routines used for FCC<->Rec.601 conversions that caused incorrect U plane values. Both problems are fixed in v2.5 on my website.
tritical is offline   Reply With Quote
Old 25th January 2009, 23:11   #579  |  Link
vucloutr
Registered User
 
vucloutr's Avatar
 
Join Date: Nov 2008
Posts: 64
thanks!

edit: whoops ^^

Last edited by vucloutr; 25th January 2009 at 23:37.
vucloutr is offline   Reply With Quote
Old 22nd September 2009, 03:19   #580  |  Link
canuckerfan
Registered User
 
Join Date: Jul 2005
Posts: 317
if a conversion from 601 to 709 has been done. can it be reversed by just calling colormatrix again and changing the destination to 601? I realize it would just be best to go back and not do the conversion in the first place.
canuckerfan is offline   Reply With Quote
Reply

Tags
colormatrix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.