Log in

View Full Version : DGMVCSource


Pages : 1 2 [3] 4 5 6 7 8 9 10 11

Guest
14th January 2014, 17:09
[Let's stay on topic please. This thread is about an MVC source filter. All discussion/speculation about further things has to wait for a new thread. Thank you.]

I've made some good progress. I totally stripped down the Intel sample to a "simple sample" that no longer requires ATL, dispenses with all the extra stuff not needed for AVC/MVC decode, replaces the CLI parsing with direct configuration (source filter won't have CLI), and combines everything into a single project, deleting all unneeded files. Of course, because I removed the ATL dependency I was able to move back to Win8 and build with Visual Studio 2013 Express. This opens the door for other Avisynth developers that don't like to drop $$$ for no good reason. I'll give the source code for the simple sample soon, but not right now, as I want to be the first to produce the open-source source filter. :p I plan to stay with Win8 as there is no reason to downgrade anymore.

Next step is to bring up and validate Avisynth on this Win8 machine and then begin developing the source filter based on the simple sample code I created.

Initially, the filter will accept only the combined MVC elementary stream, which you can make with eac3to+mvccombine. Later I will integrate that and accept an SSIF file directly.

r0lZ
14th January 2014, 17:43
Good progress, indeed! I can't wait for the first beta...

Nico8583
14th January 2014, 18:20
Very good news again ! ;)

Perhaps pistacho could help you to implement separated streams ? :)

Guest
14th January 2014, 19:37
Perhaps pistacho could help you to implement separated streams? I don't anticipate needing any help, but your suggestion is nevertheless appreciated. Please don't dump on pistacho; he's doing his thing and we're doing ours. No need to create any unnecessary antinomies. We thank him for what we learn from his work that he shares with us, and wish him well. IMHO.

Nico8583
14th January 2014, 20:31
No problem :) it was not to tell him to share any part of his sourcecode, only to share theory and how he has proceeded to use separated streams (with a routine includes in Intel Media SDK, with a routine writes by himself, with a routine takes from another free soft, etc...) ;)

About your simple sample : input is combined stram but output is left view and right view ? Or is it already possible to have only left view or only right view ?

frencher
14th January 2014, 23:57
neuron2, Here is my contribution for the detection of the First view of SSIF

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1
From idea of: Web Free Software
In help: mikell

Script Function:
_Include_Extract_Chapters_List.au3.

#ce ----------------------------------------------------------------------------

#include-once

; analyse de fichier playlist *.mpls

#Include <Array.au3>

#Include <EditConstants.au3>
#include <String.au3>



; -------------------------------------------------------------------------------------------------------------------------------------------------------------

Global $Input = "" ;Varible for Input
Global $Output = "" ;Varible for Output
Global $ShowMessage

;;Get Parameters
ReadCmdLineParams()

;; Display message
;MsgBox(0, "", "Input: " & $Input & @LF & "Output: " & $Output)

Func ReadCmdLineParams() ;Read in the optional switch set in the users profile and set a variable - used in case selection

;;Loop through every arguement
;;$cmdLine[0] is an integer that is eqaul to the total number of arguements that we passwed to the command line
for $i = 1 to $cmdLine[0]

select

;;If the arguement equal -i
case $CmdLine[$i] = "-i"
;check for missing argument
if $i == $CmdLine[0] Then cmdLineHelpMsg()

;Make sure the next argument is not another paramter
if StringLeft($cmdline[$i+1], 1) == "-" Then
cmdLineHelpMsg()
Else
;;Stip white space from the begining and end of the input
;;Not alway nessary let it in just in case
$Input = StringStripWS($CmdLine[$i + 1], 3)
endif

;;If the arguement equal -o
case $CmdLine[$i] = "-o"

;check for missing arguement
if $i == $CmdLine[0] Then cmdLineHelpMsg()

;Make sure the next argument is not another paramter
if StringLeft($cmdline[$i+1], 1) == "-" Then
cmdLineHelpMsg()
Else
;;Stip white space from the begining and end of the input
;;Not alway nessary let it in just in case
$Output = StringStripWS($CmdLine[$i + 1], 3)
EndIf

EndSelect

Next

;Make sure required options are set and if not display the Help Message
If $Input == "" Or $Output == "" Then

