Commit Graph

384 Commits

Author SHA1 Message Date
libretroadmin
7ebab640d7 Cleanups/style nits 2023-02-23 13:15:14 +01:00
gouchi
df5f8df7ea
Enable RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME for libretro-video-processor (#14969) 2023-02-12 18:10:29 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
Rany
7b09cb2de4
Fix runtime error in FFmpeg core when build with FFmpeg n5.1.2 and OpenGL ES (#14710)
* include libavcodec/version.h in video_buffer.h

Without this header video_decoder_context_t may be defined as different structure
in video_buffer.c and ffmpeg_core.c

* Fix the wrong data pointer for glTexImage2D when OpenGL ES enabled
2022-12-08 12:45:07 +01:00
LibretroAdmin
a974cef001 (sinc resampler) Simplifications - call besseli0 directly instead of
through kaiser_window_function wrapper function - get rid of some unnecessary
sqrtf calls and such, some other small opts
2022-08-02 11:29:05 +02:00
Autechre
4c3a4d66df
Cxx buildfixes (#13803)
* CXX_BUILD buildfixes
* (D3D11) Buildfixes for CXX_BUILD
* (Linux/qb) Disable KMS for Linux when building for C89, headers use inline which is not
available for C89
2022-03-30 17:30:20 +02:00
Keith Bowes
bbfcecfab0
Fix building against FFmpeg 5.0 (#13611)
Co-authored-by: Maxime Gauduin <alucryd@archlinux.org>
2022-02-18 18:40:54 +01:00
Vladimir Serbinenko
f0d8af0d34
Remove gong now that it has been successfully extracted into a standalone core (#13637) 2022-02-18 17:03:35 +01:00
twinaphex
d4dbd677db (Dynamic dummy) Prevent recursive control path 2022-01-20 00:01:07 +01:00
Francisco Javier Trujillo Mata
1cd0938cc3
[PS2] Improve Compilation (#13359)
* Allow parallel compilation in PS2

* Allow to compile with griffin or common compilation in PS2

* Enable dummy core to be used in other platforms

* Use threads in YML config

* Add the compilation to PS2 in GitHub Actions
2021-12-15 19:01:56 +01:00
Mark W. Kidd
2b3dfeb10c standardize include path for config.h 2021-08-18 18:54:40 -04:00
twinaphex
1b4cbf3ed5 (ffmpeg core) Struct reordering, alignment 2020-08-16 04:23:15 +02:00
jdgleaver
0fcc5a784e (ffmpeg) Fix memory leak/struct member issue 2020-08-05 16:47:04 +01:00
jdgleaver
d36cd7037a (ffmpeg) Prevent seeking past the end of files (hang fix) 2020-08-04 17:21:18 +01:00
twinaphex
b6432cd8b4 (ffmpeg core) Use bitmasks 2020-07-14 01:27:19 +02:00
twinaphex
0a1942f528 Turn fifo_read_avail and fifo_write_avail into macros 2020-07-07 08:13:32 +02:00
twinaphex
7c3f227cab (ffmpeg) Cleanup 2020-07-06 10:19:48 +02:00
twinaphex
53797b15ce CXX_BUILD buildfix 2020-06-30 22:15:49 +02:00
jdgleaver
c48c26aff6 Add 'progress message' widget (for 'RETRO_MESSAGE_TYPE_PROGRESS' core messages) 2020-06-30 17:15:36 +01:00
twinaphex
968922e151 Fix static code analysis warnings 2020-06-29 21:24:32 +02:00
twinaphex
a00ab53ef6 Put fprintfs and printfs behind ifndef NDEBUG 2020-06-17 11:22:31 +02:00
twinaphex
b8c41812bf Move use_gl variable outside of the while loop 2020-06-05 16:53:28 +02:00
twinaphex
52e1c38cf1 Fix C89 variable declaration issue 2020-06-05 16:27:56 +02:00
Vladimir Serbinenko
1fcdddf579 Remove manual MSB_FIRST definitions and switch to retro_endianness.h 2020-04-21 04:16:55 +02:00
Nils Hasenbanck
baf065b789 Fix crash on seeking when using HW decoding in some cases.
This fix makes sure that we don't de-allocate the video buffer before
while the decoding thread is still working. We also don't throw
an misleading error when the decoding threads flushed the buffers
on seeking.
2020-02-04 21:29:35 +01:00
twinaphex
8627d638e1 Cleanups 2020-02-04 06:05:00 +01:00
twinaphex
ca83be1db4 Cleanups 2020-02-01 04:19:22 +01:00
twinaphex
64d3408188 (ffmpeg) Fixups 2020-01-18 05:40:11 +01:00
twinaphex
ab49806a5f add another ifdef 2020-01-14 22:09:00 +01:00
twinaphex
e24934d5ea Improve compile time checks for determining if ffmpeg
version supports hardware decoder
2020-01-14 21:41:26 +01:00
twinaphex
98b572d17a (FFmpeg) Add more ffmpeg_sw_decoder_threads options 2020-01-14 06:56:14 +01:00
Nils Hasenbanck
354c50039b Fix brackets in buffer logic of the ffmpeg core. 2020-01-11 15:01:21 +01:00
Nils Hasenbanck
d591529e7a Fix the ffmpeg core packet buffer logic.
The logic for when to consider to decode a buffered packet did
had used a "magic number" when considering when the current packet
should be decoded when compared to the reference packet.
This change uses the media fps so that we never "overshoot" our target
and don't need to rely on a "magic number".
2020-01-10 08:23:18 +01:00
twinaphex
df8f93e9d5 Split up VFS file_path code into separate file 2020-01-09 15:44:48 +01:00
Nils Hasenbanck
1f673be3c8 Fixed the video decoder deadlock when using HW decoding. 2020-01-08 21:51:22 +01:00
Nils Hasenbanck
a82582e859 Remove an unused struct variable. 2020-01-08 21:06:28 +01:00
Nils Hasenbanck
40ecfbcdfa Fix memory leak in ffmpeg core packet_buffer 2020-01-08 21:02:23 +01:00
Nils Hasenbanck
1e54379141 Implemented the packet buffer.
Simply use two packet_buffers that are double-linked lists of
AVPacket structs. This way we can control which packets to feed
to the decoders at the right time.

This solves the playback problem with the MP4 files.
2020-01-08 20:44:00 +01:00
Nils Hasenbanck
226f2d52ff Fix ASS rendering assertion on seeking.
ASS needs some locking.
2019-12-24 12:16:52 +01:00
twinaphex
31a7f2b4d9 Add missing ifdef 2019-12-24 02:17:48 +01:00
Nils Hasenbanck
c6309d963d Remove video fifo in ffmpeg core.
The video fifo can be removed, since we have a ring buffer in it's
place. This removes unneeded copy operations and as a positive side
improves overall decoding speed.

Makes 8k60p SW and 4k60p HW decoding possible on my system.

For now the ring buffer is 32 images deep. This limitation will
be removed, once audio and video decoder have their own
packet handling.
2019-12-23 16:07:34 +01:00
twinaphex
3033491f3d Turn HAVE_EASTEREGG into HAVE_GONG 2019-12-22 03:08:02 +01:00
twinaphex
923c19356b (ffmpeg) - Fix CXX_BUILD errors - see
https://github.com/ZoneMinder/zoneminder/blob/master/src/zm_ffmpeg.h
(comment on av_err2str)
2019-12-19 20:43:59 +01:00
twinaphex
60b182b821 Promote tpool as libretro-common component 2019-12-18 18:21:03 +01:00
twinaphex
3e8e6d35d6 (tpool.c) Code style nits 2019-12-18 18:11:18 +01:00
Nils Hasenbanck
417d1b7de7 Color space conversion using frame based MT.
Using a ordered ring buffer and a thread pool, the color space
conversion is not multi-threaded based on frames. I tried
to implement slice based threading, but libswscale did produced
highly distorted pictures without obvious reason.

This approach introduces some more "lag" when decoding and skipping,
but shouldn't be affect the user negatively, since movie
watching is not lag sensitive, as long as the A/V is synchronized.

Change default to software decoding.

SW decoding is the most robust and fasted method of decoding right now.
Users should enable hw based decoding if their system requires it
and it's actually beneficial for them.

Fix deadlocks when seeking and decrease RAM usage.

Decrease memory allocation by reusing AVFrames.
2019-12-18 11:46:49 +01:00
Nils Hasenbanck
00f755a822 ffmpeg core implements MT for SW decoding.
This change will activate multi-threading for software based
decoder. Color conversion is still single threaded and also not
being performed by OpenGL.

Since the way ffmpeg inits the HW decoding, we can't 100% valdiate
if a hw decoder will play a file or not. Since we need to know
before calling avcodec_open2() if we want to either multi-thread via
software or HW decode, we will only run single-threaded in case of a
late fallback.

This happens for example in off cases when my AMD vega based graphic
card reports that it could HW decode VP9 video but in reality can't
(which is catched in callback get_format() and after avcodec_open2(().

There is currently no good solution in sight, since we can't
reconfigure the decoding context at that point of time.
2019-12-07 17:45:41 +01:00
Nils Hasenbanck
03b18dbfc4 Disable HW acceleration with ffmpeg 3.4. 2019-12-05 20:11:29 +01:00
Nils Hasenbanck
c88f2b31ee Fix ffmpeg core build under linux.
Libass is optional again. This build will also compile with
ffmpeg 3.4 again, but HW acceleration is not guaranteed to work,
since it hasn't been tested well enough.
2019-12-05 19:39:56 +01:00
Nils Hasenbanck
1dbc7cdc9a ffmpeg core prints out the ffmpeg library version
For better debugging and supporting of the users, we will print
out the library versions that the ffmpeg core is currently using.
2019-12-02 18:50:44 +01:00