Jump to content

Latest-ish MPC-HC ported for XP


Recommended Posts

Posted
On 9/8/2024 at 4:19 AM, Zorba the Geek said:

DXVA for h265 requires DirectX 11

Where do you get this from? DXVA2 is Vista native, the first release of Vista came out with DX10.0, but hardware acceleration works.

DX11 was added to Vista a bit later, in the form of an optional patch. Power DVD minimum requirements for  hardware acceleration is Vista SP1.


Posted
On 9/8/2024 at 2:41 AM, Zorba the Geek said:

By "work" I mean hardware accelerated GPU processing. 

Nvidia drivers are a closed source software, kept in secret. For XP one would need to write new portions of code and insert into them. Not possible at this stage, unless you have a mate working at nVidia to leak the drivers.

 

Posted
On 9/8/2024 at 2:41 AM, Zorba the Geek said:

Using the Lentoid h265 decoder for CPU processing of h265 is a bit too demanding for my Core2Duo CPU, although it is watchable.

Lentoid h265 decoder, I tried it in the past on a very old Quad (LGA775, made 15 years ago or more) XP era, I don't exactly remember the model, it was something like Q8400, or so.

Very poor result, miserable, unwatchable. Skipping frames.

Posted

to call it out more precise regarding the "normal" "classical" "opcodes"
every cpu on a 4x86/or newer then a "486 cpu" has certain command s (that useally can solve already anything)
this means whatever the hardware can do, you can write in these commands
(also 64 bit movements or even more bits - 1 topic for that would be dietmars 486 on xp topic)
the same also goes for 64 bit commands or logical units


the main CPU is very busy but and has a lot of side code to solve 
in the past you had like lets say 100 mhz what are 100 million ticks * 32 bits (by far enough for a RGB buffer 1920*1080p) (because they where barly side stuff)

over this run the OS, other running stuff, many side code + your encoder/decoder

to do now the job with classical CPU commands/opcodes/whatever we call them
takes a lot more time 
(thats why with the hardware acceleration the speed is boosted like 1-500 times)
with normal opcodes and a lot of engines and stuff (os, background activity ect.) 
this goes a lot slower

the encoder/decoder for the winxp heic en/decoder without hardware acceleration only use normal cpu commands!


you rather would have a chance if you specific write all the routines in pure assembly
to speed that up 
but thats a lot of work ... - and we have mmx,sse/version XXX, avx (those are partly even written in assembly in small pieces)


at some point me and a few friends came up with the idea what video player might can be used for XP
i called out ffplay one of the others was MPC-HC (this one from this thread)
mpc-hc used to be relativ self contained - but when vista apeared mpc-hc gone into the wrong direction
it used up a lot of engines and stuff (multiple times) -> (like a lot new apps do)     (and before you just needed to add a certain codec -> works -> good to go)
those take a lot of CPU power too - thats why a lot of new stuff with similiar code is often a lot slower
there just to many engines and scripts that "should solve the stuff"

to also come out with this point lets say we have a RGB buffer with 8+8+8 = 24 (bits)

now we have 1920 * 1080 * 24 = 2´073´600 / 1 frame (common resolution at the moment, maybe 4k near future)

nows lets take 24 frames  2´073´600 * 24 = 49´766´400 - thats we we need for a smooth video (to mention also shortly you can take 24 pictures with 24 * 1/50 seconds record time)

now lets take a look back 32 bit * 2´000´000 = 64´000´000
2 million representing megahertz
already 2 mhz would pass the requied hardware if it was directly only to progress this 24 frames (and no kind of side stuff - ok maybe the encoder code - but thats the only one !)

in past times you rather had a more direct appraoch 
today you run through many engines, an entire OS
many parts get scripted up 
you didnt have that many engines, scripts, other codes and the OS before even anything happens in the past

so a hardware unit specific for a such thing needs a lot less hardware and even a lot less cpu power
then a common 4 GHZ * 4 (cores)(what is 4000 mhz) just running wildy anything - is what we useally today have

that means if you have a specific hardware unit it only do what it needs to do
also the logic will be fittet to whatever the software encoder/decoder do

you dont need to control any engines 
you dont need to control any windows api
you dont need a OS 
you dont need to control the window or read out the settings
you have no weird security clash that slows down your code
you special dont need a even bigger software (such as win11)
you dont have background software that runs in the background and takes your cpu power

