aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/H264LibavDecoderContext.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Move basic data types to core libraryPierre Ossman2025-02-131-1/+1
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Avoid logging in H.264 decoderPierre Ossman2025-01-101-19/+6
| | | | | | | | | Decoders are run in threads, and not everything in the logging system is thread safe. Normally decoders consider errors to be fatal and throw an exception. But the H.264 decoder wants to be able to tolerate misbehaving H.264 encoders.
* Use normal constructor/destructor for H.264 contextsPierre Ossman2025-01-101-9/+4
|
* Throw exceptions directly in H.264 init routinesPierre Ossman2025-01-061-16/+10
| | | | | A false return value from these methods result in an exception anyway, so let's keep things simple and throw the exception right away.
* Remove mutexes from H.264 decoder and friendsPierre Ossman2025-01-061-5/+0
| | | | | The decodered is already flagged as strictly ordered, which means it will only be used from a single thread at a time.
* Use standard exception classesPierre Ossman2024-11-061-2/+1
| | | | | Use the more specific already included exception classes for common errors to keep things more understandable.
* Add missing config.h includesPierre Ossman2024-09-041-0/+3
|
* H264Libav: Use nearest-neighbour sampling in scalerAndri Yngvason2024-08-221-1/+1
| | | | | | | | | | | sws_getCachedContext will set a default sampling method if 0 is passed to the flags argument. This means that when it is called again, the flags argument will not match the flags in the context, so a new one will be allocated every time. To get around this problem, we assign an explicit sampling method, one that also happens to be more efficient and just as good for this use-case as the default one, which is bicubic interpolation.
* H264Libav: Handle colour space conversionAndri Yngvason2024-08-191-0/+15
| | | | | The scaler is now informed of the colour space encoded into the stream so that it may do the proper conversion.
* H264Libav: Clean up sws contextAndri Yngvason2024-08-161-0/+1
| | | | This fixes a memory leak
* H264Libav: Use AVFrame for pixel format conversion bufferAndri Yngvason2024-08-161-10/+17
| | | | | | | | This ensures that the buffer is allocated with the correct alignment and padding for use with sws_scale. This fixes out-of-bounds writes which would in some cases cause segmentation faults and/or heap corruption.
* Use nullptr in all C++ codePierre Ossman2024-06-241-7/+7
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Use stdint typesPierre Ossman2023-02-011-7/+7
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Remove unused flags to decoder contextsPierre Ossman2023-01-041-1/+3
| | | | Everything in flags is already handled at a higher level.
* Fix compilation issue.Chris2022-02-281-1/+1
| | | | | | | | | | | | | | | | | Ubuntu 20.04 gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 libx264-dev:amd64 2:0.155.2917+git0a84d98-2 [ 11%] Building CXX object common/rfb/CMakeFiles/rfb.dir/H264LibavDecoderContext.cxx.o tigervnc/common/rfb/H264LibavDecoderContext.cxx: In member function ‘virtual bool rfb::H264LibavDecoderContext::initCodec()’: tigervnc/common/rfb/H264LibavDecoderContext.cxx:50:40: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive] 50 | AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_H264); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ | | | const AVCodec* make[2]: *** [common/rfb/CMakeFiles/rfb.dir/build.make:895: common/rfb/CMakeFiles/rfb.dir/H264LibavDecoderContext.cxx.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:597: common/rfb/CMakeFiles/rfb.dir/all] Error 2 make: *** [Makefile:130: all] Error 2
* H264 DecoderVladimir Sukhonosov2022-01-211-0/+228
Linux implementation using ffmpeg