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. |
18th June 2011, 16:41 | #13661 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
Libavcodec is still single-threaded for H.264. It uses w32threads instead of pthreads. Last time I tried changing that it crashed, and haven't looked into it deeper yet.
__________________
MPC-HC 2.1.7.2 |
18th June 2011, 18:53 | #13663 | Link |
Registered User
Join Date: Apr 2008
Posts: 1,106
|
Guys, when using things like avisynth frame interpolation in ffdshow, is it upto ffdshow or avisynth to correctly set the pin out details.
I frame interpolate everything to 50.00fps using avisynth, yet madVR video renderer reports "movie 23.974 fps (says source filter)". ffdshow pin out also says the following, rather than the correct output rate of 50.00 fps Code:
Filter : ffdshow Video Decoder - CLSID : {04FE9017-F873-410E-871E-AB91661A4EF7} - Connected to: CLSID: {E1A8B82A-32CE-4B0D-BE0D-AA68C772E423} Filter: madVR Renderer Pin: Input - Connection media type: Video: YV12 2048x1080 (16:9) 23.97fps |
18th June 2011, 20:15 | #13664 | Link | |
warpsharpened
Join Date: Feb 2007
Posts: 787
|
Quote:
ffmpeg-mt was merged. There's zero reason to maintain both of them as separate entities in ffdshow. Also what still needs to get done for 10bit h264 decoding support? Last edited by TheRyuu; 18th June 2011 at 20:18. |
|
18th June 2011, 20:53 | #13665 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
It crashed when using pthreads. But like I have said, I haven't looked into it yet.
For the 10bit stuff, ffdshow needs to be updated to recognize the 9/10/16bit colorspaces of ffmpeg and use swscale to convert them to the standard output colorspaces. Patches are welcome.
__________________
MPC-HC 2.1.7.2 |
19th June 2011, 01:09 | #13666 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
Ok, got it working. H.264 decoding is now multi-threaded in libavcodec. Everyone please test.
__________________
MPC-HC 2.1.7.2 |
19th June 2011, 02:39 | #13668 | Link |
warpsharpened
Join Date: Feb 2007
Posts: 787
|
I'm not completly sure but doesn't autostatic in pthreads mean code like this:
Code:
--- trunk/src/ffmpeg/DllEntry.c 2011/06/18 11:59:34 3884 +++ trunk/src/ffmpeg/DllEntry.c 2011/06/18 23:43:03 3885 @@ -28,33 +28,37 @@ CRITICAL_SECTION g_csStaticDataLock; +BOOL pthread_win32_process_attach_np(void); +BOOL pthread_win32_process_detach_np(void); +BOOL pthread_win32_thread_attach_np(void); +BOOL pthread_win32_thread_detach_np(void); + // --- standard WIN32 entrypoints -------------------------------------- BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { - //static int count=0; - //char pomS[40]; - switch (dwReason) - { - case DLL_PROCESS_ATTACH: - //count++; - //snprintf(pomS,40,"ffmpeg: %i %i\n",count,hInstance);OutputDebugString(pomS); - DisableThreadLibraryCalls(hInstance); - InitializeCriticalSection( &g_csStaticDataLock ); - break; - case DLL_PROCESS_DETACH: - //count--; - //snprintf(pomS,40,"ffmpeg: %i %i\n",count,hInstance);OutputDebugString(pomS); - DeleteCriticalSection( &g_csStaticDataLock ); - break; - } - return TRUE; + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + pthread_win32_process_attach_np(); + pthread_win32_thread_attach_np(); + DisableThreadLibraryCalls(hInstance); + InitializeCriticalSection( &g_csStaticDataLock ); + break; + + case DLL_PROCESS_DETACH: + pthread_win32_thread_detach_np(); + pthread_win32_process_detach_np(); + DeleteCriticalSection( &g_csStaticDataLock ); + break; + } + return TRUE; } static char av_datetime[]=__DATE__" "__TIME__; void getVersion(char **version,char **build,char **datetime,const char* *license) { - if (version) *version=AV_STRINGIFY(LIBAVCODEC_VERSION)", "COMPILER COMPILER_X64 COMPILER_INFO; - if (build) *build=AV_STRINGIFY(LIBAVCODEC_BUILD); - if (datetime) *datetime=av_datetime; - if (license) *license=""; + if (version) *version=AV_STRINGIFY(LIBAVCODEC_VERSION)", "COMPILER COMPILER_X64 COMPILER_INFO; + if (build) *build=AV_STRINGIFY(LIBAVCODEC_BUILD); + if (datetime) *datetime=av_datetime; + if (license) *license=""; } Code:
Index: libavcodec/allcodecs.c =================================================================== --- libavcodec/allcodecs.c (revision 15966) +++ libavcodec/allcodecs.c (working copy) @@ -41,6 +41,14 @@ extern AVBitStreamFilter x##_bsf; \ if(ENABLE_##X##_BSF) av_register_bitstream_filter(&x##_bsf); } +#ifdef PTW32_STATIC_LIB +static void detach_ptw32(void) +{ + pthread_win32_thread_detach_np(); + pthread_win32_process_detach_np(); +} +#endif + /** * Register all the codecs, parsers and bitstream filters which were enabled at * configuration time. If you do not call this function you can select exactly @@ -59,6 +67,12 @@ return; initialized = 1; +#ifdef PTW32_STATIC_LIB + pthread_win32_process_attach_np(); + pthread_win32_thread_attach_np(); + atexit(detach_ptw32); +#endif + /* video codecs */ REGISTER_DECODER (AASC, aasc); REGISTER_DECODER (AMV, amv); Last edited by TheRyuu; 19th June 2011 at 02:43. |
19th June 2011, 06:35 | #13669 | Link | |
Registered User
Join Date: Dec 2007
Posts: 652
|
Quote:
Also Looking good for me and if anything the CPU useage of libav "may" be just slightly better thant ffmpeg-mt (hard to really tell), but it is certainly no worse. Anyway, are there any benefits now to use ffmpeg-mt over libav? If not are you goint to remove the ffmpeg-mt option? Thanks Nathan Next you will say that libav now supports interlaced VC-1! |
|
19th June 2011, 08:23 | #13670 | Link | |
もこたんインしたお!
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
|
Quote:
Saw people on #libav-devel working on it at least, but this was a while ago.
__________________
[I'm human, no debug]
|
|
19th June 2011, 10:26 | #13672 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
@TheRyuu
It crashes in ntdll without that custom code. It probably needs it because out pthread lib is a bit old. I will try updating it and see if that code is still needed. Thanks for the hint. @all ffmpeg-mt has been integrated into libavcodec now. So if no problems are reported, ffmpeg-mt can be removed in the near future. Things are looking good so far. Please also test MPEG-1/2, DV, and FFV1, which all use slice-based threading in libavcodec. @JEEB Afaik, there is not much active development going on regarding interlaced VC-1. But there is a GSOC project for it, but there has been in past year as well without much results. http://wiki.multimedia.cx/index.php?...ssing_features
__________________
MPC-HC 2.1.7.2 |
19th June 2011, 11:25 | #13673 | Link | |
Registered User
Join Date: Jun 2009
Location: London
Posts: 378
|
Quote:
The only issue is but its been around for a while, is that ffdshow doesn't seem to read this info on h264 in MKV when using LAV Spiltter, Code:
VIDEOINFOHEADER2: dwInterlaceFlags: 0x00000000 dwCopyProtectFlags: 0x00000000 dwPictAspectRatioX: 16 dwPictAspectRatioY: 9 dwControlFlags: 0x00000000 dwReserved2: 0x00000000
__________________
Windows 11 Pro, CPU: Ryzen 9 5900X, GPU: GeForce RTX 3090 /w 512.95, Audio: HDMI to Yamaha RX-A3060 (5.1) |
|
20th June 2011, 08:53 | #13674 | Link | |
Firefox User
Join Date: Sep 2003
Posts: 202
|
Quote:
|
|
20th June 2011, 12:21 | #13675 | Link |
zj262144
Join Date: Sep 2010
Posts: 105
|
sorry to trouble, I've been meaning to ask...
what does splineResize stand for? spline16resize? spline36resize? spline64resize? could I tweak it as LanczosResize(taps)?
__________________
MPC-HC 1.7.8 / LAV Filters 0.64+ (tMod) / XySubFilter 3.1.0.705 / madVR 0.87.14 Direct264 Mod (src & win32 builds): code.google.com/p/direct264umod (maybe outdated) |
20th June 2011, 14:27 | #13676 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
Those codecs have sync issues when MT is enabled for them. So unless someone figures out a solution for that they won't be multi-threaded.
__________________
MPC-HC 2.1.7.2 |
20th June 2011, 14:36 | #13677 | Link |
Registered User
Join Date: Feb 2010
Posts: 364
|
clsid: did you use the latest winpthreads from http://mingw-w64.svn.sourceforge.net...l/winpthreads/ ?
|
20th June 2011, 18:35 | #13679 | Link | |
*****
Join Date: Feb 2005
Posts: 5,640
|
Quote:
http://sourceforge.net/projects/ming...d%29/pthreads/
__________________
MPC-HC 2.1.7.2 |
|
20th June 2011, 19:15 | #13680 | Link |
Registered User
Join Date: Jun 2009
Location: London
Posts: 378
|
I cant seem to compile ffmpeg x64 anymore, had no issue with build 3886
As a reference, I used the below cmd and currently use mingw_gcc_461_v20110506_x86-x64-pre-release.7z from xvidvideo.ru Code:
rd /S /Q obj\MinGW64 cd src\ffmpeg make 64BIT=yes cd ..\.. pause
__________________
Windows 11 Pro, CPU: Ryzen 9 5900X, GPU: GeForce RTX 3090 /w 512.95, Audio: HDMI to Yamaha RX-A3060 (5.1) Last edited by VipZ; 20th June 2011 at 19:22. |
Tags |
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl |
Thread Tools | Search this Thread |
Display Modes | |
|
|