Quantcast Bitrates: CQmatic/Calcumatic Continued... - Page 3 - digitalFAQ.com Forums [Archives]
  #41  
06-22-2005, 11:12 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by Prodater64
@Kwag: Why you don't put things a little bit more easy for me, you already read that sources, isn't it?
Also I have not idea where to find out those Directshow calls.
The web is full of VB API call examples
(I wish I would have the same "ready-made-source-el-dorado" like you have as VB user/coder )

Look for accessing the dgdecode.dll in the forum.doom9.org. Doom9 had the same question related to c++ access BUT AFAIK Neuron even integrated Standard-calls for VB accessing into his dll.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #42  
06-22-2005, 06:16 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
I am taking a look at dgdecode sources, but what file I need to see in detail?
Reply With Quote
  #43  
06-22-2005, 07:48 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
I am taking a look at dgdecode sources, but what file I need to see in detail?
Here you go
The "very sloppy!!!" code below is in the file "vfapidec.cpp"

Code:
// Open function modified by Donald Graft as part of fix for dropped frames and random frame access.
int CMPEG2Decoder::Open(const char *path, DstFormat dstFormat)
{
	char buf[2048], *buf_p;

	Choose_Prediction(this->fastMC);

	m_dstFormat = dstFormat;
	char ID[80], PASS[80] = "DGIndexProjectFile08";
	DWORD i, j, size, code, type, tff, rff, film, ntsc, gop, top, bottom, mapping;
	int repeat_on, repeat_off, repeat_init;
	int vob_id, cell_id;
	__int64 position;
	int m, n;

	CMPEG2Decoder* out = this;

	out->VF_File = fopen(path, "r");
	if (fgets(ID, 79, out->VF_File)==NULL)
		return 0;
	if (strncmp(ID, PASS, 20))
		return 0;

	fscanf(out->VF_File, "%d", &File_Limit);
	i = File_Limit;
	while (i)
	{
		fscanf(out->VF_File, "%d ", &j);
		Infilename[File_Limit-i] = (char*)aligned_malloc(_MAX_PATH, 16);
		fgets(Infilename[File_Limit-i], j+1, out->VF_File);
		if ((Infile[File_Limit-i] = _open(Infilename[File_Limit-i], _O_RDONLY | _O_BINARY))==-1)
			return 0;
		i--;
	}

	fscanf(out->VF_File, "\nStream_Type=%d\n", &SystemStream_Flag);
	if ( SystemStream_Flag == 2 )
		fscanf(out->VF_File, "MPEG2_Transport_PID=%x,%x\n", &MPEG2_Transport_VideoPID,	&MPEG2_Transport_AudioPID);

	long nCurrentPos = ftell(out->VF_File);
	char szTempText[50];

	fscanf(out->VF_File, "iDCT_Algorithm=%d", &IDCT_Flag);
	fscanf(out->VF_File, "%s", szTempText);
	
	fseek(out->VF_File, nCurrentPos, SEEK_SET);

	fscanf(out->VF_File, "iDCT_Algorithm=%d (1:MMX 2:SSEMMX 3:FPU 4:REF 5:SSE2MMX)\n", &IDCT_Flag);

	switch (IDCT_Flag)
	{
		case IDCT_MMX:
			idctFunc = MMX_IDCT;
			break;

		case IDCT_SSEMMX:
			idctFunc = SSEMMX_IDCT;
			if (!cpu.ssemmx)
			{
				IDCT_Flag = IDCT_MMX;
				idctFunc = MMX_IDCT;
			}
			break;

		case IDCT_FPU:
			if (!fpuinit) 
			{
				Initialize_FPU_IDCT();
				fpuinit = true;
			}
			idctFunc = FPU_IDCT;
			break;

		case IDCT_REF:
			if (!refinit) 
			{
				Initialize_REF_IDCT();
				refinit = true;
			}
			idctFunc = REF_IDCT;
			break;

		case IDCT_SSE2MMX:
			idctFunc = SSE2MMX_IDCT;
			if (!cpu.sse2mmx)
			{
				IDCT_Flag = IDCT_SSEMMX;
				idctFunc = SSEMMX_IDCT;
				if (!cpu.ssemmx)
				{
					IDCT_Flag = IDCT_MMX;
					idctFunc = MMX_IDCT;
				}
			}
			break;
		
		case IDCT_SKALSSE:
			idctFunc = Skl_IDct16_Sparse_SSE; //Skl_IDct16_SSE;
			if (!cpu.ssemmx)
			{
				IDCT_Flag = IDCT_MMX;
				idctFunc = MMX_IDCT;
			}
			break;

		case IDCT_SIMPLEIDCT:
			idctFunc = simple_idct_mmx;
			if (!cpu.ssemmx)
			{
				IDCT_Flag = IDCT_MMX;
				idctFunc = MMX_IDCT;
			}
			break;
	}

	File_Flag = 0;
	_lseeki64(Infile[0], 0, SEEK_SET);
	Initialize_Buffer();

	do
	{
		if (Fault_Flag == OUT_OF_BITS) return 0;
		next_start_code();
		code = Get_Bits(32);
	}
	while (code!=SEQUENCE_HEADER_CODE);

	sequence_header();

	mb_width = (horizontal_size+15)/16;
	mb_height = progressive_sequence ? (vertical_size+15)/16 : 2*((vertical_size+31)/32);

	QP = (int*)aligned_malloc(sizeof(int)*mb_width*mb_height, 128);

	Coded_Picture_Width = 16 * mb_width;
	Coded_Picture_Height = 16 * mb_height;

	Chroma_Width = (chroma_format==CHROMA444) ? Coded_Picture_Width : Coded_Picture_Width>>1;
	Chroma_Height = (chroma_format!=CHROMA420) ? Coded_Picture_Height : Coded_Picture_Height>>1;

	block_count = ChromaFormat[chroma_format];

	for (i=0; i<8; i++)
	{
		p_block[i] = (short *)aligned_malloc(sizeof(short)*64 + 64, 128);
		block[i]   = (short *)((long)p_block[i] + 64 - (long)p_block[i]%64);
	}

	p_fTempArray = (void *)aligned_malloc(sizeof(float)*128 + 64, 128);
	fTempArray = (void *)((long)p_fTempArray + 64 - (long)p_fTempArray%64);

	for (i=0; i<3; i++)
	{
		if (i==0)
			size = Coded_Picture_Width * Coded_Picture_Height;
		else
			size = Chroma_Width * Chroma_Height;

		backward_reference_frame[i] = (unsigned char*)aligned_malloc(2*size+4096, 128);  //>>> cheap safety bump
		forward_reference_frame[i] = (unsigned char*)aligned_malloc(2*size+4096, 128);
		auxframe[i] = (unsigned char*)aligned_malloc(2*size+4096, 128);
	}

	fscanf(out->VF_File, "YUVRGB_Scale=%d (0:TVScale 1:PCScale)\n", &i);

	if (i)
	{
		RGB_Scale = 0x1000254310002543;
		RGB_Offset = 0x0010001000100010;
		RGB_CBU = 0x0000408D0000408D;
		RGB_CGX = 0xF377E5FCF377E5FC;
		RGB_CRV = 0x0000331300003313;
	}
	else
	{
		RGB_Scale = 0x1000200010002000;
		RGB_Offset = 0x0000000000000000;
		RGB_CBU = 0x000038B4000038B4;
		RGB_CGX = 0xF4FDE926F4FDE926;
		RGB_CRV = 0x00002CDD00002CDD;
	}

	fscanf(out->VF_File, "Luminance_Filter=%d,%d (Gamma, Offset)\n", &i, &j);
	i+=128;

	if (i==128 && j==0) Luminance_Flag = 0;
	else
	{
		Luminance_Flag = 1;
		LumGainMask = ((__int64)i<<48) + ((__int64)i<<32) + ((__int64)i<<16) + (__int64)i;
		LumOffsetMask = ((__int64)j<<48) + ((__int64)j<<32) + ((__int64)j<<16) + (__int64)j;

		nLumSize = Coded_Picture_Width * Coded_Picture_Height;

		// Luminance Gain on old DVD2AVI used to be set at 128 as default
		// But we use the new Luminance Filter, so 128 would equal 0
		i -= 128;

		InitializeLuminanceFilter(i, j);

		lum = (unsigned char*)aligned_malloc(Coded_Picture_Width * Coded_Picture_Height, 128);
	}

	fscanf(out->VF_File, "Clipping=%d,%d,%d,%d (ClipLeft, ClipRight, ClipTop, ClipBottom)\n", 
		   &Clip_Left, &Clip_Right, &Clip_Top, &Clip_Bottom);
	fscanf(out->VF_File, "Aspect_Ratio=%s\n", Aspect_Ratio);
	fscanf(out->VF_File, "Picture_Size=%s\n", &m, &n);

	Clip_Width = Coded_Picture_Width;
	Clip_Height = Coded_Picture_Height;
	CLIP_AREA = HALF_CLIP_AREA = CLIP_STEP = 0;

	LUM_AREA = Coded_Picture_Width * Clip_Height;
	PROGRESSIVE_HEIGHT = (Coded_Picture_Height>>1) - 2;
	INTERLACED_HEIGHT = (Coded_Picture_Height>>2) - 2;
	HALF_WIDTH = Coded_Picture_Width>>1;
	HALF_WIDTH_D8 = (Coded_Picture_Width>>1) - 8;
	DOUBLE_WIDTH = Coded_Picture_Width<<1;

	// these don't seem to be used anywhere anymore  (tritical -- 1/05/2005)
	//u444 = (unsigned char*)aligned_malloc(Coded_Picture_Width * Coded_Picture_Height, 128);
	//v444 = (unsigned char*)aligned_malloc(Coded_Picture_Width * Coded_Picture_Height, 128);

	if (upConv && chroma_format == 1)
	{
		// these are labeled u422 and v422, but I'm only using them as a temporary
		// storage place for YV12 chroma before upsampling to 4:2:2 so that's why its
		// /4 and not /2  --  (tritical - 1/05/2005)
		u422 = (unsigned char*)aligned_malloc((Coded_Picture_Width * Coded_Picture_Height / 4)+2048, 128);
		v422 = (unsigned char*)aligned_malloc((Coded_Picture_Width * Coded_Picture_Height / 4)+2048, 128);
		auxFrame1 = create_YV12PICT(Coded_Picture_Height,Coded_Picture_Width,chroma_format+1);
		auxFrame2 = create_YV12PICT(Coded_Picture_Height,Coded_Picture_Width,chroma_format+1);
	}
	else
	{
		auxFrame1 = create_YV12PICT(Coded_Picture_Height,Coded_Picture_Width,chroma_format);
		auxFrame2 = create_YV12PICT(Coded_Picture_Height,Coded_Picture_Width,chroma_format);
	}
	saved_active = auxFrame1;
	saved_store = auxFrame2;

	fscanf(out->VF_File, "Field_Operation=%d (0:None 1:ForcedFILM 2:RawFrames)\n", &FO_Flag);

	fscanf(out->VF_File, "Frame_Rate=%d\n", &(out->VF_FrameRate));
	fscanf(out->VF_File, "Location=%d,%X,%d,%X\n", &i, &j, &i, &j);

	ntsc = film = top = bottom = gop = mapping = repeat_on = repeat_off = repeat_init = 0;
	HaveRFFs = false;

	fgets(buf, 2047, out->VF_File);
	buf_p = buf;
	while (true)
	{
		sscanf(buf_p, "%x", &type);
		if (type == 0xff)
			break;
		if (type & 0x800)	// GOP line start.
		{
			GOPList[gop] = reinterpret_cast<GOPLIST*>(calloc(1, sizeof(GOPLIST)));
			GOPList[gop]->number = film;
			while (*buf_p++ != ' ');
			sscanf(buf_p, "%d", &(GOPList[gop]->matrix));
			while (*buf_p++ != ' ');
			sscanf(buf_p, "%d", &(GOPList[gop]->file));
			while (*buf_p++ != ' ');
			position = _atoi64(buf_p);
			while (*buf_p++ != ' ');
			sscanf(buf_p, "%d %d", &vob_id, &cell_id);
			while (*buf_p++ != ' ');
			while (*buf_p++ != ' ');
			GOPList[gop]->position = position;
			GOPList[gop]->closed = (type & 0x400) ? 1 : 0;
			GOPList[gop]->progressive = (type & 0x200) ? 1 : 0;
			gop++;

			sscanf(buf_p, "%x", &type);
			tff = (type & 0x2) >> 1;
			if (FO_Flag == FO_RAW)
				rff = 0;
			else
				rff = type & 0x1;
		}
		else	// P, B frame
		{
			tff = (type & 0x2) >> 1;
			if (FO_Flag == FO_RAW)
				rff = 0;
			else
				rff = type & 0x1;
		}
		if (FO_Flag != FO_FILM && FO_Flag != FO_RAW && rff) HaveRFFs = true;

		if (!film)
		{
			if (tff)
				Field_Order = 1;
			else
				Field_Order = 0;
		}

		if (FO_Flag==FO_FILM)
		{
			if (rff)
				repeat_on++;
			else
				repeat_off++;

			if (repeat_init)
			{
				if (repeat_off-repeat_on == 5)
				{
					repeat_on = repeat_off = 0;
				}
				else
				{
					FrameList[mapping].top = FrameList[mapping].bottom = film;
					mapping ++;
				}

				if (repeat_on-repeat_off == 5)
				{
					repeat_on = repeat_off = 0;
					FrameList[mapping].top = FrameList[mapping].bottom = film;
					mapping ++;
				}
			}
			else
			{
				if (repeat_off-repeat_on == 3)
				{
					repeat_on = repeat_off = 0;
					repeat_init = 1;
				}
				else
				{
					FrameList[mapping].top = FrameList[mapping].bottom = film;
					mapping ++;
				}

				if (repeat_on-repeat_off == 3)
				{
					repeat_on = repeat_off = 0;
					repeat_init = 1;

					FrameList[mapping].top = FrameList[mapping].bottom = film;
					mapping ++;
				}
			}
		}
		else
		{
			if (top)
			{
				FrameList[ntsc].bottom = film;
				ntsc ++;
				FrameList[ntsc].top = film;
			}
			else if (bottom)
			{
				FrameList[ntsc].top = film;
				ntsc ++;
				FrameList[ntsc].bottom = film;
			}
			else
			{
				FrameList[ntsc].top = film;
				FrameList[ntsc].bottom = film;
				ntsc ++;
			}

			if (rff)
			{
				if (tff)
				{
					FrameList[ntsc].top = film;
					top = 1;
				}
				else
				{
					FrameList[ntsc].bottom = film;
					bottom = 1;
				}

				if (top && bottom)
				{
					top = bottom = 0;
					ntsc ++;
				}
			}
		}

		FrameList[film].pct = (unsigned char)((type & 0x30) >> 4);
		FrameList[film].pf = (unsigned char)((type & 0x40) >> 6);

		// Remember if this encoded frame requires the previous GOP to be decoded.
		// The previous GOP is required if DVD2AVI has marked it as such.
		if (!(type & 0x80))
			DirectAccess[film] = 0;
		else
			DirectAccess[film] = 1;

		film++;

		// Move to the next flags digit or get the next line.
		while (*buf_p != '\n' && *buf_p != ' ') buf_p++;
		if (*buf_p == '\n')
		{
			fgets(buf, 2047, out->VF_File);
			buf_p = buf;
		}
		else buf_p++;
	}
// dprintf("gop = %d, film = %d, ntsc = %d\n", gop, film, ntsc);
	out->VF_GOPLimit = gop;

	if (FO_Flag==FO_FILM)
	{
		while (FrameList[mapping-1].top >= film)
			mapping--;

		out->VF_FrameLimit = mapping;
	}
	else
	{
		while ((FrameList[ntsc-1].top >= film) || (FrameList[ntsc-1].bottom >= film))
			ntsc--;

		out->VF_FrameLimit = ntsc;
	}

	// Count the number of nondecodable frames at the start of the clip
	// (due to an open GOP). This will be used to avoid displaying these
	// bad frames.
	File_Flag = 0;
	_lseeki64(Infile[File_Flag], GOPList[0]->position, SEEK_SET);
	Initialize_Buffer();

	closed_gop = -1;
	BadStartingFrames = 0;
	while (true)
	{
		Get_Hdr();
		if (picture_coding_type == I_TYPE) break;
	}
	if (closed_gop != 1)
	{
		// Leading B frames are non-decodable.
		while (true)
		{
			Get_Hdr();
			if (picture_coding_type != B_TYPE) break;
			BadStartingFrames++;
		}
		// Frames pulled down from non-decodable frames are non-decodable.
		if (BadStartingFrames)
		{
			i = 0;
			while (true)
			{
				if ((FrameList[i].top > BadStartingFrames - 1) &&
					(FrameList[i].bottom > BadStartingFrames - 1))
					break;
				i++;
			}
			BadStartingFrames = i;
		}
	}
	return 1;
}
-kwag
Reply With Quote
  #44  
