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 > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th January 2010, 19:00   #10281  |  Link
tal.aloni
Registered User
 
Join Date: Sep 2008
Posts: 496
Quote:
Originally Posted by iron2000 View Post
I disabled both options from the DXVA profile through the registry but the artifacts on seek is still there.
I do not have those artifacts now, but I remember them from one of the previous buids. so either it's been solved, or the conditions do not occur right now.

anyway, those options have nothing to do with DXVA and should not have any effect.
tal.aloni is offline   Reply With Quote
Old 13th January 2010, 19:07   #10282  |  Link
Sebastiii
Registered User
 
Join Date: Oct 2009
Location: France
Posts: 615
Jeremy Duncan for Wiki

I'll try to try
Seb.
__________________
HTPC : i7 920 6Go Win10(x64) / Nvidia 1050Ti / P6T Deluxe / Harman-Kardon AVR-355.
Sebastiii is offline   Reply With Quote
Old 13th January 2010, 21:37   #10283  |  Link
tal.aloni
Registered User
 
Join Date: Sep 2008
Posts: 496
I was able to modify DXVA 1.0 decoded image using the code below (under Windows XP):
however, there's still a lot to figure, for instance, I still need to understand how exacly the raw image is stored, but the fact is that I can read it, modify it, and have the renderer show it...