If $cmdline[0] <> "" Then
;cmdLineHelpMsg()
;If $i == $CmdLine[0] Then cmdLineHelpMsg()

;Make sure the next argument is not another paramter
;;Stip white space from the begining and end of the input
;;Not alway nessary let it in just in case
$Input = $CmdLine[1]
$Output = @ScriptDir & "\First view of SSIF.txt"
;Msgbox(0, "$Input", $Input)
$ShowMessage = '1'
;Msgbox(0, "$ShowMessage", $ShowMessage)
Else
cmdLineHelpMsg()
EndIf

EndIf

EndFunc

Func cmdLineHelpMsg()
MsgBox(0,"", 'First view of SSIF by Web Free Software' & @LF & @LF & 'Drag and Drop "xxxxx.mpls" to "First view of SSIF.exe"' & @LF & @LF & 'Other Required Options:' & @LF & @LF & '-i ' & @tab & ' [xxxxx.mpls]' & @tab & @tab & 'mpls for input' & @LF & '-o ' & @tab & ' [output with extension]' & @tab & 'Return value' & @LF)
Exit
EndFunc

; -------------------------------------------------------------------------------------------------------------------------------------------------------------

Global $mfile = $Input, $info, $n = 82, $ch, $chap[1][2], $m2ts[1][3] , $m2, $ps, $ChaptersMKVmerge

$size = FileGetSize($mfile)
$mpls = FileOpen($mfile, 16)
Global $caract = StringRegExp(FileRead($mpls), '[[:xdigit:]]{2}', 3)
FileClose($mpls)
;_arraydisplay($caract, "fichier")

$hexa = $caract[56]
$Binary = HexaToBinary($hexa)
;Msgbox(0, "Binary", $Binary)

Func HexaToBinary($hexa)
$hexvalue = StringSplit($hexa,'')
$Result = ''
$bits = "0000|0001|0010|0011|0100|0101|0110|0111|1000|1001|1010|1011|1100|1101|1110|1111"
$bits = stringsplit($bits,'|')
for $n = 1 to $hexvalue[0]
$result &= $bits[Dec($hexvalue[$n])+1]
Next
Return $result
EndFunc

$Reverse_Left_Right_View = StringSplit($Binary, '')
$Reverse_Left_Right_View = $Reverse_Left_Right_View[4]

;Msgbox(0, "Array", $Reverse_Left_Right_View)


If $Reverse_Left_Right_View = 1 Then
$AVC_MVC_Order = "#Left__View = MVC" & @CRLF & "#Right_View = AVC" & @CRLF & "#Return = " & $Binary
Local $TMP = FileOpen( $Output, 2) ; Efface les données précédentes du fichier: $Output
FileWrite( $Output, $AVC_MVC_Order) ; Met à jour: $Output
FileClose( $Output) ; Ferme le fichier: $Output avec FileOpen
If $ShowMessage <> '' Then
Msgbox(0, "First view of SSIF", $AVC_MVC_Order)
EndIf
Else
$AVC_MVC_Order = "#Left__View = AVC" & @CRLF & "#Right_View = MVC" & @CRLF & "#Return = " & $Binary
Local $TMP = FileOpen( $Output, 2) ; Efface les données précédentes du fichier: $Output
FileWrite( $Output, $AVC_MVC_Order) ; Met à jour: $Output
FileClose( $Output) ; Ferme le fichier: $Output avec FileOpen
If $ShowMessage <> '' Then
Msgbox(0, "First view of SSIF", $AVC_MVC_Order)
EndIf
EndIf

Guest
15th January 2014, 03:16
I brought up Avisynth on the Win8 machine. Also I ported DGAVCDecode and brought it up successfully with Visual Studio 2013. Cloned DGAVCDecode to DGMVCDecode, which is the new filter.

Next I will rip out the lavc decoder in DGMVCDecode and replace it with the Intel decoder. Then I have to write code to replace the YUV output with proper YV12 to return to Avisynth.

@frencher

I'm not ready for SSIF yet and likely will write my own parser. But thanks for the contribution. I'm not sure what language that is. I code in C++ here.

Guest
15th January 2014, 03:22
About your simple sample : input is combined stream but output is left view and right view? Or is it already possible to have only left view or only right view ? That can be done but you can also select views in your script, so the initial version will output base and dependent views interleaved by frame.

