neutrinolabs / librfxcodec Goto Github PK
View Code? Open in Web Editor NEWJPEG2000 codec for RDP
JPEG2000 codec for RDP
Hi,
I’ll need to patch the following files…
… in order to make them usable when compiled with PIC (shared library) or PIE (relocatable binary using PIC mechanism) without having a TEXTREL (which has bad security implications).
For this, I’ll require use of the ebx
register (which stores the address of the GOT (global object table) with PIC code on i386), so I have to rewrite part of the code. How can I test correctness of my changes (in both (ELF) PIC and nōn-PIC modes) afterwards?
xrdp built from sources at 0.9.6
Reproduces very reliably as follows:
Server:
Client (Windows 10, 1709)
Observed behavior:
Connections with WAN settings work perfectly.
This issue still occurs on macOS when building xrdp following documented build instructions.
When packaging the devel
branch for Debian, lintian
throws an error about librfxencode.la
's dependency_libs
being wrong. Because Debian packages install to /usr
, a prefix=/usr
flag has to be supplied to make
instruction. This causes the outputted librfxencode.la
to list dependency_libs='-L/usr/lib'
, which is what is causing the lintian
error.
I'm definitely a novice when it comes to packaging, but I discovered that removing line 28
from src/Makefile.am
seems to have resolved the problem, and it doesn't seem to have caused others. (I tried altering the line, which, given my lack of automake
knowledge, only served to throw more serious errors, although removing it entirely seems to have had the desired effect.) Is there a way this line could be re-written so that it doesn't throw errors?
Thanks!
-Russ
I don't know if it is really librfxcodec to blame, but since rfx progressive is implemented the colors are not correct any more
the cli parameters used in ex freerdp are /gfx +gfx-progressive. If I use /rfx or /gfx:avc444 it look correct
the black/dark gray should be solid without the horizontal lines
librfxcodec/src/rfxencode_rgb_to_yuv.c
Line 89 in ef68593
*lr_buf++ = r;
*lg_buf++ = g;
*lb_buf++ = r;
librfxcodec/src/rfxencode_rgb_to_yuv.c
Line 263 in ef68593
*la_buf++ = a;
*lr_buf++ = r;
*lg_buf++ = g;
*lb_buf++ = r;
probably should be b instead of r
This rfxcodec is a compatible mode which send compressed jpeg data stream to client which is out of date and can not make use of hardware decoding in client site.
I've noticed the Gnome-Remote-Desktop project has fully implemented the remotefx codec and support hardware acceleration. Is it possible to transmit the codecs used there to this project?
When I add an unused variable or use an uninitialized variable I don't get a warning. I do if I build with "make CFLAGS=-Wall."
part of MS-RDPEGFX
description here
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpegfx/f8c3c134-bf99-45eb-be7e-d22c8178255f
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852617#42 for a lecture from GNU autoconf upstream:
If the real-world package is not including config.h first, then that is
a bug in the real-world package that should be fixed there. Autoconf
clearly documents that if you create config.h, it MUST be included
first, before any system headers.
The workaround I had to add to the xrdp Debian package to enable and fix Large File Support was… not nice. So, apparently, the correct fix involves having every single source file (*.c
, but also C++ et al.) #include "config_ac.h"
first, before any other #include
or nōn-preprocessor statement (the inclusion from various header files, such as arch.h
, can then be removed).
I'm interested in seeing output like rfxcodec_encode_create: got sse4.1
in
https://github.com/neutrinolabs/librfxcodec/blob/devel/src/rfxencode.c
however printf is an unusual choice of logging API.
Specifically, when we connect in a way which calls rfxcodec_encode_create_ex
, the printf calls to stdout are block-buffered, the default behaviour for output to a non-terminal.
As such, we see this output going to systemd's journal, but only at the end of the session.
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got sse2
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got sse3
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got sse4.1
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got sse4.2
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got popcnt
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: got lzcnt
Nov 08 13:56:40 desktop xrdp[20339]: rfxcodec_encode_create: rfx_encode set to rfx_encode_component_rlgr3_amd64_sse41
I tried changing the service ExecStart config to prefix
stdbuf --output=L ...
which then printed the output on connection, not disconnection.
Throughout the codebase under src/
there are 30 calls to LLOGLN
(which is #define'd to printf), and 23 calls to printf directly.
It would be helpful if the [Logging]
config from xrdp.ini
were reflected in librfxcodec, but at a minimum can we avoid buffered output with printf?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.