06-22-2005, 09:33 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks but I don't understand nothing. Forget it.

Now comming back to Calcumatic.
Could you add a mod to calculate proportional space related to complexity.
I was talking with Boulder a time ago and he did give me a spreadsheet that calculates space not only related to playing time, but also complexity evaluated for bitrate in a sample.
Im working on a calculator, but think that it would be easier for you, as you have a tool developped.

I want to show you some pics of my tool, then maybe you can have an idea of what I am talking about.

First, a pic of my VB6 form:



Now only time based mod:



And frame based mode (time is inherent, of course), but you need to do previous samples and know how many frames they have and how many Kbps also.



Also it has, as you can see, a section to calculate avg bitrate when you want to put several series chapters (almost same playing time) in one DVD.

Could you do something like this in a way easier than me (for me is really hard).
Thanks.
Reply With Quote
  #45  
06-22-2005, 10:13 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
Could you add a mod to calculate proportional space related to complexity.
I was talking with Boulder a time ago and he did give me a spreadsheet that calculates space not only related to playing time, but also complexity evaluated for bitrate in a sample.
What exactly do you mean by that
I mean, if you calculate a file size for X average bitrate, you will always get Y file size.
I don't understand what you mean by proportional complexity, because anyway you look at it, if you calculate complexity for a piece (segment) of a movie, what are you going to do with the rest of the movie

