Commit Graph

1064 Commits

Author SHA1 Message Date
Armin Novak
40a309a5b9 [codec] keep alpha plane
some codecs do not support an alpha channel. keep the destination alpha
value for these as the alpha data can be set using alpha codec
separately.
2023-01-10 11:49:02 +01:00
Armin Novak
78eb6ce3a8 [codec] add flag for freerdp_image_copy
Add FREERDP_KEEP_DST_ALPHA to copy and keep the destination alpha value
2023-01-10 11:49:02 +01:00
akallabeth
d399c1c6fb [codec,xcrush] follow up to #8529
There was still an issue left, if diff == 0 then the loop counter did
never increment.
Skip this case now completely as the memory does not need to be copied
anyway.
2022-12-13 15:41:58 +01: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
d27972518f [codec,interleaved] move length check out of loop 2022-12-13 13:38:25 +01:00
Armin Novak
6f6353d76f [codec,interleaved] add codec debug log 2022-12-13 13:38:25 +01:00
Armin Novak
1428b73490 [codec,interleaved] refactored run length reading 2022-12-13 13:38:25 +01:00
Armin Novak
0dc5c94476 [codec,interleaved] added string helper functions 2022-12-13 13:38:25 +01:00
Armin Novak
2648257caa [codec,interleaved] add proper debug logging
log reason for decoder to fail
2022-12-13 13:38:25 +01:00
akallabeth
549aad655a [codec,xcrush] fix possible div by zero
If source and destination buffers are equal the calculation of
'rest = num % div' is a division by zero. Avoid that by checking
explicitly for that condition.
2022-12-13 13:37:54 +01:00
akallabeth
adb3b22609 Revert "fix xcrush-divideByZero (when src ==dst)"
This reverts commit 85e830d16f.
2022-12-13 13:37:54 +01:00
akallabeth
050a2d0e74 [codec] fixed region16_union_rect
* If source and destination are equal, free the buffer on destination to
  avoid compiler warnings.
* Remove assert that is not required
2022-12-09 16:40:54 +01:00
akallabeth
7ab917dca8 Fixed Wsign-compare warnings 2022-12-09 15:58:26 +01:00
akallabeth
0186a9b303 Fixed some warnings 2022-12-09 15:58:26 +01:00
Mihai Radu
2bc13d50a3 fix xcrush-divideByZero (when src ==dst) 2022-12-07 17:48:11 +01:00
Armin Novak
8de60f9472 Fixed -Wextra-semi-stmt 2022-11-21 10:12:31 +01:00
Armin Novak
dacebc62a3 Use Stream_CheckAndLogRequiredLength, fix WLog TAG
* Log stream length requirement violations
* Use proper defines for WLog tags
2022-11-21 09:57:27 +01:00
akallabeth
5b90d0bc1d Added missing length checks in zgfx_decompress_segment 2022-11-14 09:28:22 +01:00
Martin Fleisz
0629bb9c20 codec: Fix broken logging in progressive codec 2022-11-14 09:27:41 +01:00
Armin Novak
b04c0e7b1c Fix const warnings in ffmpeg h264 module 2022-11-03 11:58:17 +01:00
akallabeth
08d2d559c3 Increase yuv decoder worker count
The yuv decoder might run out of workers if the rectangles are
smaller than 64x64. Assume 16x16 tiles for the decoder
2022-10-19 08:16:53 +02:00
akallabeth
43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
akallabeth
1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
Martin Fleisz
f44dbecbfd codec: Remove unused variable 2022-07-21 15:59:43 +02:00
Pascal Nowack
c7d1a2cdb5
codec/progressive: Fix wrong usage of subband diffing flag (#8076)
Currently, all Calista Progressive encoded streams contain tile
artifacts, when the RFX_SUBBAND_DIFFING is used, but not the
RFX_DWT_REDUCE_EXTRAPOLATE flag.
The reason is the wrong usage of the context and tile flags.
The RFX_SUBBAND_DIFFING flag should have no actual impact on the
decoder itself.
Especially, it does not affect the band sizes within a 64x64 tile.
The RFX_DWT_REDUCE_EXTRAPOLATE flag, on the other hand, MUST have an
effect on the band sizes.
However, FreeRDP currently uses the RFX_SUBBAND_DIFFING flag when
decoding a component to determine whether the Reduce-Extrapolate method
is used, resulting in tile artifacts, when that method was actually not
used.
The current behaviour did not result in tile artifacts with the MS
Windows RDS, as that server always sets both flags.

So, fix this issue by using the correct flag, when decoding a tile.
2022-07-15 08:32:33 +02:00
Armin Novak
3bedc1f92e Fixed swscale and cairo checks 2022-07-06 13:09:46 +00:00
Armin Novak
727f2bc652 Fixed IMA PCM encoder 2022-07-06 12:01:23 +02:00
akallabeth
c71cc672f9 Decouple ffmpeg video encoder/decoder support from WITH_FFMPEG
It may be diesirable to only use FFMPEG for audio. Allow disabling
video decoding by introducing a new variable responsible for that.
2022-07-05 18:17:28 +02:00
akallabeth
cb96e6143d Fixed -Wshadow warnings 2022-06-30 10:49:02 +02: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
Armin Novak
66e73f8b08 Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha 2022-06-21 10:28:34 +02:00
Marc-André Moreau
51f378308f * libfreerdp-codec: fix ClearCodec context reset 2022-06-01 15:26:12 +02:00
Marc-André Moreau
4c4b5bfd87 Revert "* libfreerdp-codec: fix XCRUSH context reset"
This reverts commit dd57a4fae8.
2022-05-30 18:10:47 +02:00
Marc-André Moreau
dd57a4fae8 * libfreerdp-codec: fix XCRUSH context reset 2022-05-26 17:14:36 +02:00
David Fort
77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
akallabeth
c716304cf8 Only build RFX neon path with -DWITH_NEON=ON 2022-05-04 09:28:29 +02:00
akallabeth
eb95f00991 Move H264 subsystem variable to header 2022-04-28 13:25:27 +02:00
akallabeth
340f9dd775 Fixed conditional warnings 2022-04-28 12:37:19 +02:00
akallabeth
962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth
6fd71fe737 Eliminate Dead nested assignment warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
bba427e71a No longer export ncrush, xcrush and mppc codecs 2022-04-28 11:24:29 +02:00
Armin Novak
83bb37d174 Fixed decoder arguments, use const correct ones 2022-04-28 09:17:41 +02:00
akallabeth
667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +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
ee243d17aa Fixed #7837: Overallocate zgfx output buffers
Some decoders require additional byte alignment to prevent out
of bound reads
2022-04-27 18:39:41 +02:00
akallabeth
aa6ca6aa40 Do not use Stream_CheckAndLogRequiredLength for optional checks
clear codec does not require these bytes to be available, so do
not log such checks
2022-04-23 10:10:09 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak
edcb8284e7 Fixed #7745: Progressive surface cleanup 2022-04-06 10:32:43 +02:00