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. |
11th January 2020, 13:09 | #5061 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Yes, I tried negative pitch, causes a crash, height is defined as UINT32.
edit: I can research if Direct2D can flip it faster.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 11th January 2020 at 13:26. |
11th January 2020, 15:42 | #5062 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
int x=0,y=0; int step =( vi.IsRGB24() ) ? 3 : 4; // RGB24 or RGB32 BYTE *dp = dst->GetWritePtr() + ((height-1 - y) * pitch) + (x*step); // ... dp -= pitch; // down 1 line
__________________
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 ??? |
|
11th January 2020, 19:52 | #5063 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Quote:
I tried negative height in source and target rect and everywhere else where a height is defined and it's not working. On StackOverflow it's unanswered: https://stackoverflow.com/questions/...textdrawbitmap
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|
12th January 2020, 08:18 | #5064 | Link |
Registered User
Join Date: Dec 2008
Posts: 1,968
|
Hello.
Now if I open the script in video players, I get the wrong colors in many situations. Is it possible to use the structure VIDEOINFOHEADER2 instead of VIDEOINFOHEADER? This will make it possible to use the dwControlFlags field. If you set AMCONTROL_COLORINFO_PRESENT, you can use DXVA_ExtendedFormat to specify additional parameters (nominal range, transfer matrix) for the video stream.
__________________
MPC-BE 1.7.0 and Nightly builds | VideoRenderer | ImageSource | ScriptSource | BassAudioSource |
12th January 2020, 14:47 | #5065 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
V0lt,
Quote:
Quote:
Code:
Colorbars(pixel_type="YV12") #BilinearResize(720,576) #converttoyv12(interlaced=true) #assumeTFF() separatefields() temporalsoften(4,4,8,10,mode=2) #fluxsmoothST(3,3) #weave() #assumefps(25) Code:
Colorbars(pixel_type="YV12") # 640x480 separatefields() # 640x240 temporalsoften(4,4,8,10,mode=2) EDIT: No Access Violation Code:
BlankClip(width=640,height=240,pixel_type="YV12") AssumeFieldBased temporalsoften(4,4,8,10,mode=2) Code:
BlankClip(pixel_type="YV12") # 640x480 separatefields() # 640x240 temporalsoften(4,4,8,10,mode=2) Code:
BlankClip(pixel_type="YV12") # 640x480 separatefields() # 640x240 AssumeFrameBased temporalsoften(4,4,8,10,mode=2)
__________________
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; 13th January 2020 at 12:52. |
||
12th January 2020, 16:09 | #5066 | Link |
Registered User
Join Date: Dec 2008
Posts: 1,968
|
Code:
ImageSource("1000px-SMPTE_Color_Bars_16x9.png") AddBorders(0, 3, 0, 2) ConvertToYUV420(matrix="Rec601") # or #ConvertToYUV420(matrix="Rec709") # or #ConvertToYUV420(matrix="Rec2020")
__________________
MPC-BE 1.7.0 and Nightly builds | VideoRenderer | ImageSource | ScriptSource | BassAudioSource |
12th January 2020, 16:25 | #5067 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Avisynth frameserves uncompressed audio and video. No metadata is passed . Also, the video player does not "see" what is in the script; it only "sees" the final output as uncompressed video How the video converts from YUV to RGB for display varies by the player, and renderer setup, sometimes drivers. Many assume Rec709 for height >576 |
|
12th January 2020, 16:54 | #5068 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
There is no colorspace matrix info embedded in AVI.
I guess defaults are player dependant (I dont ever bother with such stuff). Here looks like relevant for PotPlayer EDIT: PDR beat me.
__________________
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 ??? |
13th January 2020, 15:48 | #5069 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Quote:
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|
13th January 2020, 16:39 | #5070 | Link |
Registered User
Join Date: Dec 2008
Posts: 1,968
|
When AviSynth converts the color space from RGB to YUV, then another filter can find out which matrix was used for this?
__________________
MPC-BE 1.7.0 and Nightly builds | VideoRenderer | ImageSource | ScriptSource | BassAudioSource |
13th January 2020, 16:47 | #5071 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
You have to do it "manually" with something like colorbars or known colors. If you get back the original colors when you convert back to RGB (or very close, due to rounding errors , and RGB<=>YUV gamut errors, clipping) then it's the correct matrix This is true for any RGB<=>YUV conversion with any program, not just avisynth |
|
13th January 2020, 17:08 | #5072 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
It does... but it's pros/cons IMO . Easy to get burned if not careful
If file is tagged correctly, the source filters read and pass on various metadata as clip "props" or properites All manipulations "automatically" assume or take on those values, unless otherwise specified . e.g. if you resize or RGB preview ,everything is done correctly as per the metadata. e.g. if file was interlaced, tagged interlaced, then the resizing and conversion to RGB will be done interlaced aware If file was tagged correctly, great. Everything just works(TM) If it's not, trouble. e.g. if you get file from somewhere else. e.g handbrake often tags incorrectly . eg. progressive PAL DVD's are tagged interlaced. You end up having to double check everything. |
14th January 2020, 15:59 | #5073 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
Instead the intended way of doing it is manipulating how the input coordinates are mapped to the output coordinates by setting a transformation matrix on the render target using ID2D1RenderTarget::SetTransform(). D2D doesn't come with a vertical mirroring matrix convenience method (rotation around a point isn't the same thing), but you can just create your own 3x2 transform, like so: Code:
1 0 0 -1 0 0 Avisynth predates D2D by over a decade, so that's sort of a silly question. Avisynth directly supports VfW and GDI, which is what was available at the time. VS on the other hand only supports packed RGB32 as a backwards compatibility thing, where the thing it's backwards compatible with is mostly Avisynth. Last edited by TheFluff; 14th January 2020 at 16:22. |
|
14th January 2020, 18:09 | #5074 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
@TheFluff
Thanks for the hint, I will have to do some math research to understand it.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
14th January 2020, 18:57 | #5075 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Here's a quick cheat sheet, first hit on duckduckgo: https://code-industry.net/masterpdfe...mation-matrix/
e: It's not really necessary to confuse yourself with cross products in this case if you don't want to. Basically what you're doing here is just multiplying horizontal coordinates (X axis) by 1 (top left of the matrix) and vertical coordinates (Y axis) by -1 (middle right of the matrix). This is effectively the same thing as setting a negative height, so the topmost row of pixels in the input becomes the bottom row in the output - a vertical flip, in other words. Last edited by TheFluff; 14th January 2020 at 19:10. |
15th January 2020, 16:30 | #5076 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Temporalsoften bug is fixed. Changes are merged into main repository. |
|
15th January 2020, 23:19 | #5078 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Cheers P, you are a sweetie.
__________________
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 ??? |
28th January 2020, 14:02 | #5079 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Test build
The hope with the above build is that you don't see/feel anything different from the most recent builds from the master branch (plus the fixes pinterf mentioned above, re: temporalsoften). |
28th January 2020, 15:11 | #5080 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Btw. as I have changed the test version to 3.4.1 instead of 3.5, scripts that were parsing VersionString to get the build number at the exact 17th position no longer worked. Aside from this fact, is there any other reason why the 3rd part of the version (BUGFIX_VERSION) was not included in AVS_FULLVERSION? E.g. now it reports 3.4 even for 3.4.1? I've done the modification to include this 3rd part in it but real.finder noted me the problem, so I temporarily reversed the change. Anyway, I have included (not commited yet) a new IsVersionOrGreater function which is checking the current version against the given parameters (similar to a Windows API function) e.g. if IsVersionOrGreater(3, 4) or IsVersionOrGreater(3, 5, 8) and results in true if the current version is equal or greater than the required one in the parameters. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|