-kwag
Reply With Quote
  #46  
06-23-2005, 03:48 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi Karl ,
Actually I was going to do something similar to what Pro is refering to.
Take it that you have 2 movies.
They have different sizes and different average bitrare - the sources, I mean.
You could go and encode them as if they were the same size and the same bitrate, that is, splitting the available media size by 2.
But then you end up with 2 movies with different quality!
What Pro is suggesting is that we balance the figures so that both movies end up with the same visual quality, thus occupying different space on the target media.
That's what Boulder's spreadsheet is all about .
I was going to work on that on my own spreadsheet for HC encoder, but since I can't get HC to do some decent prediction I abandoned the whole thing...
Quote:
if you calculate complexity for a piece (segment) of a movie, what are you going to do with the rest of the movie
You just encode 5% of the 2 movies on the same CQ.
The difference in filesize of both samples and the movie duration will tell you how how much share both movies will take up on the target media.
Cheers
__________________
Rui
Reply With Quote
  #47  
06-23-2005, 03:54 AM
Anerboda Anerboda is offline
Free Member
 
Join Date: Mar 2003
Location: Denmark
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Why not just take the total amount of minutes of the two movies and plot that into calcumatic. That gives an average bitrate that will work for both movies, that's what I do and it haven't failed me yet...

-Anerboda
Reply With Quote
  #48  
