Commit graph

61 commits

Author SHA1 Message Date
Pedro Montes Alcalde
4a14d546ba
Tick Tick Tick, thats the sound of 2024 flying by (#3503) 2025-01-19 18:51:43 -03:00
nishinji
048e83c262
vita3k: Use hex for error codes (#3387)
* vita3k: Use hex as it is preferred in error codes

* vita3k: Fixed small mistakes
2024-09-25 00:31:28 +02:00
Saturnsky
2cf413955f
modules/SceJpeg: Improve JPEG decoding accuracy (#3380) 2024-09-25 00:05:36 +02:00
scribam
77abeaa167
vita3k: More cleanup (#3379)
* vita3k: Use C++17 nested namespace definition

* vita3k: Remove redundant call to c_str()

* vita3k: Prefer C++ header

* vita3k: Use structured bindings

* shader: Add explicit fallthrough

* vita3k: Cleanup headers and dependencies

* util: Add WIN32_LEAN_AND_MEAN before <Windows.h>

* modules: Remove redundant 'const' specifier on a constexpr variable

* modules: Remove redundant return statement at the end of a function with a void return type

* clang-format: Use C++20 standard

* vita3k: Insert new line at EOF

* host: rename filesystem.hpp to filesystem.h
2024-09-18 21:48:08 +02:00
SaturnSky
f51cdf1b35 modules/SceJpeg: Implement MCU-based decoding and pitch calculation 2024-09-10 22:03:02 +02:00
scribam
612d1f8d81
vita3k: cleanup (#3357)
* module: add missing pragma once

* cmake/vita3k: delete unused files

* vita3k: delete useless semi-colons

* vita3k: cleanup headers

* audio: add missing override to destructors

* vita3k: fix typos

* external: disable unused curl targets
2024-09-02 13:03:58 +02:00
Macdu
d600229820 codec, modules/SceAudio: Implement bit rate value 2024-06-22 13:47:40 +02:00
nishinji
584e1f172f vita3k: Minor optimize, code refactor
Co-authored-by: GermanAizek <GermanAizek@yandex.ru>
2024-05-21 23:42:57 +02:00
bookmist
1fda880a94 vita3k: big code cleanup
Improvements
* lang: a bit more verbose error on wrong lang xml

Bugfixes
* kernel/sync_primitives: fix theoretically possible AV
* modules/SceAudio: a bit more correct sceAudioOutSetConfig
* fix wrong objects initialisation ({0} -> {})

Warning fixes
* clang warning: Macro argument should be enclosed in parentheses
[bugprone-macro-parentheses]
* modules: set unsigned type for Sce*ErrorCode enums
* clang warning: variable might be not be initialized
* clang warning: Function returns by const value. Consider returning by non-const value instead.
* clang warning: Prefer transparent functors [modernize-use-transparent-functors]

Refactoring
* io/device: move functions implementation from .h to .cpp file
* vita3k: fix fs::path usage
* clang warning: 'if' statement is unnecessary; deleting null pointer has no effect
* vita3k: use structured bindings and references in for-each-loops
* vita3k: simplify container operations, extract frequent operations to utility functions
* clang⚠️ 'contains' member function can be used
* kernel/sync_primitives: refactoring. drop unused parameter of handle_timeout
* vita3k: drop unused function parameters

* vita3k: fix typecasts
use static_cast instead of reinterpret casts if possible
use correct constants (1/1.0/1.0f)
correct variable types to minimise typecasts
use explicit typecasts (not everywhere)
replace c-style typecasts to c++ style typecasts (not everywhere)
* clang warning: remove redundant typecasts
* clang warning: Cast drops const qualifier

Optimisation
* vita3k: remove unused includes
* clang warning: Constness of returning variable prevents automatic move
[performance-no-automatic-move]
* clang warning: String concatenation results in allocation of unnecessary temporary strings
[performance-inefficient-string-concatenation]
* vita3k: use std::move
* vita3k: optimization. push_back -> emplace_back
* vita3k: fix datatypes to avoid unnesessary conversions
* clang warning: remove unneeded string->c_str->string conversion
* clang warning: The parameter is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
* clang warning: 'find' called with a string literal consisting of a single character
[performance-faster-string-find]
* clang warning: Result of a postfix operator is discarded, consider replacing it with a prefix operator
* clang warning: Pass value parameters by const reference

Code cleanup
* io/io: remove once used variables
* net/posixsocket: remove struct keyword
* vita3k: use raw string literals to avoid excessive escaping
* vita3k: refactoring. replace Ptr<> to pointer in Sce functions
* vita3k: drop unused variables and incorrect comments
* clang warning: readability-inconsistent-declaration-parameter-name
* clang warning: Extra ';' after member function definition
* clang warning: Possible misuse of comma operator (, is used instead of ;)
* clang warning: Algorithm accepting an iterator and a count can be used
* clang warning: Declaration and assignment can be joined
* clang warning: Type trait can be simplified using a template alias or a variable template

* vita3k: cleanup class methods
remove unimplemented (and obviously not used) methods
move deleted methods to public
change empty body to =default
remove auto constructors
set member default values
2024-03-18 15:44:56 +03:00
bookmist
6ce9b6598e vita3k: some minor bugfixes
kernel/thread: fix possible crash in log_stack_traceback
modules/SceLibKernel: more correct sceClibSnprintf
kernel/load_self: fix possible crash on incorrect library modules. load process params from first loaded module (eboot.bin) only
modules/SceGxm: fix crash if display_thread not found
kernel/debugger: remove direct access to mem.memory to support memory mapping more complete
vita3k: remove direct access to kernel.threads (it's not thread-safe)
vita3k: implement and fix virtual destructors for class hierarchies to prevent memory leaks (except screen_filters)
clang-tidy warning: Constructing string from nullptr is undefined behaviour
clang warning: use after std::move
2024-02-12 20:21:40 +03:00
Pedro Montes Alcalde
34565e3ef4
Vita2024K: Happy 2024 2024-01-01 12:36:32 -03:00
Macdu
5ed4c52449
codec, renderer: Improve YUV format implementation (#3114) 2023-12-15 00:12:17 +01:00
SaturnSky
c571602e53 modules/sceJpegEncUser: Improve JPEG encoding more strictly
- Fixes issue where sceJpegEncoderEncode would generate a still MJPEG instead of a JPEG
- Implement the behavior of sceJpegEncoderSetCompressionRatio
2023-06-26 12:47:07 +02:00
Zangetsu38
2e94f73d51 SceVideodec: set res of sceAvcdecDecode.
- should fix video resolution in lego game
- remove memset to 0 on last frame in sceAvcdecDecodeStop, should fix green screen regression.
2023-06-22 15:19:42 +02:00
Macdu
1dd62b23fe ngs: Save Atrac9 decoder state 2023-06-22 09:23:02 +02:00
SaturnSky
5fd9bf9dc5 modules/sceJpegEncUser/sceJpegEncoderCsc: Fixed issue when inPitch and width are different 2023-06-13 18:20:28 +02:00
SaturnSky
7268ca874c modules/sceJpegUser: Improved YUV format compatibility
- Improved compatibility for YUV420 and YUV422 formats
- Fix to handle color range of YUVs as full range
2023-06-07 00:17:42 +02:00
Saturnsky
d16f87c337
modules/sceJpegEncUser, codec: Implement stubbed functions (#2608)
- MJpeg and sceJpegEncoderSetValidRegion functions are not yet supported.
- Ignores the CompressionRatio parameter.
2023-05-28 16:07:31 +02:00
bookmist
4ba2e086cc Vita3K: code cleanup and optimisations 2023-05-10 15:31:55 +03:00
Zangetsu38
1812252ec4 modules/SceJpegUser: Implement sceJpegDecodeMJpeg function.
codec/mjpeg: Add support of format AV_PIX_FMT_YUVJ420P.
kernel: set variable paused_threads_status in private.

Co-Authored-by: 1whatleytay <32211852+1whatleytay@users.noreply.github.com>
2023-05-08 15:16:00 +02:00
Dubrova Dzmitry
58b963e1a5
audio: Fix assertion in AacDecoderState::receive (#2560) 2023-05-07 13:34:53 +02:00
Macdu
fa3fc073a7 codec: Initialize SwrContext to nullptr 2023-04-13 12:38:52 +02:00
Macdu
82ca4b6614 external/codec: Update ffmpeg 2023-04-13 12:03:40 +02:00
CoffeeBrewer64
75a6bf0d86
Typo fixes #2475 2023-04-06 23:04:05 +02:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00
bookmist
8edd333400 Fix compiler warnings 2022-11-16 21:39:55 +03:00
Macdu
086c6f9515
codec, ngs: Fix race condition with swr and adpcm history (#1946) 2022-07-12 23:31:43 -03:00
Zangetsu38
c2044c3ce4 vita3k: Add vita3k update.
- small improvement on update script.

Co-authored-by: EXtremeExploit <pedro.montes.alcalde@gmail.com>
Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
2022-07-08 01:11:22 +02:00
korenkonder
4c4adf1c46
audio: Fix ADPCM decoding (#1883) 2022-06-24 13:54:22 +02:00
Pedro Montes Alcalde
e8151664b7
cmake: Treat format-secutiry warnings as errors (#1667) 2022-06-12 01:03:43 -03:00
Macdu
d63db64fd3 modules/SceVideodec: Return one last frame when calling DecodeStop 2022-06-02 13:48:45 +02:00
Macdu
14cc5604b8 ngs: Fix player modules behavior 2022-05-24 16:59:22 +02:00
Macdu
617c1921df ngs: Fix broken Atrac9 2022-05-13 14:57:06 +02:00
Macdu
cc63c381ba modules/SceAudiodec: implement sceAudiodecClearContext 2022-05-12 00:48:55 +02:00
Macdu
ba48660859 codec: Fix Atrac9 2022-05-12 00:48:55 +02:00
Zangetsu38
b4e1297c7c codec/aac: fix crash when free frame. 2022-05-10 03:05:44 +02:00
Macdu
46d6a2cc0f modules/SceAudiodecUser: enable and fix AAC codec.
- codec: Fix aac stream audio and max es/pcm parameters.
2022-05-10 02:19:50 +02:00
Zangetsu38
80ce223c6c codec/decoder: remove configure. 2022-05-07 15:14:11 +02:00
bookmist
510e2ba86c codec/codec: refactoring 2022-05-06 23:40:12 +02:00
Zangetsu38
8f5b523da3 modules/SceVideodecUser: Add support to back res value of AvcdecDecode.
- should fix wrong resolution of video in few game (Street fighter, omega labyrinth, etc...)
2022-05-06 23:40:12 +02:00
Zangetsu38
b27f8b369f modules/SceVideoDecUser: Add pts/dts support.
- should fix video speed on some game when using lle.
2022-05-06 13:26:05 +02:00
Zangetsu38
7b74e00b07 modules/SceAudiodecUser: fix build when aac is enable.
- restore convert_f32_to_s16 function.
- Add two parameter from aac.
2022-04-30 15:56:38 +02:00
Taylor Whatley
1c1c71f143 codec: add aac decoder. 2022-04-30 01:21:20 +02:00
Taylor Whatley
d2b0b53964 codec: add error names 2022-04-30 01:21:20 +02:00
bookmist
c45c274825 ngs/atrac9: fix sound bug when playing mono atrac9 sound 2022-02-23 16:15:20 +01:00
bookmist
775aced727 codec/pcm: fix intermediate buffer size calculation for adpcm decoder 2022-02-23 02:40:58 +01:00
bookmist
56a0c7bc72 codec/atrac9: output format now is signed short.
- sceAudiodecDecode need this format.
2022-02-19 18:04:14 +01:00
hobyst
a936a3a0a0 codec and ngs: Implement playback rate scaling 2022-02-11 18:06:53 +01:00
Larry
8c933e1432 codec: Use libatrac9 library for atrac9 decoding
We have more control and error codes, also avoid some shortcoming of
ffmpeg port
2021-12-01 16:54:17 +01:00
hobyst
168dfb19ca Add license notice on source files which didn't have one
- Also updated the copyright notice year on all files to 2021
2021-08-19 23:14:27 +02:00