thats why i pointed out just haveing a cpu inside a grafic card would with a programmable code, would rather just be like a next cpu
but actually today we have multiple cpus - so actually we could give a certain cpu this job(s) 

a next part from consideration is that software can be upgraded and maybe new functions got added
there are actually many SAO, GOP, CU, CABAC, BICUBIC and many other tricks

then you might even have a new codec such as the h.266 and directx11 or that hardware GPU would be outdated already (actually i didnt see real proofs that this codec is a lot better)
but they say so:
https://www.maketecheasier.com/h265-vs-h264/

then you would have a printed chip you cant change - the other way if its a own cpu + command set - then again i have a different meaning about the "just a extra cpu" then we just could use a own cpu too

also worth of mention is that the CPU´s cant just split up the work
its not as easy as it might sounds , often the result of the calculation before is needed
for example you cant split the work for pixel 1 into 1/2 pixels being done with cpu 1 and the other half with cpu 2 

what multiple cpu´s are good at, are in data movements because you can say "write me 50 % of this file in cpu 1 and the other 50 % with cpu 2"
if your file now is big enough so 1 cpu cant handle that anymore, 2 cpu´s will do that
if your network card however dont progress enough speed you still limited to what cpu 1 can do + the network speed limit can shrink the speed downwards again


but everything aside - what speaks against FFPLAY ? it has more new stuff also it support a wide spectrum of codecs
FFPLAY is engine"ish" but maybe it would be a candidate ...


software actually looks better in some youtube examples :
https://youtu.be/5rgteZRNb-A?t=72

however i dont know how that hardware encoder progresses itself - is it a own cpu ? is it a hardware chip that has hardware units specific for that h266 codec ? do it use a fast setting (for example to have a continious picture over 24 frames/s?)
 

1 more thing in 1 example someone somewhere compared heic with medium setting vs best (slowest) (h266) setting
if not the best setting is used the compare might be useless - we could make a compare medium vs placebo and placebo would win - somehow this dont make sence

 

regarding placebo - yes it improves the pixels a bit - special when challenged to a smaller file size (i looked at that results)

 

Posted
5 hours ago, Dixel said:

And what about the standard 8-bit H265? Some time ago I found a 780 Ti in the dumpster, the checkmarks correspond to what it supports in the terms of hardware acceleration.

But it's on Vista, I didn't try on XP. Driver version 348.01 (HP Elite).

No, h265 is not supported in Win XP in any form, probably they just didn't add support to the driver.

5 hours ago, Dixel said:

Where do you get this from? DXVA2 is Vista native, the first release of Vista came out with DX10.0, but hardware acceleration works.

Maybe he means that h265 requires DXVA2, which Win XP doesn't have either.

Posted (edited)
11 hours ago, ED_Sln said:

No, h265 is not supported in Win XP in any form, probably they just didn't add support to the driver.

Maybe he means that h265 requires DXVA2, which Win XP doesn't have either.

do you might know why this is the case ? do that directx 11 these en/decoding routines somewhere in its modules ?

or lets ask it like this how do it solve the h265 codec, like where and how 

 

 

also they say the classical h265 is already outdated:

https://youtu.be/MtX0t6fY0uM?t=197

.AV1 (aom h265/or SVT h265) passed hevc in this video - HOWEVER ! that guy didnt use the best settings he can use - that rather disqualify that comparision

 

however the next video is also from consideration:

https://www.youtube.com/watch?v=5rgteZRNb-A

here you can clearly see that NVENC (Nvidia NVENC h265 en/decoder). lacks very behind 

if its a hardware print aka like a CPU it cant be changed - the other to say it again is just a other CPU if thats the case (but here again why would you then just not use a other core from your own cpu)

 

 

 

in the other case the winxp heic en/decoder de/encodes h265 either with normal cpu command or mmx,sse or avx - that should be by far enough speed 

so to me it seems a very solveable question for that video player 

 

why nobody just copy paste the decode routines mmx-avx512 to make that happen ?

these are open source at x265.com

also the winxp hevc en/decoder proofs that this can be done , it actually decodes and encodes h265 

 

little add: 

https://www.youtube.com/watch?v=Vl04U-SGUSY

