Commit Graph

129 Commits

Author SHA1 Message Date
Armin Novak
7b8ddb89c7
[codec,planar] fix parameter type of functions 2024-09-18 11:47:01 +02:00
akallabeth
a1a1fc8658
[warnings] fix mismatches between declaration and implementation 2024-09-12 13:32:44 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
15456e1ee1
[warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
b12e512e08
[codec,planar] restrict keyword 2024-06-03 17:54:29 +02:00
akallabeth
1b3f3a0408
[codec,color] expose freerdp_image_copy (no)overlap
expose functions for overlapping and non overlapping images to use
directly
2024-05-23 14:48:36 +02:00
Armin Novak
e272eb3966 [warnings] fix Wshadow warnings 2024-05-08 15:30:01 +02:00
Armin Novak
28e9094f08 [gcc] fix missing malloc warning macros
* Add missing WINPR_ATTR_MALLOC
* Add missing WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
2024-04-17 18:47:16 +02:00
akallabeth
9da3f23698 [codec,planar] fix missing input length checks 2024-04-16 11:25:27 +02:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth
207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
Armin Novak
939e922936 [codec,planar] check resolution for overflow
If the codec resolution is too large return an error as the internal
buffers would otherwise overflow.
2024-01-16 09:02:58 +01:00
Armin Novak
d6f9d33a7d [codec,planar] fix reset 2023-08-30 11:12:09 +02:00
ehdgks0627
d04ba8d6ef Correct typos and formatting errors in format strings
In several files, fixed typos in format strings that were causing unexpected output and formatting issues.
2023-07-28 15:34:46 +02:00
Armin Novak
7dc8a4a51d [codec,planar] fixed sign warnings 2023-07-28 13:42:12 +02:00
David Fort
27a5ea64f0 [codecs] fix R and B inversion when decoding planar 2023-06-28 10:57:55 +02:00
houchengqiu
7fe1f15edd [libfreerdp] add null pointer check in planar_decompress()
In Windows remote run vulnerabillities exe program, to create rdpgrfx
channel, may case Remmina crash.
So, add null pointer check to pSrcData.
2023-05-22 12:10:29 +02:00
akallabeth
983c820f16 [codecs] make h264 and planar opaque 2023-04-11 10:58:03 +02:00
akallabeth
4795ee5eac [codec,planar] use aligned allocation 2023-03-28 11:34:52 +02:00
akallabeth
f67a7aa16a [build] added WITH_DEBUG_CODECS
A new build option to enable more verbose logging in some video codecs.
2022-12-13 13:38:25 +01:00
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
21cfb23e0b Improve codec error logging 2022-06-23 07:45:55 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
fb90ac280a Refactored color.h
* Remove implementations from header
* Rename functions to be FreeRDP specific
* Add deprecation define for old names
* Fixed missing includes
2022-04-28 08:40:47 +02: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
2ac12c558a Added option to allow planar topdown encoding. 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
Armin Novak
ea8858c705 Renamed planar ALIGN macro to avoid name collission on osx 2021-06-16 11:46:42 +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
67dbb7907a Fixed destination buffer offset in planar_decompress 2021-03-20 14:31:43 +01:00
Armin Novak
e0bc548bf8 Added missing bounds check. 2021-03-12 10:52:04 +01:00
sss
6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
Armin Novak
8187ab7732 Fix ColorFidelity use 2021-01-18 09:41:13 +01:00
Armin Novak
57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
akallabeth
ee160fc414 Fixed UndefinedBehaviour in planar left shift 2020-05-20 15:10:07 +02:00
akallabeth
17f547ae11 Fixed CVE-2020-11521: Out of bounds write in planar codec.
Thanks to Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02:00
Armin Novak
436b68e416 Fixed #5895: cast warnings. 2020-02-19 10:21:43 +01:00
Armin Novak
1c19de5a76 Fixed remaining issues with chroma subsampling. 2020-01-14 17:46:13 +01:00
Armin Novak
b3a642164a Fixed planar size checks. 2020-01-14 15:14:40 +01:00
Armin Novak
c1679d0f2c Added planar RLE chroma subsampling. 2020-01-14 14:06:43 +01:00
Armin Novak
6fd9525823 Implemented chroma subsampling for planar non RLE
Planar frames that are not RLE encoded can now be decoded if
chroma subsampling is enabled. Partly fixes #5822
2020-01-14 12:43:40 +01:00
Martin Fleisz
1112e2fffb codec: Set alpha channel to FF if not used (#5431)
* Formatting

* codec: Set alpha channel to FF if not used

This PR initializes the alpha channel to FF. Before the alpha channel
contained uninitialized memory potentially causing problems when the
image data was used by an alpha channel aware frontend.
2019-06-13 09:19:42 +02:00
Armin Novak
9610faddaa Fixed sign-compare warnings 2019-04-05 09:13:24 +02:00
Armin Novak
c97d4eec67 Fixed uninitialized value. 2018-11-29 11:25:27 +01:00
Armin Novak
91107beb67 Separate alpha handling for planar codec
If the destination does not support an alpha channel ignore it
when decoding and prevent data to be copied unnecessarily
2018-10-16 12:17:25 +02:00
Armin Novak
a29bc16af4 Siplified planar alpha / non alpha paths 2018-10-16 10:05:33 +02:00
Ondrej Holy
79d0725a80 codec/planar: Fix leak found by covscan
The patch changes API of functions instead of fixing unused and broken code.

leaked_storage: Returning without freeing "outPlane" leaks the storage that it points to.
2018-08-22 14:34:02 +02:00