06-23-2005, 03:59 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by Prodater64
I am taking a look at dgdecode sources, but what file I need to see in detail?
A version of DGdecode using stdcall wrappers for VB usage:
http://neuron2.net/dgmpgdec/DGDecode131b1.zip

Functions of the dll:

openMPEG2Source_SC
getFrame_SC
getRGBFrame_SC
closeVideo_SC

Code:
Private Declare Function dll_GetRGBFrame Lib "DGDecode.dll" Alias "_getRGBFrame_SC@4" (ByVal lngFrameNum As Long) As Long
Private Declare Function dll_OpenMPEG2 Lib "DGDecode.dll" Alias "_openMPEG2Source_SC@4" (ByVal strFileName As String) As Long
Private Declare Function dll_CloseMPEG2 Lib "DGDecode.dll" Alias "_closeVideo_SC@0" () As Long
Private Declare Function dll_GetFrame Lib "DGDecode.dll" Alias "_getFrame_SC@4" (ByVal lngFrameNum As Long) As Long
But These _getXXXX Functions do give pointers to Bitmaps in memory!
So no Info about the video architecture.

So do search for a dll-parsing utility in VB which shows you the accessable functions within a dll. Then do a search on the Web on that dll to see what parameters are needed as such dll-function-parsers only do show the functionnames but not all needed parameters.