Code:
HRESULT hr = E_INVALIDARG;
    BYTE*   pDXVABuffer;
    DWORD       dwTypeIndex = 0xffffffff;
    switch (m_nEngine)
    {
    case ENGINE_DXVA1 :
        
        LONG        lStride;
        hr = m_pAMVideoAccelerator->GetBuffer(dwTypeIndex, bufferIndex, FALSE, (void**)&pDXVABuffer, &lStride);
		ASSERT (SUCCEEDED (hr));
		  // modify buffer here
		hr = m_pAMVideoAccelerator->ReleaseBuffer(dwTypeIndex, bufferIndex);
		ASSERT (SUCCEEDED (hr));
Edit:
according to specs, this should run after Execute and before EndFrame, however, according to practive, this should run immediately after EndFrame()

Last edited by tal.aloni; 15th January 2010 at 21:26.
tal.aloni is offline   Reply With Quote
Old 14th January 2010, 05:18   #10284  |  Link
dstln
Person
 
dstln's Avatar
 
Join Date: Jul 2009
Posts: 58
Loving the dxva/force dxva settings
dstln is offline   Reply With Quote
Old 14th January 2010, 05:38   #10285  |  Link
JarrettH
Registered User
 
Join Date: Aug 2004
Location: Canada
Posts: 860
Are there no more official releases?
JarrettH is offline   Reply With Quote
Old 14th January 2010, 06:07   #10286  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Does anyone tried to compare speed of ffdshow's DXVA to the original one in MPC-HC? So far I saw only one benchmark and it shows that for some reason FFDShow is twice slower. I don't want to believe in that... Its not like I know a good way of testing DXVA decoding speed, but still I'm curious.
Keiyakusha is offline   Reply With Quote
Old 14th January 2010, 07:04   #10287  |  Link
tal.aloni
Registered User
 
Join Date: Sep 2008
Posts: 496
Quote:
Originally Posted by Keiyakusha View Post
Does anyone tried to compare speed of ffdshow's DXVA to the original one in MPC-HC? So far I saw only one benchmark and it shows that for some reason FFDShow is twice slower.
It's almost exactly the same implementation, so it can't be very different in speed.
tal.aloni is offline   Reply With Quote
Old 14th January 2010, 07:51   #10288  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
yes it doesn't work @ all :P
whatever i do i land @ MPC-HC Video Decoder decoding H.264 streams via the VP2 and ffdshow doesn't trigger any DXVA @ all even if forced like disable H.264 enable H.264 DXVA
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 14th January 2010 at 07:55.
CruNcher is offline   Reply With Quote
Old 14th January 2010, 08:11   #10289  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
Hi.
I tested DXVA decoder (rev.3200) - h.264 seems to be OK, but i have problems with VC-1 - looks like bad frame order.
Tested on ATI 4770 (cat. 9.12 + Win7 x64). No problem with MPC decoder.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin
hoborg is offline   Reply With Quote
Old 14th January 2010, 08:23   #10290  |  Link
tal.aloni
Registered User
 
Join Date: Sep 2008
Posts: 496
Quote:
Originally Posted by hoborg View Post
Hi.
I tested DXVA decoder (rev.3200) - h.264 seems to be OK, but i have problems with VC-1 - looks like bad frame order.
Tested on ATI 4770 (cat. 9.12 + Win7 x64). No problem with MPC decoder.
post / PM a sample please!
also, please try 3198 and tell me if the order is correct.
tal.aloni is offline   Reply With Quote
Old 14th January 2010, 09:12   #10291  |  Link
tetsuo55
MPC-HC Project Manager
 
Join Date: Mar 2007
Posts: 2,317
Quote:
Originally Posted by tal.aloni View Post
post / PM a sample please!
also, please try 3198 and tell me if the order is correct.
keep in mind that both haali and mpc-hc splitter do wierd things with the timestamps.
Contact casimir for more information, so this can be fixed once and for all.
__________________
MPC-HC, an open source project everyone can improve. Want to help? Test Nightly Builds, submit patches or bugs and chat on IRC
tetsuo55 is offline   Reply With Quote
Old 14th January 2010, 09:17   #10292  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
Quote:
Originally Posted by tal.aloni View Post
post / PM a sample please!
also, please try 3198 and tell me if the order is correct.
Sended.
Can you compile 3198 for me? On http://xvidvideo.ru there are only 3195 then 3200...

BTW, i tested it with Haali (1.9.355.21) as splitter -
So combination of:
Haali + MPC decoder - OK
Haali + FFDshow DXVA - not OK.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin

Last edited by hoborg; 14th January 2010 at 09:20.
hoborg is offline   Reply With Quote
Old 14th January 2010, 09:40   #10293  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
Quote:
Originally Posted by tal.aloni View Post
I was able to modify DXVA 1.0 decoded image using the code below (under Windows XP):
however, there's still a lot to figure, for instance, I still need to understand how exacly the raw image is stored, but the fact is that I can read it, modify it, and have the renderer show it...

Code:
HRESULT hr = E_INVALIDARG;
    BYTE*   pDXVABuffer;
    DWORD       dwTypeIndex = 0xffffffff;
    switch (m_nEngine)
    {
    case ENGINE_DXVA1 :
        
        LONG        lStride;
for (int bufferIndex=0; bufferIndex<m_nPicEntryNumber; bufferIndex++)
		{
        hr = m_pAMVideoAccelerator->GetBuffer(dwTypeIndex, bufferIndex, FALSE, (void**)&pDXVABuffer, &lStride);
		ASSERT (SUCCEEDED (hr));
		  // modify buffer here
		hr = m_pAMVideoAccelerator->ReleaseBuffer(dwTypeIndex, bufferIndex);
		ASSERT (SUCCEEDED (hr));
(this should run after Execute)
Thanks Tal, this sounds pretty exiting


I have not done like you : I am in the TDXVADecoder:isplayNextFrame method and instead of displaying it I come back to TvideoCodecLibavcodecDxva and call a new method to copy the frame back from the GPU into the system memory, then process it through FFDShow filters.
In that way we should be able to apply all the filters including resize, crop... (I hope)

The tough part is to reproduce the TvideoCodecLibavcodec::decompress method (just after decoding) to create a TPict and get back into the nominal code path.
albain is offline   Reply With Quote
Old 14th January 2010, 10:46   #10294  |  Link
tal.aloni
Registered User
 
Join Date: Sep 2008
Posts: 496
Quote:
Originally Posted by albain View Post
I have not done like you : I am in the TDXVADecoder :: DisplayNextFrame method
Quote:
Originally Posted by MSDN
The value 0xFFFFFFFF is valid only between calls to IAMVideoAccelerator::BeginFrame and IAMVideoAccelerator::EndFrame
so according to the specs (which may be stricter than actuall driver / hardware)
Code:
    // Decode bitstream
    CHECK_HR (Execute());
    if (any post processing is active)
    {
    //TDXVADecoder::ProcessDecodedFrame
    CHECK_HR (ProcessDecodedFrame()); // copy, apply post processing and copy back
    }
    CHECK_HR (EndFrame(nSurfaceIndex));
anyway, I'm sure you'll figure out the best way, it is indeed exciting.

http://msdn.microsoft.com/en-us/libr...03(VS.85).aspx

Last edited by tal.aloni; 14th January 2010 at 10:58.
tal.aloni is offline   Reply With Quote
Old 14th January 2010, 15:24   #10295  |  Link
Lam3rD
Registered User
 
Join Date: Oct 2009
Posts: 47
Hello. I don't know if anyone cares about this, but some of the internal AVISynth functions doesn't work the way they are supposed to do.

I'm trying to make something simple for ITU/NON-ITU detection on DVDs as a part of a bigger script, however it doesn't work as expected, so I guess there might be something wrong with ffdshow_setsar

Quote:
Temp=stackhorizontal(crop(0,16,32,-16),crop(width-32,16,0,-16)).grayscale
(width==720)?FrameEvaluate("AverageLuma(Temp))<30?ffdshow_setsar(ffdshow_sar_x*45,ffdshow_sar_y*44):ffdshow_setsar(ffdshow_sar_x,ffdshow_sar_y)"):ffdshow_setsar(ffdshow_sar_x,ffdshow_sar_y)
This isn't the exact script, it's boosted so it could easily go bananas. I'm watching the Output SAR/DAR in the OSD - it does change and it shifts it's location, but the image remains with exactly the same shape.

Also I would love to know if there are any other variables/functions, that I could use to interact between ffdshow and it's AVISynth filter. I have never found those listed anywhere (besides being used in the script on the wiki). It'd be cool if there are a few showing the results from the auto detections ffdshow performs - PC/TV Levels; Interlaced/Progressive flags etc.
Lam3rD is offline   Reply With Quote
Old 14th January 2010, 16:13   #10296  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
Question about DXVA & colorspaces

I have a problem and I kinda lack of knowledge on that part

Maybe Tal or someone else can help me out on this

The frames that are in the GPU are in a flat buffer

Whereas FFDShow works with color planes : for example with a YCbCr colorspace you have 3 planes so 3 buffers.

I know the colorspace, I have a flat buffer.

How can I convert it into n buffers ?

This is an example but it applies to all colorspaces.

Are there built functions inside FFDShow to do that ?

This is a necessary step to build the TPict and to feed the processing filters

Thanks

EDIT : okay, I think that this is like in TvideoCodecUncompressed.
Another problem : the CopyBack method used to copy from the DXVA buffer to system memory uses SSE4 instructions which are not templatized : I mean that you don't call SSE 1,2,... instructions dirrectly but call methods that would call the instructions if the CPU support them or call a coded method that can do it instead.

Last edited by albain; 14th January 2010 at 17:49.
albain is offline   Reply With Quote
Old 14th January 2010, 17:28   #10297  |  Link
hoborg
Registered User
 
Join Date: Nov 2008
Posts: 454
Quote:
Originally Posted by tal.aloni View Post
post / PM a sample please!
also, please try 3198 and tell me if the order is correct.
OK, i finished test right now.
The sample i posted to you works just fine in 3198 like others VC-1 samples i have.
In 3200 sample i sended to you are broken, but rest of VC-1 videos i have seems to be OK.
__________________
Working machine: Win10x64 + Intel Skull Canyon
My HTPC.

How to start with Bitcoin
hoborg is offline   Reply With Quote
Old 14th January 2010, 19:16   #10298  |  Link
Sebastiii
Registered User
 
Join Date: Oct 2009
Location: France
Posts: 615
I am in admiration of you guys
And exciting too

Good luck
Seb.
__________________
HTPC : i7 920 6Go Win10(x64) / Nvidia 1050Ti / P6T Deluxe / Harman-Kardon AVR-355.
Sebastiii is offline   Reply With Quote
Old 14th January 2010, 19:50   #10299  |  Link
therealjoeblow
Registered User
 
Join Date: Jan 2004
Location: Canada
Posts: 210
Two things:

1) Could someone please tell me if the "profiles and presets" function works with the DXVA settings - IE, can I set a profile to enable DXVA for H264 when W=1920, and be off when W<1920 (that way I can still use the Lanczos resizer for my 720p encodes)?

and...

2) DXVA is also the terminology used by most filters for hardware decoding of DVD/MPEG2 - can we add that as an additional option to the DXVA options screen (beside the tickboxes for H246 and VC1) , and remove the less intuitive "set interlace flag in output media type" from the regular decoder's "output" tab (the latter setting is what triggers DXVA to be initiated for DVD/MPEG2 decoding).
__________________
Cheers,
The REAL Joe

Last edited by therealjoeblow; 14th January 2010 at 20:04.
therealjoeblow is offline   Reply With Quote
Old 14th January 2010, 19:56   #10300  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,643
1) yes, you can make presets
2) ffdshow does not have DXVA capabilities for MPEG-2, I think you are confusing DXVA with hardware deinterlacing
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Reply

Tags
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl

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 22:25.


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