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 3rd June 2011, 23:27   #21  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
A VERY minor mod to InfoF.h, the Info.h companion for printing
formatted text, no real need to change it but here it is anyway.

These are the lines as they were:

Code:
	const unsigned char *se, *ss;			        // unsigned
	for(ss=(unsigned char*)s; *ss; ss=se) {		        // while, some to do
		int n;
		for(se=ss; n = *se, n>=' ' && n <= 223; ++se);	// Find end+1 of printable
		int len = se - ss;				// Len of printable
		if (len) {					// Some to print
			DrawStringPlanar(dst,x,y,(const char*)ss,len);
And here is the entire mod:
Code:
void  __stdcall DrawFStringPlanar(PVideoFrame &dst,int x,int y,const char *s,bool pix = true)
{ // Draw formatted string at pixel or character coords, pix == false = character coords
	if(pix == false) {x *= 10;	y *= 20;}		// To Chars
	int in_x = x;						// REM x for '\r'
	const unsigned char *se=(unsigned char*)s;	        // unsigned
	while(*se) {						// while, some to do
		int n;
		for(s=(char*)se; n = *se, n>=' ' && n <= 223; ++se);	// Find end+1 of printable
		int len = (char*)se - s;			// Len of printable
		if (len) {					// Some to print
			DrawStringPlanar(dst,x,y,s,len);	// do the biz
			x += len * 10;				// update x coord
		} else {				        // Ctrl code OR nonsense;
			if(n == '\n') {
				x = 0; y+=20;			// Newline, down 1, LHS
			} else if (n == '\r') {
				x = in_x; y +=20;		// Newline Special, Down 1, orig x coord
			} else if(n == '\b') {
				x -= 10;			// Backward Space
			} else if (n == '\f') {
				x += 10;			// Forward Space
			} else if (n == '\t') {
				x+= ((4*10)-(x%(4*10)));	// H-Tab (step 4)
			}
			++se;	// skip ctrl code (and unknowns, outer loop detects nul sentinel)
		}
	}
}

void  __stdcall DrawFStrPlanar(PVideoFrame &dst,int x,int y,const char *s)
{	// Formatted Print @ character coords
	DrawFStringPlanar(dst,x,y,s,false);
}
The mod just saves a bit of swapping about of pointers.
The above code is for the Planar rendering function only,
amend the other 3 also.

EDIT:- shall within minutes of this edit, add (above modified) "InfoF.H"
to the 1st post for those that might want to try the companion header that
allows formatted print at both pixel and character coords via the standard
Info.h, (of course no color control is possible). Just include the
InfoF.h header after Info.h and call the InfoF.h functions when
either character or formatted print is required.
__________________
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 June 2011 at 19:54. Reason: Adding Infoh.h to 1st post.
StainlessS is offline   Reply With Quote
Old 12th June 2011, 07:44   #22  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Is there any chance that a moderator could at some stage, approve the
2nd attachment in the first post, if there seems to be a problem, I could
always delete it, (or save me the bother and do it yourselves).
About 7 days waiting now. ta.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 12th June 2011, 12:05   #23  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
About 7 days waiting now. ta.
Done.
Wilbert is offline   Reply With Quote
Old 20th April 2013, 19:18   #24  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DDigitTest.dll & DDigitTest26.dll with source, update, see 1st post.

Complied for Avisynth v2.6.

YV411 looks pretty awful with color (as expected).
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 5th June 2013, 03:43   #25  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
v1.05, DDigitTest.dll & DDigitTest26.dll with source, update, see 1st post.

Complied for Avisynth v2.6.

Implemented additional 16 Greyscale print colors.
YV411, optionally prints only luma channel and ignores chroma. (looks better).
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 10th July 2013, 19:10   #26  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DDigit v1.06 with DDigitTest.dll and DDigitTest26.dll with source, update. See 1st post.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 30th March 2015, 16:34   #27  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DDigitTest (DDigit test dll) v2.6 dll recompiled with Avisynth Version 6 Header.
See 1st post.

No version number increment, uses same version No as DDigit (v1.06).

EDIT: A Few screens from DDigitTest (with a few Info.H screens)

DDigit MONOLITHIC Renderer at YV24
Names


One Pixel At a Time Col


Off Screen


One Pixel At a Time Mono


Color Codes


Vertical


One Pixel At a Time Diag


Full Character Set (Identical for Info.H)


Info.H Renderer Tests @ YV24 (with synthesized InfoF.H support)

Info.H Off Screen


Info.H One Pixel At a Time


Info.H One Pixel At a Time Diag


Info.H Control Codes


EDIT: Above images seem to be all broken, sorry.
EDIT: Fixed.
__________________
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 May 2018 at 11:11.
StainlessS is offline   Reply With Quote
Old 2nd January 2019, 18:14   #28  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
DDigit demo DDigitTest dll's for avs v2.58, v2.60/+, x86 and x64. Requires VS 2008 CPP Runtimes.
See 1st post.

EDIT: Cannot rename the thread title when thread reaches a certain age.
__________________
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; 2nd January 2019 at 20:52.
StainlessS is offline   Reply With Quote
Reply

Tags
plugin, sdk, text

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 21:38.


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