Giter Club home page Giter Club logo

librfxcodec's Introduction

This is a fast jpeg2000 codec compatible with MS RDP servers and xrdp.

Assembly code in critial parts to maximize speed.

Use this to push
git remote set-url origin [email protected]:neutrinolabs/librfxcodec.git

librfxcodec's People

Contributors

firewave avatar itamarjp avatar jsorg71 avatar mancaveman avatar matt335672 avatar metalefty avatar mirabilos avatar nexarian avatar proski avatar rolkau avatar speidy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librfxcodec's Issues

printf output from librfxcodec is block-buffered

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?

librfxencode.la dependency_libs issue when packaging devel for Debian

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

Include config_ac.h ① in all files, and ② first, before anything else

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).

Crash in rfxcodec_encode_dwt_shift_amd64_sse41

xrdp built from sources at 0.9.6
Reproduces very reliably as follows:

Server:

  • sudo su
  • ulimit -c unlimited
  • /usr/local/bin/xrdp -ns

Client (Windows 10, 1709)

  • Connect using LAN settings to an xorgxrdp session. Full-screen 2560x1600
  • Open a full-screen terminal (black on white)
  • Render a wall of text. E.g. base64 -w 0 < .xsession-errors | less

Observed behavior:

  • The session disconnects.
  • A core file is generated on the server, in the directory from which xrdp is run. The crash is in loop1p in rfxcodec_encode_dwt_shift_amd64_sse41.

Connections with WAN settings work perfectly.

Any idea to implement hardware encoding/decoding support?

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?

Warnings don't seem to work

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."

scanline like effect with gfx progressive

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

grafik
the black/dark gray should be solid without the horizontal lines

Q: How to test correctness of patches against asm files

Hi,

I’ll need to patch the following files…

  • src/x86/rfxcodec_encode_dwt_shift_x86_sse2.asm
  • src/x86/rfxcodec_encode_dwt_shift_x86_sse41.asm

… 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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.