Commit Graph

1064 Commits

Author SHA1 Message Date
Armin Novak
66c7228643 Fixed version mismatch in ffmpeg h264 2022-04-06 10:25:41 +02:00
akallabeth
19173a3c6b Fixed removed #endif 2022-04-06 10:25:41 +02:00
akallabeth
e647d3aa83 Additional error checks for ffmpeg h264 backend 2022-04-06 10:25:41 +02:00
akallabeth
0a9c02b1ad Always set sys->packet 2022-04-06 10:25:41 +02:00
akallabeth
f4cb7b9877 Added FFMPEG h264 asserts 2022-04-06 10:25:41 +02:00
Armin Novak
974c700977 Fixed memory leak in YUV 2022-04-06 08:58:32 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
Armin Novak
3b24b5e16e rfx_process_message verbose error log 2022-03-08 15:41:48 +01:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
akallabeth
b5f3b9f64e Fixed #7607: Channel remixing does not work with FFMPEG
Until a proper way to utilize FFMPEG is found, do it manually.
2022-03-02 17:10:17 +01:00
akallabeth
921f279fa9
Openh264 fix graphical artifacts (#7677)
* Added WINPR_ASSERT to openh264 backend

* Added openH264 decoder frame flush
2022-02-28 08:21:42 +01:00
Armin Novak
e5d820a37d Use variable for mediacodec codec name 2022-02-24 12:06:06 +01:00
Armin Novak
ac98dfa502 Fixed mediacodec backend
* Link directly, no runtime linking. (It is part of the NDK for API >=
  21)
* Fix problems with functions introduced with API 26 and 28
2022-02-24 12:06:06 +01:00
Armin Novak
1b71bba2a0 Fixed compilation warnings 2022-02-22 11:29:56 +01:00
Armin Novak
082720a392 Free packet after decoding. 2022-02-15 11:00:05 +00:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
10e40147fb Fixed various const warnings 2022-02-01 10:25:37 +00:00
Armin Novak
90512bcc8d Fixed xcrush const warnings 2022-02-01 08:48:21 +01:00
Armin Novak
ca30e749e9 Fixed unused-but-set-variable and reserved identifier warnings 2022-02-01 08:48:21 +01:00
Armin Novak
c51224e923 Fixed const warnings for codec decompress routines 2022-01-31 16:25:56 +01:00
Armin Novak
b9cfa10513 Fixed some more warnings 2022-01-31 15:55:10 +01:00
Armin Novak
c220367843 Replaced reserved name identifier 2022-01-31 15:55:10 +01:00
Armin Novak
2e17cee5a9 Fixed various warnings. 2022-01-31 15:55:10 +01:00
Armin Novak
83d834a6ca Static internal variables, added resolution limit explanation 2022-01-31 11:20:27 +01:00
eronnen
4c78b66822 always initializing MediaCodec with non-zero resolution, adjusting to codec output resolution 2022-01-31 11:20:27 +01:00
akallabeth
4a29b29a53
Fix #7586: Update size of tile cache if required. (#7602) 2022-01-28 09:07:27 +01:00
Armin Novak
6f3761b8bf Fixed too eager assert. 2022-01-26 12:22:41 +01:00
Armin Novak
61e7f5796f Added missing include 2022-01-26 10:24:26 +01:00
Armin Novak
4d29cb3700 Fixed statement expressions and missing goto 2022-01-26 10:24:26 +01:00
Armin Novak
d3ae4cf26d Added code assertions, fixed loading order 2022-01-26 10:24:26 +01:00
Ely Ronnen
633c1abf44 handling small input buffer case 2022-01-26 10:24:26 +01:00
Ely Ronnen
91540862df import libmediandk.so dynamically 2022-01-26 10:24:26 +01:00
Ely Ronnen
52202762e8 adding mediacodec h264 implementation using NDK 2022-01-26 10:24:26 +01:00
David Runge
d0488f8692 Guard avcodec_register_all() calls
{channels/tsmf/client/ffmpeg/tsmf,libfreerdp/codec/dsp}_ffmpeg.c:
Guard calls to `avcodec_register_all()` against use beyond
`AV_VERSION_INT(58, 10, 100)`, where upstream ffmpeg made it obsolete.
2022-01-25 08:52:29 +01:00
akallabeth
6abd5f6c79
FFmpeg deprecated guards (#7574)
* Fixed missing ffmpeg deprecation guard

* Fixed compilation type warning
2022-01-24 09:49:07 +01:00
Armin Novak
f3df9a520e Fixed H264 related warnings 2021-12-20 08:11:00 +01:00
akallabeth
b008e83179 Fixed API const correctness 2021-12-01 10:28:53 +01:00
akallabeth
6ee60ea15a Fixed various warnings 2021-11-30 08:20:19 +01:00
akallabeth
5537667e0c
Removed WINPR_ASSERT with wrong assertions. (#7444) 2021-11-16 14:03:53 +01:00
Armin Novak
67f632982a Fixed YUV decoder API
Need to verify widht and height more rigorously.
2021-11-15 09:23:00 +01:00
akallabeth
58b24f13fe
Add an option to add the plugin and extension to rpath (#7425) 2021-11-04 08:59:38 +01:00
Armin Novak
69ff22e2a3 Fixed #7332: Missing NULL check 2021-11-02 09:52:01 +01:00
Armin Novak
0e991a1078 Use original height for h264 context, but allocate padded height. 2021-10-19 15:41:49 +02:00
Armin Novak
76c419e690 Remember avc420 allocation width and height 2021-10-19 15:41:49 +02:00
Armin Novak
a1a7724b88 Fixed freerdp_image_fill scanline detection 2021-10-18 10:53:05 +02:00
akallabeth
3ccb96d52f Fixed #7350: Warnings with Stream_StaticInit
* Properly initialize the stream buffer
* Add Stream_StaticConstInit accepting a const buffer
* Modify API to return a pointer to the stream initialized
2021-10-14 12:11:16 +02:00
Armin Novak
18a3fcf2fc Updated wStream API and added torough checks
* Do length/capacity checks in every read/write/seek function
  if WINPR_ASSERT is defined.
* Ensure s->pointer is valid, e.g. within s->buffer + s->capacity
  (Stream_Rewind, Stream_Seek, ...)
* Add return values to Stream_Set* functions so inalid arguments
  can be reported to the caller
* Deprecated problematic stream manipulation functions
  (Stream_SetBuffer, Stream_SetPointer, Stream_SetCapacity)
* Ensure length/capacity functions never return a value larger
  than the actual length/capacity
2021-10-06 09:49:07 +02:00
akallabeth
7b7e2d6f32 Prefer constant division over multiplication for length checks 2021-09-21 08:55:22 +02:00
akallabeth
00c083a854 Fixed compilation warnings. 2021-09-14 09:45:03 +02:00
Armin Novak
673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak
0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak
368b9f8e9c Fixed CloseThreadpool calls
Requires NULL checks before call
2021-09-09 08:53:20 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak
f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Simon Nivault
e42696bb2e
Some fixes for audin redirection (#7231)
* Fixed research for native PCM format

* Fixed compatibility detection for resampling

* dsp: Makes channel mix and encoding process use separated buffers

* Give FramesPerPacket to freerdp_dsp_context_reset function

* dsp: Fix DVI_ADPCM codec by respecting the required packet size

* Forbid mono channel in macos

* Fix audin command line channel option

* Disable ADPCM codec as it does not work

* Refactor valid native codec research

* Native codec research: Try different channels number

* Fix dsp channel mix

* Fix dsp resample
2021-08-23 14:49:28 +02:00
Armin Novak
610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak
61b46adaf1 Fixed WITH_WINPR_VERBOSE_ASSERT compile flag
* Compile flag was not always set
* Fix broken WINPR_ASSERT usages detected
2021-07-29 15:09:53 +02:00
Armin Novak
6e075a6a7d Fixed #7158: detection of arm neon. 2021-07-08 07:54:26 +02:00
akallabeth
2ac12c558a Added option to allow planar topdown encoding. 2021-07-02 09:53:24 +02:00
akallabeth
77a7e4010f Added bounds checks to ExtractRunLength 2021-07-02 09:53:24 +02:00
akallabeth
6deb65175f Added GFX planar and rfx encoder to shadow 2021-07-01 11:56:17 +02:00
akallabeth
bd256b91bc Fixed disabling of AVC444 mode if requested 2021-07-01 11:56:17 +02:00
Armin Novak
42df492450 Progressive compress cleanup 2021-06-28 18:29:47 +02:00
Armin Novak
98ed05ff5c Added PROGRESSIVE codec to shadow 2021-06-28 16:51:27 +02:00
Armin Novak
f1dc3a0494 Fixed use of deprecated function 2021-06-21 13:27:39 +02:00
Armin Novak
09111c9270 libfreerdp: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
Armin Novak
09cf11ecf0 WinPR: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
112400ca66 Removed stub for x264, not implemented 2021-06-16 15:21:56 +02:00
Armin Novak
5fb59a23a9 Fixed lots of compilation warnings and type mismatches 2021-06-16 15:21:56 +02:00
Armin Novak
c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak
ea8858c705 Renamed planar ALIGN macro to avoid name collission on osx 2021-06-16 11:46:42 +02:00
Armin Novak
880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
Armin Novak
c5fded2d83 Improved runtime of unit tests 2021-06-08 08:21:47 +02:00
Armin Novak
7586ffd913 Fixed issues with planar codec buffer alignment
Align width and height to next multiple of 4 to avoid issues with
internal buffer sizes.
2021-06-02 13:11:24 +02:00
Armin Novak
4f4e546cd4 Fixed initial alpha values for codec buffers 2021-06-01 14:18:01 +02:00
Biswapriyo Nath
06315d0c5c codec/h264: Remove unused IMFDXGIDeviceManager and GUIDs declarations. 2021-05-31 13:38:19 +02:00
Biswapriyo Nath
173ab04b59 Use same data types as calling function prototypes. 2021-05-31 13:38:19 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
akallabeth
fa73a2ba55 Fixed const correctness warning 2021-05-28 09:25:33 +02:00
Pascal Nowack
e8d146be71 codec/progressive: Allow the usage of multithreading for decoding
While decoding RemoteFX encoded frames is multithreaded, decoding
RemoteFX Progressive frames is not, although both codecs work
relatively similarly.
This is especially noticeable with frames, that have a resolution
larger than 1920x1080 pixels.

decompress_tile_first() and decompress_tile_upgrade() can both run in
different threads at the same time for different tiles without necessary
adjustments.

So, do exactly that using the ThreadPool that already exists in the
RFX_CONTEXT to decrease the decoding time and therefore increase the
performance.
On a 3K display (2880x1620 pixels) this makes out of a choppy
experience a fluid experience.
2021-05-25 10:16:36 +02:00
Pascal Nowack
11248b18c1 codec/progressive: Fix a memory leak
When checking whether tiles and updatedTileIndices are both non-NULL,
one of them might be NULL, while the other struct member might not
be NULL and progressive_surface_context_new() leaks then the non-NULL
struct member.

Fix this by freeing both struct members, when aborting in
progressive_surface_context_new().
free() will take no action on pointers that are NULL, so no additional
check is needed.
2021-05-25 10:16:36 +02:00
Armin Novak
2b19576fc7 Fixed compiler warnings, function arguments and const parameter 2021-05-18 13:37:34 +02:00
akallabeth
3765a9fe35 Fixed AAC encoding for microphone
* Fixed b-frame interval for FFMPEG
* Fixed sample size for FAAC
2021-05-11 15:33:23 +02:00
Armin Novak
bad528d36b Added version check for deprecated ffmpeg symbols 2021-05-03 10:38:35 +02:00
Ondrej Holy
ac25baa5ee codec/rfx: Silence BAD_FREE reported by Coverity
The `rfx_context_free` function uses the `rfx_message_free` function
with an address of the statically allocated `RFX_MESSAGE` struct. This
causes that the following is reported from covscan:

```
address_free: "rfx_message_free" frees address of "context->currentMessage".
```

I am convinced that this is just false-positive as the address is freed
only when `freeArray` is `0`, which is not in case of `RFX_CONTEXT`.
Let's add a code annotation to silence the false-positive next time.
2021-04-27 14:25:20 +02:00
akallabeth
7d4a84ca89 Added error logging. 2021-04-06 09:18:37 +02:00
akallabeth
721e05fc34 Reenabled multithreadded decoding 2021-04-06 09:18:37 +02:00
akallabeth
6f2bc2f3ac Fixed artifacts with yuv420/yuv444 decoding 2021-04-06 09:18:37 +02:00
sss
0bf5ebb68a
fixed tests 2021-03-30 21:20:56 +03:00
sss
4a2514b58d
reverted olf signature for rfx_context_new 2021-03-30 11:03:15 +03:00
sss
6b76ac9545 Revert "Revert "allow to use in single threaded mode" (#6864)"
This reverts commit f7465af44f.
2021-03-26 11:50:45 +01:00
Armin Novak
67dbb7907a Fixed destination buffer offset in planar_decompress 2021-03-20 14:31:43 +01:00
Armin Novak
1407925aba Added freerdp_planar_switch_bgr to test 2021-03-20 14:31:43 +01:00
Armin Novak
e0bc548bf8 Added missing bounds check. 2021-03-12 10:52:04 +01:00
Armin Novak
9c8cce3acb Added fuzzying test for planar decoder 2021-03-12 10:52:04 +01:00
akallabeth
fd902fb345
Win fixes multiple warnings + YUV decoder crash (#6873)
* Fixed conditional reading of regisrty values.

* Fixed sign warnings

* Removed use of deprecated settings functions

* added missing include

* Removed unused functions.

* Refactored registry reading functions

* Fixed TCHAR preprocessor for printf

* Fixed compilation warnings.

* Added bounding rectangle check for multithreadded yuv decoder

* Ensure yuv step calculation height is always >0

* Deactivate multithreadded YUV decoder until artifacts are fixed.
2021-03-08 12:48:22 +01:00
Armin Novak
b0e8da6ee5 Fix yuv444_combine_work_callback check_rect argument 2021-03-05 15:49:31 +01:00
akallabeth
f7465af44f
Revert "allow to use in single threaded mode" (#6864)
This reverts commit bee2e1526d.
2021-03-05 13:02:38 +01:00