here somebody made a comparision hevc vs h266 

you sadly dont see its settings , but if this is true hevc is better (and probaly faster, because h266 takes a lot of time to encode)

 

in this one you can see the settings:
https://www.youtube.com/watch?v=etKLNu19iIU

h265 veryslow and h266 medium
that gives h266 a disadvantage ... 
however veryslow did encode that video in 10 second while h266 with "medium" took 36 seconds

the video itself gives a clear winner it´s the h265 but a must say is that h266 wasnt with the best settings

also you can see is that the h266 encoder is a lot slower (if the quality would give me the reward i would accept a longer encode time but)

Edited by user57
Posted
21 hours ago, user57 said:

encoder

The OP specifically asked about decoding, not encoding. His GPU obviously lacks NVENC anyways.

Posted (edited)
On 9/9/2024 at 1:01 AM, ED_Sln said:

No, h265 is not supported in Win XP in any form, probably they just didn't add support to the driver.

Maybe he means that h265 requires DXVA2, which Win XP doesn't have either.

You mean he can't see any video output at all? But it should play using only the CPU!

Edit.

Probably his output colour is limited, so he needs to choose 8bit colour depth videos only. 

Edited by Dixel
Posted
On 9/8/2024 at 9:32 PM, user57 said:

 

regarding placebo - yes it improves the pixels a bit - special when challenged to a smaller file size (i looked at that results)

x265 10 bit tends to suppress film grain, H265 8bit tends to over-saturate videos a lot. AV1 tends to over-contrast videos a lot.

Posted

BTW, the development of MHC-HC is ruined, by my personal opinion, the author gets vision problems, with each and every new version, it gets brighter, more contrast, etc.

Posted

well i do not want to offer to do the work because its a lot to read and write out


but someone certainly could do the job right : 

first he has to read out the CPU commands available

that x265 has solved that the right way

it goes to check MMX, SSE, SSE versions 2, 3, 4, 4.2. also AVX and AVX512
those are all the same by the way (its are always the same registers (XMM)- they just got extended and got new names)

it is done via CPUID command 


i dont want to post the entire code because it takes to many space heres is a small view (its open source):

    PFX(cpu_cpuid)(1, &eax, &ebx, &ecx, &edx);
    if (edx & 0x00800000)
        cpu |= X265_CPU_MMX;
    else
        return cpu;
    if (edx & 0x02000000)
        cpu |= X265_CPU_MMX2 | X265_CPU_SSE;
    if (edx & 0x04000000)
        cpu |= X265_CPU_SSE2;
    if (ecx & 0x00000001)
        cpu |= X265_CPU_SSE3;
    if (ecx & 0x00000200)
        cpu |= X265_CPU_SSSE3 | X265_CPU_SSE2_IS_FAST;
    if (ecx & 0x00080000)
        cpu |= X265_CPU_SSE4;
    if (ecx & 0x00100000)
        cpu |= X265_CPU_SSE42;


the next part is then about what cpu we are on and what we use 

if he has normal cpu commands he use normal CPU commands ... (slow) (but then you are on a machine that is older then a 233 mhz cpu !)

if the code has MMX the code use MMX
if the code has SSE the code use SSE
if the code has AVX the code use AVX

thats about the right way to write a decode routine 
and fills all the caps between normal up to AVX512

so someone actually has to write the entire decoder out (rather then use some engines, DX11 for example is also a engine, DXVA2 also sound engine-ish to me, in my opinion any kind of extra-modules are engine-ish) 
and it should do the job because the encoder (what is even a lot slower) gone from 10 mins to a few seconds (the decoder is a lot faster)
the speed increase was very big probaly even MMX would be a good, however that was somewhere in the 233 mhz area that might be not enough

but i think you guys get the point, if you have only 1 of this technolegys it might be enough
i cant tell the exaxct requiements because that need to write all of this code first ... 

it also raise the question who still have a MMX cpu, at least SSE2 should be out there as SSE1 is somewhere around 400 mhz
it really raise the question if a 400 mhz cpu (aka SSE 1.0) should even still be around that much

i would say at least SSE2 should be around

if not it would be detected what the CPU actually support and what not 
 

france made the same mistake he always told me like if there is no way to do this without having a engine or hardware that says "i do this"

