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. |
5th March 2020, 15:01 | #61 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
OK, I think that maybe I did YV24 correct after all, If no bug reports prior to about Saturday, I'll release v1.50 without beta,
perhaps G2K4 finds it within his good self to add an x64 dll. I was absolutely knackered when I was doing this plug, up until yesterday I had hardly slept a single wink for about 10 days, for about 3 or 4 days I was shagged out, but after that it sort of became the norm and did not feel so much tired. One day last week I had 5 pints of ale, no effect at all, not a wink slept, but last night about 10 pints did the trick, finally got some sleep.
__________________
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 ??? |
5th March 2020, 17:14 | #62 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Will do. Just let me know where the modified source is.
__________________
Groucho's Avisynth Stuff |
5th March 2020, 19:18 | #63 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Modded source on my SendSpace below this post. [ SubtitleEx_a25_a26_x86_v1.50_20200305.zip ]
I've made Version resource v1.50, and added x64 code into AntiAliaser.cpp as so [switched via '_WIN64' define) Code:
// ssS: #ifdef _WIN64 unsigned __int64 tmp; __asm { // test if the whole area isn't just plain black mov edx, srcpitch zip contains Avs v2.60/+ x86 and v2.58 dll's. I'm more than happy for you to host in your repository.
__________________
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; 5th March 2020 at 19:58. |
5th March 2020, 19:40 | #64 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I keep getting 'bad gateway" on Sendspace. Can you upload to mediafire?
__________________
Groucho's Avisynth Stuff |
5th March 2020, 19:56 | #65 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I've re-uploaded to SendSpace [I had problems uploading the first time, real slow connection], and here on MediaFire:- http://www.mediafire.com/file/c4lmeh...00305.zip/file
__________________
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 ??? |
5th March 2020, 20:18 | #66 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
10th March 2020, 12:37 | #67 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
I finally had some time to build a 64 bit version with your modifications. All good except that the top y coords are now shifted, see here: Script: Code:
colorbars(width = 640, height = 480, pixel_type = "yv12").killaudio() converttorgb32() SubTitleEx(x=0, y=0, font="Arial", size=50, "First line (x=0, y=0)") Result with the first version I made:
__________________
Groucho's Avisynth Stuff |
|
10th March 2020, 15:03 | #68 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Code:
const BYTE* src2 = src - 8 * srcpitch - 1; unsigned int tmp = 0; for (int i = 0; i < 24; i++) { tmp |= *(unsigned int*)(src2); src2 += srcpitch; } tmp &= 0x00ffffff; |
|
10th March 2020, 18:13 | #69 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
WOW thanks P, smashing.
G2K4, Yeah, I decded to revert to original SubtitleEx method, before the Kai version. from post 58 Quote:
I'm happy to leave as the author intended.
__________________
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 March 2020 at 18:18. |
10th March 2020, 18:39 | #70 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
I forgot to mention, the x86 / x64 distinction in the version resource does not work. It always shows 'x86'. I had a quick look but could not find any error in the conditional logic in version.h. And yes, I did define "WIN32" and "_WIN64". Edit - With a temporary workaround the version in the x64 DLL is now OK. Here is the plugin.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 10th March 2020 at 18:52. |
|
10th March 2020, 19:35 | #71 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanks g, [no you cant have big G, thats Gavino's moniker].
I would have preferred if implemented with say optonal keypad base align arg, and forget x=-1 type stuff, maybe separate eg Vcent arg (for real centering, rather than print downwards from center), and where Align defined then x and y relative to alignment, else relative 0,0. [EDIT: And maybe separate args for justification, eg right aligned, left justified. I think RT_subtitle can do that but forgot how] The the command line for resource compiler whatsit on VS2008, Code:
/d "_WIN64" /d "_UNICODE" /d "UNICODE" /fo"x64\Debug/DDigitTest.res" Code:
#ifndef __COMPILER_H__ #define __COMPILER_H__ #ifdef UNICODE #undef UNICODE // Avoid default wide character stuff #endif #ifdef _UNICODE #undef _UNICODE // Avoid default wide character stuff #endif #ifdef MBCS #undef MBCS #endif #ifdef _MBCS #undef _MBCS #endif #define _CRT_SECURE_NO_WARNINGS // Compile for minimum supported system. MUST be defined before includes. // NEED to use SDK for updated headers, TK3 will give error messages/Warnings about Beta versions. #ifdef _WIN64 #define WINVER 0x0502 // XP 64 Bit or Server 2003 #define _WIN32_WINNT 0x0502 // XP 64 Bit or Server 2003 #define NTDDI_VERSION 0x05020000 // Server 2003 SP0 #define _WIN32_IE 0x0700 // 0x0700=IE 7 SP0 #else #define WINVER 0x0501 // XP 32 bit #define _WIN32_WINNT 0x0501 // XP 32 bit #define NTDDI_VERSION 0x05010300 // XP SP3 #define _WIN32_IE 0x0603 // 0x0603=IE 6 SP2 #endif When compile for v2.58, I also add AVISYNTH_PLUGIN_25 to Resource and CPP Preprocessor definitions. EDIT: Linker command line Code:
/OUT:"M:\SJ\SOURCE ARCHIVE\VC\AVISYNTH FILTERS\2K8x64\DDigitTest\x64\Release\DDigitTest_x64.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"x64\Release\DDigitTest_x64.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"M:\SJ\SOURCE ARCHIVE\VC\AVISYNTH FILTERS\2K8x64\DDigitTest\x64\Release\DDigitTest_x64.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X64 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Code:
/O2 /Ob2 /Oi /Ot /GL /D "_WIN64" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "DDIGITTEST_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MD /Gy /Fo"x64\Release\\" /Fd"x64\Release\vc90.pdb" /W3 /nologo /c /Zi /TP /errorReport:prompt EDIT: Does it work proper with that there squiggly writin' ?
__________________
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 March 2020 at 20:29. |
12th March 2020, 00:35 | #72 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
SubtitleEx() v1.51. See Mediafire in my sig below this post. In the HOSTED folder.
Also availabe for 30 days from my Sendspace, also below this post. Or direct link to MediaFire here:- http://www.mediafire.com/file/amek5s...00311.zip/file Dll's for avs v2.58, avs/+ x86 and x64. + source and project files for VS 2008. Requires CPP runtimes 2008. Removed ASM as suggested by Pinterf several posts ahead, no need for Intel compiler for x64 anymore.
__________________
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; 12th March 2020 at 00:46. |
15th March 2020, 19:16 | #73 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
StainlessS, thank you very much for taking the time to update this plugin! I've tried it out for a few things and all seems to be well .
I've updated the wiki also: http://avisynth.nl/index.php/SubtitleEx |
29th March 2020, 16:01 | #74 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
User fieliapm (not on-site since Oct 2018)
Has posted a few SubtitleEx() related script functions on Github:- https://github.com/fieliapm/avsi4comp Go up 1 directory to see other available fieliapm stuff. One of the available items is also posted in devs forum, (VideoInputSource - grab video frame from video capture card or webcam in real-time):- https://forum.doom9.org/showthread.php?t=170311 EDIT: Also here in Avs Usage (OP post only):- https://forum.doom9.org/showthread.p...deoInputSource I posted this some time ago in that thread (cant remember what I did though, was simple I think):-
__________________
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; 29th March 2020 at 16:56. |
23rd August 2021, 19:42 | #75 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Hi StainlessS,
I think I found a bug when anti-aliasing is disabled and the colorspace is YUV. The problem can be most easily seen when the input is YV16 but is is also noticeable with YV24 and YV12. With YV12 is seems the halo color disappears. Code:
ColorBars ConvertToYV16() SubtitleEx("TEST", x=240, y=240, effects="n", size=72, textcolor=$00FF0199, halocolor=$0047982F) |
23rd August 2021, 20:54 | #76 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Crap, I hated trying to fix that one.
If it aint been fixed after some reasonable amount of time, bug me again. (busy) EDIT: I dont think I touched anything like that, maybe bug in original too. Maybe can you check in original 32 bit, or maybe bug even in AVS itself [or windows], think maybe it uses AVS for text rendering incl anti-alias, I only touched print coords and the like, would not have ani idea about text rendering itself.
__________________
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; 23rd August 2021 at 21:15. |
23rd August 2021, 21:30 | #77 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
For anyone interested
Code:
#ColorBars blankclip # TOP Image in RGB SubtitleEx("TEST", x=240, y=320 -64, effects="n", size=72, textcolor=$00FF0199, halocolor=$0047982F) ConvertToYV16() # BOT image in YV16 SubtitleEx("TEST", x=240, y=320, effects="n", size=72, textcolor=$00FF0199, halocolor=$0047982F) EDIT: Code:
#ColorBars blankclip # TOP Image in RGB SubtitleEx("TEST", x=64, y=400 -180, effects="n", size=240, textcolor=$00FF0199, halocolor=$0047982F) ConvertToYV16(Matrix="rec601") # BOT image in YV16 SubtitleEx("TEST", x=64, y=400, effects="n", size=240, textcolor=$00FF0199, halocolor=$0047982F) Spline36Resize(Width*2,Height*2) RD, is the disappearing halo only because its on colorbars. Seem to be halo on blankclip so maybe just interference due to subsampling and colorbars colors. EDIT: Previous script, changed to colorbars. Top RGB32 Bot YV16 Halo seems to be sorta transparent, presume that its not supposed to be. Swapped Top YV16, Bot RGB32 Code:
ColorBars #blankclip SubtitleEx("TEST", x=64, y=400, effects="n", size=240, textcolor=$00FF0199, halocolor=$0047982F) # BOT Image RGB32 ConvertToYV16(Matrix="rec601") SubtitleEx("TEST", x=64, y=400 -180, effects="n", size=240, textcolor=$00FF0199, halocolor=$0047982F) # TOP Image in YV16 Spline36Resize(Width*2,Height*2) Sorta transparent halo there too, dont know if is supposed to be.
__________________
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; 23rd August 2021 at 22:05. |
23rd August 2021, 21:43 | #78 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
The original SubtitleEx by Basilik seems to be fine. I could only test in YV12 and YUY2. Although in RGB the results are different, in the case of anti-aliasing I would think the output of the original is more correct.
Code:
ColorBars ConvertToYUY2() o = SubtitleEx_o86_SubtitleEx("TEST", x=240, y=240, effects="n", size=72, textcolor=$00FF0199, halocolor=$0047982F) n = SubtitleEx_x86_SubtitleEx("TEST", x=240, y=240, effects="n", size=72, textcolor=$00FF0199, halocolor=$0047982F) Interleave(o,n) |
23rd August 2021, 22:14 | #79 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
OK, Ill take a look when i get time.
Maybe just Halo Alpha wrong somewhere.
__________________
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 ??? |
23rd August 2021, 22:18 | #80 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Thank you StainlessS. I was trying to make a script to allow overlaying the subtitles onto HBD colorspaces without having to convert the video to 8-bit but could not get the same output as using SubtitleEX by itself. I will wait
|
|
|