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 2nd January 2014, 17:20   #1  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
DGMVCSource

This is something that could be fun to work on. But does Intel Media SDK require Haswell with QuickSync and all that? I have only i7 980X Gulftown at this time.

If I made it I would release under suitable re-usable license, not like DGDecNV.

Seems now it requires also Win7 which makes thing difficult for me at this time. Maybe it's time for me to get into the current century.

EDIT: The current DGMVCSource version will always be linked here:

http://neuron2.net/mine.html

Last edited by Guest; 30th January 2014 at 20:34.
Guest is offline   Reply With Quote
Old 19th January 2014, 19:44   #2  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 20,975
Any chance DGMVCSource() will evolve at some point so that it will read SSIF files directly?
__________________
Help with development of new apps: Donations.
Website: www.jdobbs.net
jdobbs is offline   Reply With Quote
Old 19th January 2014, 20:24   #3  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by jdobbs View Post
Any chance DGMVCSource() will evolve at some point so that it will read SSIF files directly?
It's on Donald's to-do list.
Sharc is offline   Reply With Quote
Old 19th January 2014, 22:05   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I have completed the initial separate stream support. There is a small bug in that the final frame is corrupted. I am fixing that. In the meantime, can you please test this with your separated base/dependent streams and report any failures. The ZIP also now includes the separated streams corresponding to combined.264. I have tested successfully with these files only.

My combiner is rather elegant (only 160 lines of code), if I may say so , as you will see when I release the source code. But I may not yet have covered all the NALU handling rules that your files may require. So feedback will be appreciated. Thank you.

http://neuron2.net/misc/dgmvcsource_b4.zip

The syntax for specifying streams was modeled on pistacho's syntax. Hat tip to pistacho.

Last edited by Guest; 19th January 2014 at 23:10.
Guest is offline   Reply With Quote
Old 19th January 2014, 22:38   #5  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Quote:
Originally Posted by neuron2 View Post
I have completed the initial separate stream support. There is a small bug in that the final frame is corrupted. I am fixing that. In the meantime, can you please test this with your separated base/dependent streams and report any failures. The ZIP also now includes the separated streams corresponding to combined.264. I have tested successfully with these files only.

My combiner is rather elegant (only 160 lines of code), if I may say so , as you will see when I release the source code. But I may not yet have covered all the NALU handling rules that your files may require. So feedback will be appreciated. Thank you.

http://neuron2.net/misc/dgmvcsource_b4.zip
I have made a first test, it works very well for me
Thanks Donald !!

Edit : how can I test for NALU handling rules not covered ?
Nico8583 is offline   Reply With Quote
Old 19th January 2014, 23:02   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Nico8583 View Post
I have made a first test, it works very well for me.
Great. Thanks for your testing.

Quote:
Edit : how can I test for NALU handling rules not covered ?
Basically just test different source files. I pass along only a subset of NALU types to the decoder:

9
7/15
8
6
5/1/20

I don't know if there are any cases where I should pass along any other NALU types that may be in the source streams.
Guest is offline   Reply With Quote
Old 20th January 2014, 00:46   #7  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by neuron2 View Post
I have completed the initial separate stream support. There is a small bug in that the final frame is corrupted. I am fixing that. In the meantime, can you please test this with your separated base/dependent streams and report any failures. The ZIP also now includes the separated streams corresponding to combined.264. I have tested successfully with these files only.

My combiner is rather elegant (only 160 lines of code), if I may say so , as you will see when I release the source code. But I may not yet have covered all the NALU handling rules that your files may require. So feedback will be appreciated. Thank you.

http://neuron2.net/misc/dgmvcsource_b4.zip

The syntax for specifying streams was modeled on pistacho's syntax. Hat tip to pistacho.
I did few tests with large separated base/dependent files. No issues so far. However i truncated all my tests at about 1000 frames. Does this matter for NALU handling verification?

P.S.
Reported framerate is correct now for all views, thanks.

Last edited by Sharc; 20th January 2014 at 01:06.
Sharc is offline   Reply With Quote
Old 20th January 2014, 01:16   #8  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Sharc View Post
I did few tests with large separated base/dependent files. No issues so far. However i truncated all my tests at about 1000 frames. Does this matter for NALU handling verification?

P.S.
Reported framerate is correct now for all views, thanks.
Your truncated tests are fine. Thanks.

Glad you noticed the fps fix.
Guest is offline   Reply With Quote
Old 20th January 2014, 04:51   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Here is beta 5. It fixes the EOF problem in the separate stream mode. All the required functionality is now in place. (I don't see the point of Frank's frame caching as that is already provided free by Avisynth. Am I missing something?)

http://neuron2.net/misc/dgmvcsource_b5.zip

On to HW acceleration, unless anyone finds issues. If there are no issues I will make a source code release.