Guest
15th January 2014, 03:48
Can somebody tell me how this will be used in a script and process? I need to understand the use cases to ensure that it meets requirements. So, what are your scripts that would use MVCSource(), and how will you use the scripts?

Thalyn
15th January 2014, 08:14
Basic gist of a current MVCSource script is as follows:

Source = MVCSource ("AVC or combined.264", "MVC if not combined.264", FrameCount, 2)
AVC = SelectEven (Source)
MVC = SelectOdd (Source)

FrameCount has to be determined beforehand but you can use EAC3To, TSMuxer or even MediaInfo to find that. The 2 can also be changed accordingly, with 0 giving only AVC, 1 giving only MVC, and 2 or -2 giving AVC + MVC interleaved but the order dependant on whether it is positive or negative. If the 2 is positive than AVC is first (starting from frame 0, hence SelectEven).

Sharc
15th January 2014, 08:40
Suggested scenarios (Examples for 1000 frames):


LoadPlugin("c:\Program Files Video\MVCSource\MVCsource.dll")

#------------Regular Left and Right
Interleaved = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",1000,2)
V1 = SelectOdd(Interleaved)
V2 = SelectEven(interleaved)
return StackHorizontal(V2,V1) #SBS full



#---------------Flip Left and Right views --------------
Interleaved = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",1000,-2)
V1 = SelectOdd(Interleaved)
V2 = SelectEven(Interleaved)
return StackHorizontal(V2,V1) #SBS full
#---------------------------------------------




#----------------Base View only ------------
Base = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",1000,0)
return Base
#-------------------------------------------



#---------------Dependent view only------------
Dependent = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",1000,1)
return Dependent
#----------------------------------------------

allanlee
15th January 2014, 12:53
Can somebody tell me how this will be used in a script and process? I need to understand the use cases to ensure that it meets requirements. So, what are your scripts that would use MVCSource(), and how will you use the scripts?

Left - Right view interleaved by frame will be a good idea. :-)

Alternatively, SBS & OU might be necessary. I believe that a majority of users will apply this filter in encoding to & playing as (Half) SBS or OU.

r0lZ
15th January 2014, 13:43
Creating the Half-SBS or Half-T&B can easily be done with some avisynth commands. You should use StackHorizontal and HorizontalReduceBy2 (for SBS) or StackVertical and VerticalReduceBy2 (for T&B). No need to add that features in the Source plugin. IMO, it should be kept as simple as possible.

DarkSpace
15th January 2014, 15:24
Can somebody enlighten me why you want to specify how many frames the source filter should output?
Isn't it just fine if the source filter outputs all frames that are in the source, just like all other source filters that I know do? If you want to omit frames, you can always add a Trim to your script...

Sharc
15th January 2014, 16:33
Can somebody enlighten me why you want to specify how many frames the source filter should output?
Isn't it just fine if the source filter outputs all frames that are in the source, just like all other source filters that I know do? If you want to omit frames, you can always add a Trim to your script...
It's a heritage from the current implementation.
For "trim" to work the filter would need to support seeking (all non-commercial 3D-filters/decoders are so far sequential only, AFAIK)