that is kinda wrong ... 

it certainly can be done with normal cpu commands

to have a more deeper dig into, its are just logics that you actually can write in a c/c++ compiler

not all have to be in assembly or sse, in the open source x265 it are rather the cpu intense logics that are written in assembly code using mmx-avx512 - the rest is plain c/c++ code 

there is no engine , no dll/extra module , no directx requied 

a proof is that the winxp hevc en+decoder can do this without any dll , any engine and without directx

if you say what you made is just a picture, then  you might be wrong too - the question rather was oposite it was finding a good encoder for a image - where that "video-codec" then was used 

but a video always is made out of pictures - so video-codec might not be a exact description 

also x265 is rather for video then for only pictures - as we see many videos and talk about this en/decoder

 

 

so enough talked 

first finding the supported cpu commands -> then use right commands that are available-> maybe some misc code to fix the rest of processing code -> then into a RGB buffer 

Posted
On 9/10/2024 at 12:07 AM, user57 said:

do you might know why this is the case ? do that directx 11 these en/decoding routines somewhere in its modules ?

or lets ask it like this how do it solve the h265 codec, like where and how 

There are no separate files for DXVA in the driver, apparently it is embedded in the driver itself.

 

On 9/10/2024 at 12:07 AM, user57 said:

also they say the classical h265 is already outdated:

AV1 and h266 require a much more powerful processor to playback, but usually, if Win XP is installed, the processor on such a computer is quite weak. And AV1, h266, VVC, they are all designed for streaming video, they have much less fine-tuning than h264 and h265, they blur the video more, there is more loss in dynamic scenes, and the main thing is that it takes many times longer to encode video.

On 9/10/2024 at 10:35 AM, Dixel said:

You mean he can't see any video output at all? But it should play using only the CPU!

I meant hardware acceleration, h265 is of course played using the CPU, so are all the new video formats.

On 9/10/2024 at 12:49 PM, user57 said:

if he has normal cpu commands he use normal CPU commands ... (slow) (but then you are on a machine that is older then a 233 mhz cpu !)

if the code has MMX the code use MMX
if the code has SSE the code use SSE
if the code has AVX the code use AVX

Decoders and encoders work like this, they use the most supported instructions from the set of possible instructions, it's just that for newer codecs, the minimum may be SSE4.

Posted

I checked the hardware acceleration on a GTX950 in WinXP using LAV. CUVID is indeed there and it works, but with h265 and VP9 there are problems, the video opens and hardware acceleration works, but the video is scattered into many artifacts, it is impossible to watch it, so actually only h264 works, no problems with it even in 4k. But CUVID only supports Nvidia GT630 and newer graphics cards, so the use is very limited. But those who have suitable video cards will be able to get hardware acceleration back on ported versions of MPC-HC and MCP-BE, where there is no VMR.

spacer.png

Posted
15 hours ago, ED_Sln said:

I checked the hardware acceleration on a GTX950 in WinXP using LAV. CUVID is indeed there and it works, but with h265 and VP9 there are problems, the video opens and hardware acceleration works, but the video is scattered into many artifacts, it is impossible to watch it, so actually only h264 works, no problems with it even in 4k. But CUVID only supports Nvidia GT630 and newer graphics cards, so the use is very limited. But those who have suitable video cards will be able to get hardware acceleration back on ported versions of MPC-HC and MCP-BE, where there is no VMR.

spacer.png

What about the ancient VC1? GT950 doesn't support it, or it's XP's fault?

Posted
On 09 September 2024 at 1:55 AM, Dixel said:

Lentoid h265 decoder, I tried it in the past on a very old Quad (LGA775, made 15 years ago or more) XP era, I don't exactly remember the model, it was something like Q8400, or so.

Very poor result, miserable, unwatchable. Skipping frames.

Maybe you should try the Lentoid decoder again on your current Pcs, and share the results with us. When using it with my low power Core2Duo setup the statistics panel in MPC-HC showed no dropped frames, although it was not as smooth as I would like.  Others following this topic should give it try and report back.

Possibly the only option for XP users is to use a PC with the highest performance CPU whose drivers can be installed under XP and do h265 video decoding entirely through software.  Does anyone know what is the highest spec CPU that can be installed under XP?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...