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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th September 2006, 03:02   #21  |  Link
Prettz
easily bamboozled user
 
Prettz's Avatar
 
Join Date: Sep 2002
Location: Atlanta
Posts: 373
Quote:
Originally Posted by squid_80 View Post
Are you sure it's not your YV12 codec?
I would never have imagined something could be wrong with that, but it seems you're right. A ConvertToRGB32() at the end fixes it. I first noticed it when the Crop came before some filters, so I assumed the chroma shifting was happening at the Crop.

The width was mod 4 (which I'm pretty sure has always been fine for raw YV12 before), but if I replace what I posted with Crop(4,58,0,-60,align=true), the chroma shifting isn't there anymore. What could possibly be wrong with my YV12 codec, and how might it have happened?


edit: Nevermind, the chroma shifting IS still there with Crop(4,58,0,-60,align=true), but the effect is much smaller. That doesn't make the problem not confusing as hell, though. Some kind of pitch error I guess. My memory might be bad, but I'm certain I've looked at scripts with mod 4 width before in VD without problems.

Last edited by Prettz; 20th September 2006 at 03:13.
Prettz is offline   Reply With Quote
Old 21st September 2006, 04:05   #22  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
@Prettz,

In VDub make sure Options/Preferences/AVI/"Directly Decode YCbCr (YUV) Sources" is turned on.

The YV12 to RGB converter in some DivX and XviD version is known to require mod 8 or even 16 width to work correctly.
IanB is offline   Reply With Quote
Old 21st September 2006, 15:48   #23  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
Hey language team, any chance of some activity in each of the translations before I make this RC-1 the real thing. Russian and English seem the only loved ones.
IanB is offline   Reply With Quote
Old 21st September 2006, 17:22   #24  |  Link
Kostarum Rex Persia
Banned
 
Join Date: May 2005
Location: Serbia
Posts: 565
I hope so. Translation on Serbian language would be very very nice.

Who is in the translation team?
Kostarum Rex Persia is offline   Reply With Quote
Old 21st September 2006, 18:48   #25  |  Link
Prettz
easily bamboozled user
 
Prettz's Avatar
 
Join Date: Sep 2002
Location: Atlanta
Posts: 373
Quote:
Originally Posted by IanB View Post
@Prettz,

In VDub make sure Options/Preferences/AVI/"Directly Decode YCbCr (YUV) Sources" is turned on.

The YV12 to RGB converter in some DivX and XviD version is known to require mod 8 or even 16 width to work correctly.
Thanks a lot. My VD version is so old it doesn't even have that option, so it's time to get up to date. I wonder what I did to make my VfW YV12 handling go nutty, though.

I know Xvid installs a YV12 codec; doesn't Avisynth install one as well?
Prettz is offline   Reply With Quote
Old 21st September 2006, 19:28   #26  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
IanB,
please notify me at last two days before final release,
I must syncronize the Russian with your latest changes
Fizick is offline   Reply With Quote
Old 21st September 2006, 19:31   #27  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Quote:
Originally Posted by Kostarum Rex Persia View Post
I hope so. Translation on Serbian language would be very very nice.

Who is in the translation team?
you can become this member
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 21st September 2006, 21:15   #28  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,337
Quote:
I know Xvid installs a YV12 codec; doesn't Avisynth install one as well?
XviD IS a codec. No, AviSynth doesn't install a codec, you should do that yourself.
Wilbert is offline   Reply With Quote
Old 22nd September 2006, 02:12   #29  |  Link
Kostarum Rex Persia
Banned
 
Join Date: May 2005
Location: Serbia
Posts: 565
I contacted IanB via PM, so I hope that I will become a member of translation team.
Kostarum Rex Persia is offline   Reply With Quote
Old 22nd September 2006, 02:47   #30  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,997
Quote:
Originally Posted by IanB View Post
Additions
...
DirectShowSource() accept audio streams of type WAVE_FORMAT_IEEE_FLOAT..
...
Maybe a typo?

DirectShowSource(), with ffdshow, accept audio streams of type WAVE_FORMAT_IEEE_FLOAT in v2.5.6. And also with header WAVE_FORMAT_EXTENSIBLE.

WavSource() accept audio streams of type WAVE_FORMAT_IEEE_FLOAT in 2.5.7

Btw, what is the problem to accept WAVE_FORMAT_EXTENSIBLE?
tebasuna51 is offline   Reply With Quote
Old 22nd September 2006, 06:23   #31  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
@tebasuna51,

Yes it should be "... accept raw audio streams ..."


I am not aware of problems accepting WAVE_FORMAT_EXTENSIBLE please elaborate. This stuff is difficult to test due to the lack of stable sources of data to test against, so simple examples of faults with a logfile are very helpfull.
IanB is offline   Reply With Quote
Old 23rd September 2006, 00:32   #32  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,997
Quote:
Originally Posted by IanB View Post
I am not aware of problems accepting WAVE_FORMAT_EXTENSIBLE please elaborate. This stuff is difficult to test due to the lack of stable sources of data to test against, so simple examples of faults with a logfile are very helpfull.
Maybe the problem is the interface (BeHappy), but the error message seems generated in vd_audio.cpp:
Code:
Starting job 16_in_ex.wav->16_in_ex_.wav
Error: BeHappy.AviSynthException: No compatible ACM codec to decode 0xFFFE audio stream to PCM.
   at BeHappy.AviSynthClip..ctor(String func, String arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
   at BeHappy.Encoder.encode()
When wFormatTag is 0xFFFE (WAVE_FORMAT_EXTENSIBLE) the SubType must be checked, WAVE_FORMAT_PCM or WAVE_FORMAT_IEEE_FLOAT are valid and the audio stream must be processed in consequence.

Also Bepipe don't work but the error message is less sophisticated:
Code:
bepipe --script "WavSource(^D:\16_in_ex.wav^)" > output.wav
...
ERROR: Can't find audio stream!
The sample wav used is 16_in_ex.wav
tebasuna51 is offline   Reply With Quote
Old 23rd September 2006, 11:11   #33  |  Link
Ebobtron
Errant Knight
 
Ebobtron's Avatar
 
Join Date: Oct 2004
Location: St Louis, M0 US
Posts: 364
@tebasuna51
you asked, "Btw, what is the problem to accept WAVE_FORMAT_EXTENSIBLE?"

Code:
0x0001   WAVE_FORMAT_PCM             PCM
0x0003   WAVE_FORMAT_IEEE_FLOAT      IEEE float
0x0006   WAVE_FORMAT_ALAW            8-bit ITU-T G.711 A-law
0x0007   WAVE_FORMAT_MULAW           8-bit ITU-T G.711 -law
0xFFFE   WAVE_FORMAT_EXTENSIBLE      Determined by SubFormat
Above is a list of "wFormatTag"s,

WAVE_FORMAT_IEEE_FLOAT, is a valid format outside of WAVE_FORMAT_EXTENSIBLE.

That is why it works with WavSource. When WAVE_FORMAT_EXTENSIBLE is used, the format tag is moved to another location in the header you incorrectly identified as the subtype. The SubFormat member of the WAVEFORMATEXTENSIBLE Structure is not available to AviSource.

WavSource, a subfuction or mode of AviSource, when presented with 0xFFFE as the format tag, goes looking for a decompressor (which it should).

As written and compiled AviSynth doesn't know what WAVE_FORMAT_EXTENSIBLE is unless it is looking though DirectShowSource.

Just took a quick glance at the latest Free PSDK and WAVE_FORMAT_EXTENSIBLE is not in the VFW (Video For Windows) documentation. But it is part of direct show and has been.

If it could be added to the AviSource functions in the future, is beyond my ability to guess. I am still trying to decide what a WAVE_FORMAT_EXTENSIBLE file header is suppose to look like. To me the format is a little vague, but I am pretty dumb.
Hope that helps.
Ebobtron is offline   Reply With Quote
Old 23rd September 2006, 11:57   #34  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
I can think of one problem: it's always possible to convert a wFormatTag to a Subformat GUID, but not the other way around. So I'm not sure how you'd go about handling a GUID which didn't convert easily to a corresponding wFormatTag, without some sort of look-up table for known types (for instance there's about half a dozen different GUID definitions for AC3, while most acm codecs which support AC3 via waveformatex use wFormatTag 0x2000).
squid_80 is offline   Reply With Quote
Old 23rd September 2006, 14:41   #35  |  Link
Ebobtron
Errant Knight
 
Ebobtron's Avatar
 
Join Date: Oct 2004
Location: St Louis, M0 US
Posts: 364
@squid_80,

The conversions would not be an issue.

The rest of your post shifts over to an apples verses oranges kind of the thing.

Just different uses of the same structure.
Ebobtron is offline   Reply With Quote
Old 23rd September 2006, 15:20   #36  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
My point was it's not just as simple as saying, "Oh it's a WAVE_FORMAT_EXTENSIBLE structure, I'll just convert the SubFormat GUID to a wFormatTag and go looking for an ACM codec to handle it..." since it's not always possible to get a wFormatTag from a GUID. In some cases it's possible, but not always.
squid_80 is offline   Reply With Quote
Old 23rd September 2006, 18:05   #37  |  Link
Ebobtron
Errant Knight
 
Ebobtron's Avatar
 
Join Date: Oct 2004
Location: St Louis, M0 US
Posts: 364
Sorry IanB,

Thought I could help, I was wrong. Think I'll stick to asking questions.

bye
Ebobtron is offline   Reply With Quote
Old 23rd September 2006, 18:53   #38  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,997
Quote:
Originally Posted by Ebobtron View Post
When WAVE_FORMAT_EXTENSIBLE is used, the format tag is moved to another location in the header you incorrectly identified as the subtype. The SubFormat member of the WAVEFORMATEXTENSIBLE Structure is not available to AviSource.
For me the subtype is the first two bytes (WORD) of the field SubFormat (GUID) and have a value 0x0001 (WAVE_FORMAT_PCM) for int samples and 0x0003 (WAVE_FORMAT_IEEE_FLOAT) for float samples.
Code:
KSDATAFORMAT_SUBTYPE_PCM          00000001-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_IEEE_FLOAT   00000003-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_DRM          00000009-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_ALAW         00000006-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_MULAW        00000007-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_ADPCM        00000002-0000-0010-8000-00aa00389b71
KSDATAFORMAT_SUBTYPE_MPEG         00000050-0000-0010-8000-00aa00389b71
We only need to check 0x0001 and 0x0003 not all possible GUID values.

But if SubFormat is unknown inside AviSource-WavSource we can do nothing. Thanks.

Edit: If we have access to wav header is really easy (if we plan reject anything than PCM or FLOAT) change wFormatTag for this first two bytes of SubFormat. Is used in Aften.

Last edited by tebasuna51; 23rd September 2006 at 19:04.
tebasuna51 is offline   Reply With Quote
Old 23rd September 2006, 20:42   #39  |  Link
Ebobtron
Errant Knight
 
Ebobtron's Avatar
 
Join Date: Oct 2004
Location: St Louis, M0 US
Posts: 364
@ tebasuna51,
I am, again, sorry. You may call a pig a cow, but I may not understand. Others will not either.

I didn't mean to suggest that you didn't know your way around the data types, especially the really big ones.

My suggestion is that you did not understand why AviSynth(WavSource()) would load WAVE_FORMAT_IEEE_FLOAT and not load WAVE_FORMAT_EXTENSIBLE.

Again I am assuming that your asking a question and you would like the answer.

Sorry I has incorrect.
done.
Ebobtron is offline   Reply With Quote
Old 24th September 2006, 22:57   #40  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
It seems, there is some bug in Avisynth smart cache impementation,
see MVTools thread
http://forum.doom9.org/showthread.ph...682#post867682
I discovered, that backward and forward vectors clips sometimes swapped after 12 frames.
Version 2.5.5 and v2.5.6beta3 (with not smart cache) works fine with MVDenoise.
I try to find workaround with some SetCacheHints,
but some problem still exists.
Also I remember similar problem with Restore24.
Fizick is offline   Reply With Quote
Reply

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 22:30.


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