Sharc
15th January 2014, 16:46
Creating the Half-SBS or Half-T&B can easily be done with some avisynth commands. You should use StackHorizontal and HorizontalReduceBy2 (for SBS) or StackVertical and VerticalReduceBy2 (for T&B). No need to add that features in the Source plugin. IMO, it should be kept as simple as possible.
Agree that it should be kept simple.
However, AFAIK for OU (T&B) and HDMI compliance one would have to include the a horizontal gap of 45 scanlines between the top and bottom picture, plus ensure the even number of scanlines, see for example the tutorial here (http://www.pantarheon.org/AviSynth3DToolbox/). According to this, HDMI does not even support half size ....

Guest
15th January 2014, 16:56
I've run into a little issue with the Intel code crashing when it is packaged into an Avisynth DLL. See here for my posting at their forum:

http://software.intel.com/en-us/forums/topic/499486

I have to get this solved before I can proceed.

r0lZ
15th January 2014, 17:02
However, AFAIK for OU (T&B) and HDMI compliance one would have to include the a horizontal gap of 45 scanlines between the top and bottom picture, plus ensure the even number of scanlines, see for example the tutorial here (http://www.pantarheon.org/AviSynth3DToolbox/). According to this, HDMI does not even support half size ....
AFAIK, stacking the 2 frames on top of each other and dividing the vertical resolution by 2 produces a perfect Half-OU picture. Some guys want to remove the black horizontal bars from Cinemascope 3D movies before stacking them together (in SBS or OU mode), but that causes many problems, and most TVs cannot show that cropped 3D format at all, or at least without distortions. Anyway, that's a problem related to the composition of the final format, and not at all to the decoding of the AVC and MVC streams. The Source filter should just output what it decodes. The rest is the responsibility of the avisynth script (and its author!)

@neuron2
Damn! Another problem. Let see if the Intel guys can help...

Sharc
15th January 2014, 17:08
Anyway, that's a problem related to the composition of the final format, and not at all to the decoding of the AVC and MVC streams. The Source filter should just output what it decodes. The rest is the responsibility of the avisynth script (and its author!)
Agree.

DarkSpace
15th January 2014, 18:04
For "trim" to work the filter would need to support seeking (all non-commercial 3D-filters/decoders are so far sequential only, AFAIK)
I see, thank you. In that case, however, does it make sense to set both start frame (in case you want to omit frames from the beginning of the clip) and length instead of only length? That way, you should be able to accurately split the video without having to use Trim or processing all frames before the beginning with whatever filter chain you have just so you can discard them.

Guest
15th January 2014, 18:58
Damn! Another problem. Let see if the Intel guys can help... I discovered I could disable break on that exception and things seem to go on, but I don't like having unexpected exceptions. I'll go on with the development and try to get this fixed in parallel.

Nico8583
15th January 2014, 19:05
It's a heritage from the current implementation.
For "trim" to work the filter would need to support seeking (all non-commercial 3D-filters/decoders are so far sequential only, AFAIK)
In Intel Media SDK, there is a video player for MVC and it is announced to support seeking, but I never tried it. Perhaps it works, I'll try when I could do that :)

frencher
15th January 2014, 23:19
In Intel Media SDK, there is a video player for MVC and it is announced to support seeking, but I never tried it. Perhaps it works, I'll try when I could do that :)

Very good news for MVC Player Free :p

frencher
15th January 2014, 23:22
Can somebody enlighten me why you want to specify how many frames the source filter should output?
Isn't it just fine if the source filter outputs all frames that are in the source, just like all other source filters that I know do? If you want to omit frames, you can always add a Trim to your script...

Left View 100000
Right View 100001

Some crash is possible, not if limited at 100000

Or both idea enabled or disabled ;)
LoadPlugin("c:\Program Files Video\MVCSource\MVCsource.dll")

#------------Regular Left and Right
Interleaved = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",frames=1000,2) #1000 frames
or
Interleaved = MVCsource("c:\Movies\00049.track_4113.264", "c:\Movies\00050.track_4114.mvc",frames=-1,2) #all frames
V1 = SelectOdd(Interleaved)
V2 = SelectEven(interleaved)
...
From allanlee
Left - Right view interleaved by frame will be a good idea. :-)

Yes very good idea and work easy with avisynth 2.58 fix for not compressed video and high memory: ffdshow video decoder choose all supported format is not necessary

Guest
15th January 2014, 23:41
Good news guys. I have succeeded to decode and display my first MVC stream using my version of MVCSource(). It's luma only until I add the NV12-->YV12 code but that will be easy. It's easy to copy the Y plane but need some code to massage the NV12 chroma.

I worked around the exception mentioned earlier and will address it properly later. It doesn't stop things from working.

So, looking good. Still need lots of cleanup and some code to make it work right with SelectEven() and SelectOdd() as it doesn't support seeking at this time.

Sharc
15th January 2014, 23:44
Congratulations, neuron2 :)

frencher
16th January 2014, 00:34
Good news guys. I have succeeded to decode and display my first MVC stream using my version of MVCSource(). It's luma only until I add the NV12-->YV12 code but that will be easy. It's easy to copy the Y plane but need some code to massage the NV12 chroma.

I worked around the exception mentioned earlier and will address it properly later. It doesn't stop things from working.