Or you do access the AvisynthC.dll by using the Invoke command to send parameters for accessing Invoke/mpeg2sorce.


But the worse side on that is: 99.9% of the users wont have that dgdecode including the stdcall wrapper installed, means, you have to provide it within your package, means, GPL

So accessing the AvisynthC.dll will be independent from providing GPLlled Stuff in your Package.
Reply With Quote
  #49  
06-23-2005, 04:07 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Anerboda
That gives an average bitrate that will work for both movies
Wrong, further on I explain why.
Quote:
that's what I do and it haven't failed me yet...
It just hasn't failed you so far maybe because your sources have similar bitrates and types (high action/low action).
Since a high action movie ends up needing more bitrate than a low action movie, it is obvious that just splitting the target media size by 2 taking it proportionally to the movies durations is not enough.
In your calculations you need to take into account the source bitrate otherwise it will fail you.
Of course, if you just encode the first few frames (until you reach 5%) of both movies, you will probably get wrong figures.
That's where Andrej's Slicer function comes in.
It takes x% of your movie getting the frames from many different sectors of the movie.
I know Karl can do that easily.
Cheers
__________________
Rui
Reply With Quote
  #50  
06-23-2005, 05:39 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
@red: Thanks, I couldn't explain it so clearly.

@Inc: Thanks, now I see it easier to do.
Reply With Quote
  #51  
