Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need For Speed: Shift - FMVs and Cutscenes are broken #14645

Open
Back2Life888 opened this issue Jul 26, 2021 · 9 comments
Open

Need For Speed: Shift - FMVs and Cutscenes are broken #14645

Back2Life888 opened this issue Jul 26, 2021 · 9 comments
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Milestone

Comments

@Back2Life888
Copy link

What happens?

Cutscenes/FMVs are now broken. Back then, it works very nicely. Now it has some glitches.
Here is a footage.
https://user-images.githubusercontent.com/76780043/126932767-4414937a-e404-405a-9df0-d7ebbfe2b33b.mp4

What should happen?

The glitches shouldn't occur.

Include a GE frame capture

It happens for a split second making it impossible to record.

What are you using?

What hardware / device and operating system?

What graphics card (GPU) or mobile phone model?

GTX 1650
i7-6700

What PPSSPP version (standalone/official), and did it work before?

As far as I recall, its 1.6 I think.

Which game or games?

Need For Speed: Shift (ULUS10462)

Graphics backend (Vulkan, OpenGL, etc.)?

I tested D3D11 and Vulkan. Glitch occurs.

@bslenul
Copy link
Contributor

bslenul commented Jul 27, 2021

Seems to have started with 0b64d58?

Here's how the opening logos look in 1e5e0e2 (previous commit):

ppsspp_good_edit.mp4

And then in 0b64d58:

ppsspp_bad_edit.mp4

@hrydgard
Copy link
Owner

Hmm .. fyi @shenweip

@hrydgard hrydgard added this to the v1.12.0 milestone Jul 27, 2021
@hrydgard hrydgard added Networking / adhoc PSMF / MPEG Issue involves scePsmf or sceMpeg video playback. and removed Networking / adhoc labels Jul 27, 2021
@Back2Life888
Copy link
Author

Im pretty sure this will be easy to fix. This is a regression. Regressions take less time to fix as Henrik could just look into older builds and transfer the code to the newer version. Right??

@samosaphile
Copy link

Yea, just to confirm, this is happening on android aswell. Both on vulkan and ogl. Tested on 1.11.2-432 and 1.11.3-842. Quite an old issue actually. Supprised it hasn't been brought up earlier, thanks for posting it.

@unknownbrackets
Copy link
Collaborator

0b64d58 (v1.10.3-1209-g0b64d58c7) fixed a typo in a recent change. If it was working for several versions before that, it might actually be that change which did it rather than the typo fix (which might've accidentally caused the breakage to be visible.)

Simply reverting that change would break #8526 again. The original change might've been #13659 or #13663.

It's also possible this was "accidentally working" before, and it's just another bug that was never fixed before, hidden by the bug fixed by the above changes.

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.12.0, Future-Prio Aug 29, 2021
@sum2012
Copy link
Collaborator

sum2012 commented Sep 26, 2022

TheFMV Problem is cause by these (decode error)
0:22:136 user_main W[ME]: HLE\sceMpeg.cpp:1527 sceMpegRingbufferPut clamping packetsAdded old=56 new=44
40:23:806 user_main I[ME]: HW\MediaEngine.cpp:87 FF: cabac decode of qscale diff failed at 18 11
40:23:807 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 18 11, bytestream 3481
40:23:841 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 18 0
40:23:842 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 18 0, bytestream 21695
40:23:843 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 19 1, bytestream -21
40:23:907 user_main I[ME]: HW\MediaEngine.cpp:87 FF: left block unavailable for requested intra mode at 0 12
40:23:907 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 0 12, bytestream 2688
40:23:938 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 7 0
40:23:939 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 7 0, bytestream 4086
40:23:971 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra mode at 8 0
40:23:972 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 8 0, bytestream 8549
40:24:242 user_main W[ME]: HLE\sceMpeg.cpp:1527 sceMpegRingbufferPut clamping packetsAdded old=84 new=76
40:25:512 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 24 15, bytestream -24
40:25:544 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra mode at 7 0
40:25:544 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 7 0, bytestream 21935
40:26:106 user_main W[ME]: HLE\sceMpeg.cpp:1527 sceMpegRingbufferPut clamping packetsAdded old=72 new=60
40:26:150 user_main I[ME]: HW\MediaEngine.cpp:87 FF: left block unavailable for requested intra4x4 mode -1 at 0 11
40:26:150 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 0 11, bytestream 2768
40:26:908 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 10 4, bytestream -29
40:26:941 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 29 0
40:26:941 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 29 0, bytestream 6201
40:26:976 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra mode at 19 0
40:26:976 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 19 0, bytestream 5270
40:27:007 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 20 0
40:27:007 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 20 0, bytestream 6312
40:27:075 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 5 0
40:27:075 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 5 0, bytestream 2122
40:27:104 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 11 9, bytestream -14
40:27:104 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 6 0
40:27:104 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 6 0, bytestream 4796
40:27:104 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra mode at 4 0
40:27:104 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 4 0, bytestream 4541
40:28:378 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 2 5, bytestream -22
40:28:479 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 15 0
40:28:479 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 15 0, bytestream 6308
40:28:510 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 3 0
40:28:510 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 3 0, bytestream 9074
40:28:545 user_main I[ME]: HW\MediaEngine.cpp:87 FF: top block unavailable for requested intra4x4 mode -1 at 18 0
40:28:545 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 18 0, bytestream 21695
40:28:545 user_main I[ME]: HW\MediaEngine.cpp:87 FF: error while decoding MB 10 0, bytestream -11

@anr2me anr2me mentioned this issue Dec 9, 2022
5 tasks
@ahmadyogi543
Copy link

Is there any update on this?

@DavidAriyan
Copy link

Still happening on newest android build. I thought the iso was bad.

@nckstwrt
Copy link

Can't work this one out - worst hack in the world is changing if (!useRingbufferPutCallbackMulti) to if (!useRingbufferPutCallbackMulti || ringbuffer->packets == 320) (Because NFS:Shift is using 320 packets rather than 512 packets like Xyanide - Resurrection or 256 like Jeanne D'Arc).

My awful guess is that NFS: Shift isn't using packet sizes of 2048 - but instead is using 2152 (which is common in MPEG-2 Transport Streams). When InitRingbuffer is called for NFS: Shift if you divide the size / packets you'll get 2152. For the other games I've tried - you'll get 2048. Could be utterly wrong of course :)

Not sure of a perfect fix for this - but can't find any other current complaints about video playback. So NFS: Shift might be an oddity. Will take another look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Projects
None yet
Development

No branches or pull requests

9 participants