So, looking good. Still need lots of cleanup and some code to make it work right with SelectEven() and SelectOdd() as it doesn't support seeking at this time.

Jeeeeeeeez very good neuron2
Your news are a joy :goodpost:

allanlee
16th January 2014, 03:07
Good news guys. I have succeeded to decode and display my first MVC stream using my version of MVCSource(). It's luma only until I add the NV12-->YV12 code but that will be easy. It's easy to copy the Y plane but need some code to massage the NV12 chroma.

I worked around the exception mentioned earlier and will address it properly later. It doesn't stop things from working.

So, looking good. Still need lots of cleanup and some code to make it work right with SelectEven() and SelectOdd() as it doesn't support seeking at this time.

:goodpost: Congratulations! To start with outputting one view (controlled by parameter) will be great as well. (at least for me :-D)

Thalyn
16th January 2014, 05:21
In the interest of reducing confusion, can we perhaps refer to the new plugin/function by a different name? There's already an existing MVCSource plugin with a correspondingly named function.

Might I suggest N2MVC?

Overdrive80
16th January 2014, 06:12
In the interest of reducing confusion, can we perhaps refer to the new plugin/function by a different name? There's already an existing MVCSource plugin with a correspondingly named function.

Might I suggest N2MVC?

Or OpenMVCSource... Haha

r0lZ
16th January 2014, 11:00
Keep up the good work Neuron2!

Can somebody enlighten me why you want to specify how many frames the source filter should output?I think also that the avisynth script must "know" the number of frames of the returned clip, for the Info() command, and because the calling program must often know it. For example, x264 can only show the percentage of the progress if it knows the total number of frames to encode. As long as it is not possible to seek, I suppose that the only way to tell how many frames the source filter will decode is to specify it with a parameter. Of course, if the filter can retrieve it automatically, it's the best solution, but apparently, it's not easy.

Also, Frencher is right. Sometimes, there is a slightly different number of frames in the AVC and MVC streams, and it may be necessary to specify exactly the number of frames to decode. Of course, that parameter has also the advantage that it can limit the number of frames to decode, for example to do a little test. Anyway, it it's possible and easy enough, I vote for an optional parameter.

Overdrive80
16th January 2014, 13:03
Framecount() is function that return total frames of video. Maybe, could be used as variable. ^^

DarkSpace
16th January 2014, 16:28
I think also that the avisynth script must "know" the number of frames of the returned clip, for the Info() command, and because the calling program must often know it. For example, x264 can only show the percentage of the progress if it knows the total number of frames to encode. As long as it is not possible to seek, I suppose that the only way to tell how many frames the source filter will decode is to specify it with a parameter. Of course, if the filter can retrieve it automatically, it's the best solution, but apparently, it's not easy.
Thanks, that elaborates it a bit. My main confusion came from not knowing about the inability to seek, I just assumed that seeking was possible and all that.

Also, Frencher is right. Sometimes, there is a slightly different number of frames in the AVC and MVC streams, and it may be necessary to specify exactly the number of frames to decode. Of course, that parameter has also the advantage that it can limit the number of frames to decode, for example to do a little test. Anyway, it it's possible and easy enough, I vote for an optional parameter.
Wasn't the different number of frames between views an eac3to extraction bug? I remember this coming up in the eac3to thread in any case, and I think that madshi either fixed it already or said he would fix it.
Also, I think that such files are broken, and I honestly don't like the idea of assuming that files are going to be broken. ;)

Anyway, I agree that the parameter is necessary as long as seeking is impossible, and if/when seeking becomes possible, it could become optional.

r0lZ
16th January 2014, 17:06
Wasn't the different number of frames between views an eac3to extraction bug? I remember this coming up in the eac3to thread in any case, and I think that madshi either fixed it already or said he would fix it.
Also, I think that such files are broken, and I honestly don't like the idea of assuming that files are going to be broken. ;)I don't know exactly. I haver noticed a very different number of frames in a 3D BD, but it was due to a bad rip. But I have also had once a difference of one single frame, and in that case, the rip was correct, or at least, I haven't found any problem, and a second rip gave exactly the same result. It may be due to a bad authoring. I agree however that such thing should normally never happen.

Guest
17th January 2014, 05:27
All right, boys and girls, I have a beta for you!

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

The ZIP contains a text document with usage information. A sample combined MVC stream is also included.