06-23-2005, 05:45 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Here is the speadsheet:

http://www.saunalahti.fi/sam08/kbps_eng.xls

http://www.kvcd.net/forum/viewtopic.php?p=117425#117425
Reply With Quote
  #52  
06-23-2005, 08:47 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
[quote="incredible"]
Quote:
Originally Posted by Prodater64
So accessing the AvisynthC.dll will be independent from providing GPLlled Stuff in your Package.
OT
Can somebody tell me if I should release my tool with LGPL and what it means, maybe Kwag, in spanish by PM, or any other people in english.
END OT
Reply With Quote
  #53  
06-23-2005, 08:57 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Im not shure if a direct accessing of a compiled .dll makes you automatically forced to release rights to the outside, means releasing the sources. But I guess so, AFAIK not only the calculating engine of FitCD_to_Moviestacker was an issue but als the accessing of the warpsharp.dll for avisynth previewing.
Reply With Quote
  #54  
06-23-2005, 09:25 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Anerboda
Why not just take the total amount of minutes of the two movies and plot that into calcumatic. That gives an average bitrate that will work for both movies, that's what I do and it haven't failed me yet...

-Anerboda
And that's exactly what I was going to say, because that's exactly what I do
Add up the total play time of all movies, feed it to CalcuMatic, and bingo!, use the average bitrate given.

-kwag
Reply With Quote
  #55  
06-23-2005, 09:37 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
Quote:
Originally Posted by Anerboda
That gives an average bitrate that will work for both movies
Wrong, further on I explain why.
Quote:
that's what I do and it haven't failed me yet...
It just hasn't failed you so far maybe because your sources have similar bitrates and types (high action/low action).
Hi Rui,

Err, am I missing something here
The fact is, that for an X length footage on a Y target media will always yield a specified average bitrate.
The longer the playtime, the lower the average bitrate for the same target. And vice versa.
This has nothing to do with the sources
Say you have 2, 3, 10 movie
The total average bitrate is what must be calculated for a particular target.
If one of those movies is a high action film, and you want to increase the bitrate, one of the other movies will have to give it's bitrate, in order to accomodate the total calculated average bitrate. If not, the size of the whole will exceed the target's size.

-kwag
Reply With Quote
  #56  
