Commit Graph

345 Commits

Author SHA1 Message Date
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
Nils Hasenbanck 17107a1563 Fix decoder switching and context re-usage.
The re-usage of the decoder context is not properly implemented.
Restart options will only be applied when the core is started.
2019-12-01 12:49:37 +01:00
Nils Hasenbanck c3c2f5bfb6 Implement HW based decoding for the ffmpeg core.
The ffmpeg core not support the usage of HW based video decoders.

Core options to configure the HW decoder to use is provided.
Proper fallback to the SW based decoder is implemented.

Currently the decoder loop in single threaded and is limited by
the color conversion that is done in software.
The frame based threading provided by ffmpeg also currently doesn't
seem to provide any benefits in configuring it.
2019-12-01 12:11:14 +01:00
twinaphex ba74747860 (ffmpeg core) Update Makefile 2019-11-23 22:39:50 +01:00
twinaphex 5d8c566dbc (cores/ffmpeg) Resync 2019-11-19 09:09:52 +01:00
twinaphex 10a234908f Update libretro-ffmpeg Makefile 2019-11-19 09:01:46 +01:00
twinaphex 6d5104f6d7 (Windows/ffmpeg) Standalone Makefile - Don't set it explicitly to gcc/g++ 2019-11-19 08:55:04 +01:00
twinaphex fbdc53f926 Update ffmpeg Makefile.common - see if it changes anything 2019-11-19 08:54:19 +01:00
Tatsuya79 ef216d3010
fix gong crash 2019-09-16 16:27:34 +02:00
orbea 84f4dcba2b Remove WANT_ZLIB. 2019-07-25 11:18:33 -07:00
orbea 043977474e Silence -Wstring-plus-int with clang.
cores/libretro-imageviewer/image_core.c:75:59: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
                                                         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cores/libretro-imageviewer/image_core.c:75:59: note: use array indexing to silence this warning
1 warning generated.
2019-07-22 12:41:14 -07:00
twinaphex f739a018de file_list in image_core.c should no longer be a public scoped variable 2019-07-12 00:50:34 +02:00
Brad Parker 60e7e5be8d fix some warnings 2019-07-09 22:32:11 -04:00
Twinaphex 5f29660fdd (gong) Silence Unix warning on macOS 2019-06-29 17:34:48 +02:00
Twinaphex 7ea91b4808 Cleanup another unused variable warning 2019-06-26 14:37:42 +02:00
Brad Parker f4346401e2 gong: revert bad cleanup 2019-05-22 01:00:23 -04:00
Brad Parker fa128f950d remove unused functions 2019-04-18 10:35:51 -04:00
Twinaphex d6dfa240c8 Some cleanups 2019-04-08 19:36:44 +02:00
twinaphex cec06a0859 C89 buildfixes 2019-03-24 18:15:26 +01:00
jdgleaver b10901e6b9 Fix 'Multiplication result converted to larger type' alert 2019-03-19 14:42:52 +00:00
jdgleaver a17f0e2136 (RGUI) Allow text to be centred when selecting widescreen layouts 2019-03-19 13:11:00 +00:00
jdgleaver e72c67bf87 (RGUI) Add widescreen support 2019-03-19 11:49:53 +00:00
twinaphex d1dbf6fbe1 * The menu is now able to run at higher refresh rates than 60Hz
* Also added a new environment callback that a core can use to
query the display refresh rate
2019-02-27 04:44:04 +01:00
Brad Parker 477d46d52b update copyright 2019-02-22 19:13:36 -05:00
Brad Parker d319e6a93d gong: savestate support 2019-02-09 22:24:48 -05:00
Brad Parker 3fec3c89fc gong: add Makefile 2019-02-09 22:24:48 -05:00
Brad Parker ce70d8db4c gong: move serialization data into state struct 2019-02-09 16:25:00 -05:00
twinaphex 157494cab7 (gong) Add more refresh rates 2019-02-09 18:10:27 +01:00
Brad Parker b508135218 fix warnings 2019-02-09 10:01:38 -05:00
Brad Parker bf04d658e6 fix warning 2019-02-09 09:59:08 -05:00
Brad Parker c36ddf973c gong: two player support 2019-02-09 09:54:26 -05:00
orbea 25f41809f5 Fix --enable-v4l2 with CXX_BUILD=1. 2019-02-07 16:01:01 -08:00
orbea cb1b7a8006 Better warning fix for 32-bit linux.
Thanks hhromic!
2019-02-07 13:51:57 -08:00
orbea c0296179ac Silence warnings with 32-bit linux. 2019-02-07 13:27:42 -08:00
orbea b9cbc9881a Fix comment. 2019-02-06 11:13:39 -08:00
orbea cf6c49b9a1 Fix c89 build with 32-bit linux. 2019-02-06 10:21:28 -08:00
Tatsuya79 9c32d0df8a
Gong video refresh core option 2019-02-06 17:37:15 +01:00
orbea c9b0ba1123 Fix travis warnings. 2019-02-05 11:27:01 -08:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -08:00