Planned improvements:

* Avisynth 2.6 and Avisynth+ support
* HW acceleration
* integrated frame counting if the frames parameter is missing
* accept separate view elementary streams
* accept SSIF input directly

I would appreciate your feedback and prioritization on the planned improvements. I think HW acceleration is high on the list.

allanlee
17th January 2014, 05:30
All right, boys and girls, I have a beta for you!

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

The ZIP contains a text document with usage information. A sample combined MVC stream is also included.

Planned improvements:

* Avisynth 2.6 and Avisynth+ support
* HW acceleration
* integrated frame counting if the frame parameter is missing
* accept separate view elementary streams
* accept SSIF input directly

I would appreciate your feedback and prioritization on the planned improvements. I think HW acceleration is high on the list.

:goodpost:

;) Fantastic! Great job!
Downloaded & hunting for bugs :D

Guest
17th January 2014, 05:32
"Can somebody enlighten me why you want to specify how many frames the source filter should output?"

It's not that you want to, it's that you have to. The source filter does not know how many frames are in the source elementary stream yet it has to report the number of frames to Avisynth at the stream open (e.g., that's how VirtualDub's File/Information knows the frame count). Of course one could parse the entire stream and count the frames on the first open and store it in a primitive index file for later opens. This will be a useful addition.

Other source filters that use an index file already know the count because they can determine it from the index file.

Guest
17th January 2014, 05:59
In the interest of reducing confusion, can we perhaps refer to the new plugin/function by a different name? There's already an existing MVCSource plugin with a correspondingly named function.

Might I suggest N2MVC? Yeah, you're right about that. Sticking to my pattern, I prefer DGMVCSource().

RieGo
17th January 2014, 08:15
hey, nice job! i'm gonna try it out later. :)
is there any chance to implement reading MVC MP4 directly?

Sharc
17th January 2014, 08:39
All right, boys and girls, I have a beta for you!

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

The ZIP contains a text document with usage information. A sample combined MVC stream is also included.

Planned improvements:

* Avisynth 2.6 and Avisynth+ support
* HW acceleration
* integrated frame counting if the frames parameter is missing
* accept separate view elementary streams
* accept SSIF input directly

I would appreciate your feedback and prioritization on the planned improvements. I think HW acceleration is high on the list.
Bingo! It works here. Thanks !!

Just a note to the script examples:
Should "Left" and "Right" be replaced by "Base" and "Dependent" or similar? I am asking because the allocation of left and right views to the streams are not standardized.

Priorities: I would wish to have 2 streams (base, dependent) as source (or ssif) rather than a combinedMVC stream.

Nico8583
17th January 2014, 10:03
Thanks a lot neuron2, you're a king ! I'll try this afternoon ;-)
For me, this is order of improvments :
* accept separate view elementary streams
* HW acceleration
* integrated frame counting if the frames parameter is missing
* Avisynth 2.6 and Avisynth+ support
* accept SSIF input directly
Separate elementary streams is more important for me than other, and HW acceleration would be a great thing if it is a parameter (use or not). Integrated frame counting is not a problem.

Sharc
17th January 2014, 10:16
@neuron2
The plugin seems to work fine so far, I just came across following issue:
When I demux your sample "combined.264" with tsMuxeR 2.6.12, I get - as expected - 2 files like "combined_2.264" (base view) and "combined.mvc" (dependent view). Both files seem to be ok. Now I remux these 2 files with tsMuxeR to "combined_2.ts" which plays without issues 2D or 3D depending on player.
However, trying to decode the "combined_2.ts" with DGMVCsource fails. Is this because of the *.ts format?

Edit:
When deuxing, tsMuxeR reports:
.....
Processed 621 video frames
Processed 658 video frames
.....
i.e. unequal number of frames.

Edit2:
Same happens with other samples. When remuxed with tsMuxeR, decoding with DGMVCsource fails.
If so, it means that we can't produce combinedMVC files with tsMuxeR but would have to do use other tools like eac3to.

Nico8583
17th January 2014, 11:01
TsMuxeR can't produce raw h264 combined stream, it includes AVC and MVC to a container like TS or M2TS and Intel Media SDK accept only raw streams, IMHO.