06-23-2005, 09:47 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by Anerboda
Why not just take the total amount of minutes of the two movies and plot that into calcumatic. That gives an average bitrate that will work for both movies, that's what I do and it haven't failed me yet...

-Anerboda
And that's exactly what I was going to say, because that's exactly what I do
Add up the total play time of all movies, feed it to CalcuMatic, and bingo!, use the average bitrate given.

-kwag
That only take in account times but not complexity.
Reply With Quote
  #57  
06-23-2005, 09:51 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by rds_correia
If one of those movies is a high action film, and you want to increase the bitrate, one of the other movies will have to give it's bitrate, in order to accomodate the total calculated average bitrate. If not, the size of the whole will exceed the target's size.
-kwag
An that is the point.
Analizing a sliced sample, and compare it in 2 films, applying spreadsheet maths and you will have different avg bitrate for each movie, with same visual quality result.
Reply With Quote
  #58  
06-23-2005, 10:52 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
@Karl
Let's try to put it simple and easy, even for me to try to explain.
I want to put 2 different movies on a DVD-5.
Movie A has 125 minutes while movie B has 97 minutes.
Movie A is a very high action movie and movie B is a low action movie.
Let's forget about if the movies are bright or dark, ok?
Both movies have are anamorphic PAL 720x576 with 1 AC3 5.1 track and both AC3 tracks are 384Kbit.
Now, I want both movies to look exactly as good as the other.
And I mean quality .
Movie A is nearly 29% bigger than movie B.
Let's say that a DVD-5 capacity is 4,375GB == 4480MB == 4.587.520KB.
Movie A audio:
((125*60)*(384000/8 ))/1024 = 351.563KB
Movie B audio:
((97*60)*(384000/8 ))/1024 = 272.813KB
That's 351.563+272.813 = 624.376KB
Then you have 4.587.520-624.376 = 3.963.144KB
If (125*100)/222 = 56,3 and (97*100)/222 = 43,7 then:
Movie A == 3.963.144 * 0,563 == 2.231.250KB
Movie B == 3.963.144 * 0,437 == 1.731.894KB
So, based on these figures for final encoded stream (I forgot to include calculation for the muxing...) you're telling me that both movies will end up with the same quality?
I don't agree with that Karl.
Or maybe am I missing something of what you're saying?
Cheers
__________________
Rui
Reply With Quote
  #59  
06-23-2005, 10:53 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
An that is the point.
Analizing a sliced sample, and compare it in 2 films, applying spreadsheet maths and you will have different avg bitrate for each movie, with same visual quality result.
If you have different average bitrates for each movie, the TOTAL average (sum) of the bitrate still must be the calculated for the target size.
If you gave more bitrate to the action movie, the other movies will have LESS bitrate, and that's a fact
Look at this in a simple way:
You have 2 movies, #1 is action and #2 is drama, each with the same average bitrate, targetting X final space.
Both will look identical, sort of, depending on complexity, and will fit exactly on X space.
Now, increase the average bitrate for movie #1 by 50%.
What are you going to do with movie #2
You HAVE to reduce the bitrate by 50% on movie #2, in order to maintain the same target size for the movies.
I hope this is clear now.

-kwag
Reply With Quote
  #60  
06-23-2005, 11:11 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
We want to distribut 2 movies in different space, not only related to movie time, but bitrate needs.
I can't explain myself better.
It would be better that you take a look to the spreadsheet and see the maths and how changes related to differents inputs.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Bitrates: CQMatic and CalcuMatic now Open Source! kwag Video Encoding and Conversion 18 07-12-2008 06:13 AM
Bitrates: Latest CQMatic/CalcuMatic epuleda Video Encoding and Conversion 2 05-25-2006 09:54 PM
Bitrates: CQMatic/CalcuMatic kwag Video Encoding and Conversion 715 01-04-2005 09:51 AM
Bitrates: CQMatic/Calcumatic? Blubear Video Encoding and Conversion 6 07-17-2004 08:53 PM
Bitrates: Success (CQMatic & CalcuMatic) jorel Video Encoding and Conversion 10 10-25-2003 08:00 PM

Thread Tools



 
All times are GMT -5. The time now is 12:35 PM  —  vBulletin © Jelsoft Enterprises Ltd