Last edited by Guest; 20th January 2014 at 04:54.
Guest is offline   Reply With Quote
Old 19th January 2014, 23:46   #10  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
What should be the result if NALU doesn't exist ? Black screen ? Artifact ? No dependent view ?
Nico8583 is offline   Reply With Quote
Old 20th January 2014, 00:03   #11  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Nico8583 View Post
What should be the result if NALU doesn't exist ? Black screen ? Artifact ? No dependent view ?
I don't anticipate any such problems, but I don't have perfect knowledge of all files in the wild and so can't fully discount the possibility. As and if they are reported, additional handling can be added. Just report any unexpected behavior and I'll try to fix it.
Guest is offline   Reply With Quote
Old 20th January 2014, 00:09   #12  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Quote:
Originally Posted by neuron2 View Post
I don't anticipate any such problems, but I don't have perfect knowledge of all files in the wild and so can't fully discount the possibility. As and if they are reported, additional handling can be added. Just report any unexpected behavior and I'll try to fix it.
OK, I'll try several movies and I'll report to you if I see any problem
Next step (when separated stream will be OK) : HW acceleration ?
Nico8583 is offline   Reply With Quote
Old 20th January 2014, 00:17   #13  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Nico8583 View Post
Next step (when separated stream will be OK) : HW acceleration ?
Seems logical to me.
Guest is offline   Reply With Quote
Old 20th January 2014, 00:20   #14  |  Link
Nico8583
Registered User
 
Join Date: Jan 2010
Location: France
Posts: 851
Quote:
Originally Posted by neuron2 View Post
Seems logical to me.
Very good, I'll receive my new notebook tomorrow, it owns an Intel CPU i5-4200U and Intel HD 4400 so I'll do some test
Nico8583 is offline   Reply With Quote
Old 20th January 2014, 00:43   #15  |  Link
jdobbs
Moderator
 
Join Date: Oct 2001
Posts: 20,975
Works great in my tests... I've done several files with no issues.
__________________
Help with development of new apps: Donations.
Website: www.jdobbs.net
jdobbs is offline   Reply With Quote
Old 20th January 2014, 06:11   #16  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
Everything seems fine. Using "Escape from Planet Earth" as my source material (a title I know has issues with some older decoder implementations) I was able to parse both a separate and combined stream test encode with no problem. Even the SAR issue I was experiencing with cropping (something I was about to bring to your attention!) has been fixed in B5.

Interestingly, the output is actually a lot smaller than what I'd gotten previously on the same title using SSIFSource/CoreAVCCodec (which suggests it had minor errors that weren't visible, resulting in worse compression but no obvious problem in playback). In fact, using identical x264 settings it went from a 2.25GB video stream to just 1.09GB. If that persists across multiple titles it could mean full OU encodes are in my future instead of half.
Thalyn is offline   Reply With Quote
Old 20th January 2014, 06:23   #17  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Thanks for the thorough test. I'm doubtful that over a GB reduction is due to correction of minor errors. I'd guess you must have had some other variable involved or actually had different settings.
Guest is offline   Reply With Quote
Old 20th January 2014, 06:36   #18  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I wanted to show you my elegant combiner. Calling only two simple functions, the following code implements a sort of combiner language and constitutes the NALU handling I was talking about. Its output feeds a circular buffer for the decoder (a well-known reader-writer implementation). Well, I think it's cool.

Code:
	// Loop through the access units in the source streams, combine them, and
	// write them to the output combined stream buffer.
	while (1)
	{
		status = get_next_au(base_buffer, base_fp);
		status |= get_next_au(dependent_buffer, dependent_fp);
		write_all(base_buffer, 9);
		write_all(base_buffer, 7);
		write_all(dependent_buffer, 15);
		write_all(base_buffer, 8);
		write_all(dependent_buffer, 8);
		write_all(base_buffer, 6);
		write_all(base_buffer, 5);
		write_all(base_buffer, 1);
		write_all(dependent_buffer, 6);
		write_all(dependent_buffer, 20);
		if (status == 1)
			break;
	}
The function write_all() does this: From the current access unit in the specified base/dependent stream buffer, copy all the NALUs contained in the access unit having the specified NALU type to the output combined stream buffer. It blocks if the buffer is full and is resumed by the reader when data is removed.

Last edited by Guest; 20th January 2014 at 07:12.
Guest is offline   Reply With Quote
Old 20th January 2014, 07:14   #19  |  Link
Thalyn
Registered User
 
Join Date: Dec 2011
Posts: 129
Seems I may have spoken too soon. :/

Around frame 1860 there's a pretty nasty glitch when using separate streams as input. It's persistent in both B4 and B5. I'm honestly not quite sure how I didn't spot it before (I must have skipped over it) but I think I may have been too fixated on that SAR problem (which is seemingly of my own doing, despite not having actually changed anything, since now it's gone on older versions). Using the MVCCombine output file (same input streams) shows no problem. Sorry!

I'd try to upload demonstration streams somewhere but my connection is not exactly suitable for that sort of thing at the moment. I'm having issues with data corruption on my downloads so I can only assume uploading is equally unreliable - it'd be impossible to tell what was the merging and what was my connection causing the problem.

I'm going to also have to check something else regarding the frame count, too. It could explain why the output file was so small. I have a suspicion it's only outputting half the frames I'm giving it for the command line, which somewhat makes sense because of the interleaving. Unfortunately that will take full transcodes to test and they're running at about 16fps, so I won't know for certain for at least an hour.
Thalyn is offline   Reply With Quote
Old 20th January 2014, 07:22   #20  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Thalyn View Post
Around frame 1860 there's a pretty nasty glitch when using separate streams as input.
What bluray is it? I can buy it.
Guest is offline   Reply With Quote
Reply

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 06:45.


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