Commit graph

108 commits

Author SHA1 Message Date
Megamouse 2c03467eec cellVdec: improve logging a bit 2022-04-24 17:39:49 +02:00
Megamouse b67cda7cbb cellVdec: add handle to more log messages 2022-04-24 17:39:49 +02:00
Megamouse fb27ed4deb libav: remove deprecated option refcounted_frames
According to fe85afbf8c/doc/APIchanges (L743)
this option is deprecated and obsolete for the newer send/receive logic.
Should fix runtime exceptions with newer ffmpeg versions.
2022-04-24 11:05:22 +02:00
Megamouse 8acb62f6ee HLE: simplify some error formats 2022-04-22 20:56:21 +02:00
Megamouse f42e647430 cellVdec: use av_error_to_string 2022-04-21 22:22:33 +02:00
Megamouse 7c65c1e3aa cellVdec: Remove irritating while loop 2022-04-21 22:22:33 +02:00
Megamouse 9f51003366 cellVdecGetPicture and cellVdecGetPictureExt swap
This fixes a possible issue with the error handling order.
2022-04-21 22:22:33 +02:00
Megamouse 512eb93a62 cellVdecDecodeAu: fix param check 2022-04-21 22:22:33 +02:00
Megamouse 9c919db9ae cellVdec: fix out format line offsets
Fixes video output in Uncharted 2
2022-04-21 22:22:33 +02:00
Megamouse 61ada2c1dc cellVdec: call av_dict_free 2022-04-21 22:22:33 +02:00
Megamouse bd5bff321e cellVdecDecodeAuEx2: some REd guesswork 2022-04-21 22:22:33 +02:00
Megamouse ee3a302cf2 cellVdecDecodeAu: add codec type check 2022-04-21 22:22:33 +02:00
Megamouse fb3752a8ef CellVdecDivxSpecificInfo2 (who knows if this is correct...) 2022-04-21 22:22:33 +02:00
Megamouse 548b748f50 CellVdecPicAttr 2022-04-21 22:22:33 +02:00
Megamouse 771009f333 cellVdec: add more error logging 2022-04-21 22:22:33 +02:00
Megamouse db731d307e CELL_CODEC_PTS_INVALID, CELL_CODEC_DTS_INVALID 2022-04-21 22:22:33 +02:00
Megamouse c6f3f386df cellVdec: implement CELL_VDEC_ERROR_SEQ 2022-04-21 22:22:33 +02:00
Megamouse d8bbec9594 libav: log more error codes as string 2022-04-21 08:10:01 +02:00
Nekotekina 065ee621b8 Call avcodec_register_all in case of old ffmpeg
Apparently it's still possible to break without it.
2022-01-24 22:39:01 +03:00
Jan Beich 511ca82e30 cellAVdec: constify AVCodec for ffmpeg >= 5.0
rpcs3/Emu/Cell/Modules/cellAdec.cpp:325:12: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
                        codec = avcodec_find_decoder(AV_CODEC_ID_ATRAC3P);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rpcs3/Emu/Cell/Modules/cellAdec.cpp:331:12: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
                        codec = avcodec_find_decoder(AV_CODEC_ID_MP3);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rpcs3/Emu/Cell/Modules/cellVdec.cpp:143:12: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
                        codec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rpcs3/Emu/Cell/Modules/cellVdec.cpp:148:12: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
                        codec = avcodec_find_decoder(AV_CODEC_ID_H264);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rpcs3/Emu/Cell/Modules/cellVdec.cpp:153:12: error: assigning to 'AVCodec *' from 'const AVCodec *' discards qualifiers
                        codec = avcodec_find_decoder(AV_CODEC_ID_MPEG4);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-01-21 21:36:17 +03:00
Eladash 65c9cd99cd Patches/PPU: Implement HLE/LLE/With-TOC function call patches
Example patches:
  [ jumpf, 0x12340, "cellGcmSys:cellGcmSetFlip"] // Places a call to cellGcmSetFlip at 0x12340
  [ jumpf, 0x12340, "cellGcmSys:0xDC09357E"] // Same, using FNID
  [ jumpf, 0x12340, 0x2345678 ] # Function OPD based call eading OPD at 0x2345678
2021-09-26 20:49:57 +03:00
Megamouse 0525070898 remove deprecated avcodec_register_all
We already use newer avcodec code anyway.
2021-09-06 10:00:34 +02:00
Megamouse a2da525064 cellVdec: silence "Unsupported time_base" error log spam 2021-05-29 12:46:21 +02:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina 038148bf06 Fix almost all GCC warnings 2021-02-17 22:59:04 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Nekotekina d0126f0fa0 Fix freezes in HLE Vdec and SPU LLVM precompilation.
Freezes could accidentally occur on close or ingame.
Deprecate range-for loop on lf_queue.
This is a part of PR #9208

Co-authored-by: Eladash <elad3356p@gmail.com>
2021-02-01 19:14:01 +03:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Megamouse 36159c2bd4 Add comment for deprecated avcodec_register_all
Apparently this is now done automatically and doesn't even need to be called at all
2021-01-08 14:36:49 +03:00
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
scribam f37adc4188 Add fallthrough attribute 2020-04-14 17:06:58 +03:00
Eladash 7e224c5585 cellVdecClose: Followup fix to #7663
Avoid executing sys_interrupt_thread_disestablish on different ppu thread with the same ID.
2020-03-16 21:06:33 +03:00
Eladash c16124f0d9 idm: Fix minor race in cellVdecClose, sys_raw_spu_destroy...
Because of racing removal of IDs vs the shared pointer owned object
2020-03-14 18:30:14 +02:00
Nekotekina 1dc2eb1cc8 Avoid deprecated av_register_all with version check. 2020-02-23 20:58:02 +03:00
Emmanuel Gil Peyrot 1a702de9e4 cellVdec: replace deprecated ffmpeg function
avcodec_decode_video2() is deprecated, now replaced with
avcodec_send_packet() and avcodec_receive_frame().
2020-02-23 20:21:59 +03:00
Nekotekina f1241c572c Fix some deprecation warnings (plunder cellAdec btw) 2020-02-23 20:21:59 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Eladash 49e11b7cfd cellVdecQueryAttrEx: Add some error checks for MPEG2 2020-02-05 05:01:07 +00:00
Eladash 6a32ceaab5 cellVdecQueryAttrEx: Add workaround for codec specific info 2020-02-05 05:01:07 +00:00
Eladash acc7320cae Fix cellVdecGetPicItem
Fix potential overflow, race condition and correctness fixes for picInfo_addr
2020-02-05 05:01:07 +00:00
Eladash e57c01907e cellVdec: Improve cellVdecQuery and cellVdecOpen 2020-02-02 09:01:32 +03:00
Eladash 949cfa7fdb Fix cellVdecSetFrameRate error check 2020-01-21 16:45:41 +03:00
Megamouse 5ef3465f65 cellVdec: (experimental) allow AV_PIX_FMT_YUVJ420P 2020-01-20 00:33:25 +01:00
Megamouse 9a27cc9442 cellVdec: improve error checks 2020-01-20 00:33:25 +01:00