@neuron2 : for the name of the filter, I suggest DGIntelSource() or similar because if in a next future you decide to include all decoders from Intel Media SDK, MVC would not have sense :confused:

r0lZ
17th January 2014, 11:06
Bingo! It works here. Thanks !!

Just a note to the script examples:
Should "Left" and "Right" be replaced by "Base" and "Dependent" or similar? I am asking because the allocation of left and right views to the streams are not standardized.

Priorities: I would wish to have 2 streams (base, dependent) as source (or ssif) rather than a combinedMVC stream.
I agree to the two remarks: base and dependent (or dep), or AVC and MVC are much better terms, given the fact that sometimes, the left and right views are inverted.

And for me too, taking input from the two ES is the most useful improvement.

Sharc
17th January 2014, 11:08
TsMuxeR can't produce raw h264 combined stream, it includes AVC and MVC to a container like TS or M2TS and Intel Media SDK accept only raw streams, IMHO.
Yes, I think this explains it. Thanks.
(Perhaps a good reason for prioritizing the acceptance of separate elementary streams and skip the "combined" intermediate step ;) )

r0lZ
17th January 2014, 11:55
Not a big deal, but I have had some difficulties to get it working, because I have removed all instances of libmfxsw32.dll from my system. Without that file in the PATH, DGMVCDecode.dll cannot work, and the script hangs for ever. It should instead issue a red error message. Also, I don't know if it's possible, but it will be a good thing if that DLL could be loaded automatically from the location of the DGMVCDecode.dll, even if that directory is not in the PATH, so that it will be possible to simply put both DLL in any directory. Currently, it's not possible to load the Intel dll if it is not in the current directory or in a directory in the system PATH.

Also, IMO, libmfxsw32.dll should be distributed with the final version of the plugin, unless it's forbidden by the Intel license. In the meantime, it is important to add it in the list of requirements in the readme file.

r0lZ
17th January 2014, 12:36
Another problem: I haven't been able to invert the two views (to decode a movie with the right view in the AVC stream, and the left view in the MVC stream). I don't understand what's happening. I start with your example script:

interleaved=mvcsource("combined.264",view=0,frames=2172)
left=interleaved.selecteven()
right=interleaved.selectodd()
stackhorizontal(horizontalreduceby2(left),horizontalreduceby2(right))

It works as expected, and the result is correct for the common order of views (left in AVC).

Now, with exactly the same combined tile, I did a test with inverted views:

interleaved=mvcsource("combined.264",view=0,frames=2172)
right=interleaved.selecteven()
left=interleaved.selectodd()
stackhorizontal(horizontalreduceby2(left),horizontalreduceby2(right))

But the output is exactly the same than with the previous script.
Same thing with this script:

interleaved=mvcsource("combined.264",view=0,frames=2172)
left=interleaved.selecteven()
right=interleaved.selectodd()
stackhorizontal(horizontalreduceby2(right),horizontalreduceby2(left))

I'm puzzled!

If, for whatever magical reason, inverting the views in the script is not possible, it will be necessary to add another value for the view argument, to invert the order of the interleaved frames.

Nico8583
17th January 2014, 16:27
Same issue than r0lZ with inverted views, left is allways left and right is allways right.

Guest
17th January 2014, 16:30
Another problem: I haven't been able to invert the two views (to decode a movie with the right view in the AVC stream, and the left view in the MVC stream). I don't understand what's happening. Hmm, strange, I'll have to look into that. Does this happen also with pistacho's filter?

r0lZ
17th January 2014, 16:44
Does this happen also with pistacho's filter? Pistacho's filter has 4 values for its "view" parameter: interleaved with AVC first, interleaved with MVC first, AVC only and MVC only. It is therefore always possible to get the frames in the correct order. However, if you decode, say, the AVC first and you try to swap the views with the following commands in the AVS script, it crashes. It's because the StackHorizontal (or Vertical) command reads the image from its first argument and then the image from its second argument, and since the filter doesn't support seeking, it is impossible to invert the order of the Stack command.

Your filter doesn't crash, even when the user tries to seek (for example with AVSpMod), but it returns always the next frame, regardless of the current frame number it is supposed to return. I suppose something similar happens when the even and odd frames are retrieved. It's always the first frame from the input file that is returned. Of course, I can't be sure. You know your code better than me. ;-)