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 > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd December 2009, 09:49   #1  |  Link
Maksee
Registered User
 
Join Date: Aug 2008
Posts: 4
MPC-HC 64 bit slower than 32 bit (MPEG)

Hi,
for my laptop having AMD Athlon X2 Dual-Core 2100 Caspian (M320) and Windows 7 64 bit Home premium I downloaded MediaPlayer Classic Home Cinema 64 bit. Noticed that a sony demo 1080 mpg (30 fps) could not be decoded successfully, it managed to keep up with about 24 frames per second (internal filter used). But when I downloaded 32 bit version, it started to show this demo flawlessly with 30 fps and not full CPU load.

Is it a known issue? Is it related to the core MPC code or some between-architecture calls for some filters? I have no problem using 32-bit version, but knowing such things can help taking this into account in future

Thanks in advance,

Max
Maksee is offline   Reply With Quote
Old 22nd December 2009, 10:36   #2  |  Link
Mangix
Audiophile
 
Join Date: Oct 2006
Posts: 353
yes, the 64-bit version of MPC-HC is known to be slower. It's recommended to use the 32-bit version since it's faster and more compatible with everything like quicktime and such...
Mangix is offline   Reply With Quote
Old 23rd December 2009, 09:52   #3  |  Link
Scoty
Registered User
 
Scoty's Avatar
 
Join Date: Apr 2003
Posts: 108
Why is the 64Bit slower?
__________________
Gaming-PC: AMD 7700X | RTX 4070 Ti | ASUS ROG Strix X670E-E Gaming WIFI | G-Skill RGB 32GB, DDR5-6000 | Corsair HX1200 | Lian Li Air Mini |
Scoty is offline   Reply With Quote
Old 23rd December 2009, 10:17   #4  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Maybe less handwritten 64bit assembly in the decoders?
nurbs is offline   Reply With Quote
Old 23rd December 2009, 12:39   #5  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,643
MPC itself has little to none assembly. But ffdshow and MPC's internal ffmpeg decoders do. And yes, those contain a smaller amount of optimized assembly code in 64-bit builds.
__________________
MPC-HC 2.1.7.2
clsid is offline   Reply With Quote
Old 23rd December 2009, 16:43   #6  |  Link
Maksee
Registered User
 
Join Date: Aug 2008
Posts: 4
Quote:
Originally Posted by clsid View Post
And yes, those contain a smaller amount of optimized assembly code in 64-bit builds.
I still don't understand. If architecture is x86-64 (http://en.wikipedia.org/wiki/X86-64), who is the bad guy? All 32-bit instructions are working, so all optimizations for 32bit architecture should work either. Or MSVC can generate "worse" instructions in specific cases for 64 bit architecture?
Maksee is offline   Reply With Quote
Old 23rd December 2009, 16:52   #7  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Decoders are highly optimized code, in order to provide good playback performance. And the best performance is still achieved with hand-optimized assembler code. Even the best compilers with all their fancy auto-optimizations can't generated code that is as fast as a hand-optimized code written by one of the assembler gurus. However assembler code written for the x86 architecture -- and 99% of all assembler code written for PC software in the last three decades was developed for x86 -- doesn't run on amd64 (aka "x86-64") automatically. So when we built a software for amd64 instead of x86, we must either port all the assembler code to amd64 manually -- which may be a though task and a lot of work -- or we simply disable all the assembler code that won't run on amd64 yet. Disabling the assembler code means that we fall back to the plain C code, which will be much slower than the highly-optimized assembler code, even if compiled for amd64.

BTW: It is correct that all "instructions" of x86 are still available on amd64, but the ABI (Application Binary Interface) has changed significantly between 32-Bit and 64-Bit - at least on the Microsoft Windows platforms. As far as I know, this is one major reason why assembler code written for x86 cannot be ported to amd64 easily. Furthermore "inline assembly" is no longer supported by MSVC for 64-Bit, which means that all existing inline assembly must be disabled/replaced when compiling amd64 binaries with MSVC. That's another huge pitfall for 64-Bit performance, when porting existing applications...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 23rd December 2009 at 17:53.
LoRd_MuldeR is offline   Reply With Quote
Old 23rd December 2009, 16:57   #8  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
Furthermore it doesn't necessarily work across operating systems either. From what I read here 64bit assembly written for linux won't work on windows without changes and vice versa.
nurbs is offline   Reply With Quote
Old 23rd December 2009, 17:01   #9  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by nurbs View Post
Furthermore it doesn't necessarily work across operating systems either. From what I read here 64bit assembly written for linux won't work on windows without changes and vice versa.
That's also because of Microsoft Window's weird 64-Bit ABI (Application Binary Interface), which apparently is very different from the rest of the world
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 23rd December 2009, 20:30   #10  |  Link
Maksee
Registered User
 
Join Date: Aug 2008
Posts: 4
Quote:
Originally Posted by LoRd_MuldeR View Post

BTW: It is correct that all "instructions" of x86 are still available on amd64, but the ABI (Application Binary Interface) has changed significantly between 32-Bit and 64-Bit - at least on the Microsoft Windows platforms. As far as I know, this is one major reason why assembler code written for x86 cannot be ported to amd64 easily.
You're probably right, even though documents like Optimizing Applications on 64-bit Windows for AMD64 ... promises very much (easy, faster and so on), I think that reality bites. I like a very short sentence in this document about the fact that MMX extensions no longer works, SSE and up only supported. MMX itself indeed is very old, but if one once made some optimization and it suddenly no longer works, it is much easier to disable optimization whatsoever
Maksee is offline   Reply With Quote
Reply

Tags
64bit, mpc-hc, mpeg

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 20:07.


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