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. |
3rd December 2020, 08:00 | #741 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Pitch value for Y,U,V planes
In case of YUV data like YV12, YV16 I remember to have read that u and V pitches are guaranteed to be equal. In case of YV24 or YUV444 will all 3 planes have identical pitch value?
|
4th December 2020, 00:02 | #744 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Quote:
EDIT: Code:
ColorBars.KillAudio ConvertToYV12 PitchTortureTest info Return Last Function PitchTortureTest(clip c) { # IanB:- https://forum.doom9.org/showthread.php?p=1628159#post1628159 c A=SelectEvery(4, 0) B=SelectEvery(4, 1).AddBorders(0,0,8,0).Crop(0,0,-8,0) C=SelectEvery(4, 2).AddBorders(0,0,16,0).Crop(0,0,-16,0) D=SelectEvery(4, 3).AddBorders(2,0,22,0).Crop(2,0,-22,0) Interleave(A,B,C,D) }
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 4th December 2020 at 00:32. |
||
4th December 2020, 00:42 | #745 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
# Below all nonsense.
Further to above, Quote:
so maybe could argue that above quote should maybe read Quote:
Above maybe true (changable) on source frames only, if using NewVideoFrame(), then all frames same channel are equal, and if YV24 or YV444 then all frames, all channels, are equal. I think, maybe, perhaps, ??? I usually use SrcPitchU for V channel too, so maybe I amongst many am potentially wrong too. Discuss. EDIT: [Are PitchU and PitchV, internally the same variable ?] EDIT: Seems that in v2.58 header, VideoFrame there is a variable pitchUV, so single value for both[in v2.58]. EDIT: and in v2.60 Code:
class VideoFrame { volatile long refcount; VideoFrameBuffer* const vfb; const size_t offset; const int pitch, row_size, height; const size_t offsetU, offsetV; // U&V offsets are from top of picture. const int pitchUV, row_sizeUV, heightUV;
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 4th December 2020 at 01:53. |
||
4th December 2020, 01:52 | #746 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Got my answer to above daft post, can create separate clips where Y clip, U clip, V clip, all have changable pitch,
but in 'merging' the channels together into single clip - we create a NewVideoFrame which guarantees fixed pitch and copies source channels into the new fixed pitch clip. Doh! Code:
ColorBars.KillAudio ConvertToYV24 ShowFrameNumber K=Last.BlankClip(Length=1) Y=(Last).PitchTortureTest.ExtractY # differently changing pitch for each channel U=(K+Last).PitchTortureTest.Trim(1,0).ExtractU # V=(K+K+Last).PitchTortureTest.Trim(2,0).ExtractV # #Return Y.Info # Y, shows pitch change #Return U.Info # U as Y, shows pitch change #Return V.Info # V as Y, shows pitch change #Return YtoUV(U,V,Y).info # NO pitch change : Creates and copies into NewVideoFrame() where fixed pitch H=StackHorizontal(Y.Info,U.Info,V.Info) Return H.BlankClip.StackVertical(H).Info # Top shows final fixed return clip pitch, bot individual changing channel pitchs ######## Function PitchTortureTest(clip c) { # IanB:- https://forum.doom9.org/showthread.php?p=1628159#post1628159 c A=SelectEvery(4, 0) B=SelectEvery(4, 1).AddBorders(0,0,8,0).Crop(0,0,-8,0) C=SelectEvery(4, 2).AddBorders(0,0,16,0).Crop(0,0,-16,0) D=SelectEvery(4, 3).AddBorders(2,0,22,0).Crop(2,0,-22,0) Interleave(A,B,C,D) } # Top shows final fixed return clip pitch, bot individual changing channel pitchs [Y, U, V] NOTE, ExtractY/U/V does not produce fixed pitch clips, it must just drop unused channels from source and not produce NewVideoFrame(). In shown image @ bottom, Y has pitch of 704, as does U, but V has pitch of 640 [before combining with Stackhorizontal].
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 4th December 2020 at 02:49. |
8th December 2020, 12:57 | #748 | Link |
Registered User
Join Date: Dec 2005
Location: Denmark
Posts: 52
|
Crash using AverageB() on YUV422Pxx clips
Calling the internal runtime function AverageB() on a high-bit YUV422Pxx clip (within ScriptClip() or FrameEvaluate()) causes immediate crash of the calling app - either AvsPmod or VirtualDub2. The app just disappears without warning or error message. I assume it is an AviSynth+ bug.
I first encountered this on a ProRes 422 HQ clip, but the script below provides a minimal script below for this reproducible crash, using ColorBarsHD(). The related runtime functions AverageR() and AverageG() work fine on YUV422Pxx clips. AverageB() also works fine on YUV444Pxx clips, so this problems is specific to YUV422Pxx pixel formats. I have confirmed the crash on YUV422P10, YUV422P12, YUV422P16 and YUV422PS clips. I am using AviSynth+ 3.5 (r3043, master, x86_64), with both AvsPmod v2.6.5.0 (Windows (x86-64) and VirtualDub2 build 44282, on Win10 x64. Minimal reproducible script: Code:
# This script crashes AviSynth+ 3.5 (r3043) # ColorBarsHD ( 1024, 576, pixel_type="YUV444P10" ) # 10-bit ConvertToYUV422() # change clip to YUV422P10 # show the PixelType Subtitle("PixelType=" + last.PixelType, Align=9, Size=40) # show the average value of Blue on each frame (causes crash) ScriptClip(""" Subtitle("AverageB=" + String(AverageB()), align=7, size=40) """) Return last |
8th December 2020, 13:27 | #749 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
8th December 2020, 16:02 | #750 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
EDIT: use test6
Avisynth+ 3.6.2 test6 (20201210) Code:
20201210 3.6.2-test6 ----------------------- - AviSource: fix test5 regression which refused handling old formats like YV24 20201208 3.6.2-test5 ----------------------- - Resizers: throw error on too small dimensions vs. taps - Add ShowCRC32 debug filter. Parameters are the same as in ShowFrameNumber - Overlay: allow 4:1:1 input - Overlay: fix crash when mask is YUV411 and greymask=false - Overlay: may work quicker, most input/overlay/mask/output clip format conversions moved to filter constructor - RemoveAlphaPlane: do nothing on YUY2 instead of throwing an error message - AviSource: support non-printing characters in fourCC code: allow [number] style, e.g. G3[0][16] - AviSource: add Y410 (YUVA444P10) format support. Allow 'Y410' pixel_type hints. - AviSource: decode b64a, b48r, v210, P210, P010, P016, P216, v410, Y416, r210, R10k, v308, v408, Y410 fourCCs natively. - Fix: Average...: check for valid colorspace (e.g. no AverageB for a YUV clip) - Add: AverageA - New: Average...: allow YUY2, RGB24/32/48/64 inputs 20201112 3.6.2-test4 -------------------- - Fix: Overlay: Actual frame of a mask clip would be freed up too early in MT environment - Fix: ConvertBits to ignore dither parameter instead of throwing error, in a 8 to 8 bit case Last edited by pinterf; 10th December 2020 at 08:46. Reason: Replace broken version |
8th December 2020, 16:42 | #752 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
8th December 2020, 18:42 | #753 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thankyou P & G.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
8th December 2020, 18:49 | #754 | Link | |
Registered User
Join Date: Dec 2005
Location: Denmark
Posts: 52
|
[Solved] Crash using AverageB() on YUV422Pxx clips
Quote:
I will convert YUV to RGB [ConvertToPlanarRGB()] before using AverageR/G/B. |
|
9th December 2020, 19:41 | #756 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Parental & Guidance, or Propylene & Glycol (as opposed to V & G).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 11th December 2020 at 19:40. |
9th December 2020, 23:47 | #757 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 1,000
|
Quote:
__________________
Live and let live |
|
10th December 2020, 02:56 | #758 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Confirmed.
Worked OK in all + versions [prior to 3.6.2 test 5] in latest Groucho2004 Universal Avisynth Installer whotsit. Import() works as it should though, was quite a surprise to me when I originally found that AviSource loaded Avs scripts, so I'm no longer surprised any more
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 10th December 2020 at 02:59. |
10th December 2020, 07:30 | #759 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
|
|