Commit Graph

185 Commits

Author SHA1 Message Date
Martin Pulec
0bb204fdc8 video decoder: count dropped frames
Count dropped frames from display. It was broken from some time point
and the count of dropped frames was always 0.

+ make some things prettier (alphabetic order, one-line assignment)
2022-09-22 10:00:20 +02:00
Martin Pulec
0b8cc39f9c removed perf tool
It was almost never used since added.
2022-08-17 17:24:34 +02:00
Martin Pulec
e8624717a7 video decoder: more descriptive msg if unable to decode 2022-06-10 15:46:43 +02:00
Martin Pulec
1a31999f1a utils/misc: split to misc and macros.h
Some macros are quite common so it is perhaps more wise to use a
separate header.

Also moved ref_count_init_once and ref_count_terminate last to misc.h.
2022-06-06 11:06:06 +02:00
Martin Pulec
7b1837c668 video_codec: removed slow parameter from get_decoder_from_to 2022-05-30 15:38:48 +02:00
Martin Pulec
d66f336e1d video_codec: removed some more ext link
+ return vc_copylineRGB[A] for RGB->RGB and RGBA->RGBA instead of
  vc_memcpy - we cannot know if caller wants or doesn't want to use
  rgb-shifts other than default. Both implementations call vc_memcpy
  if s/he does
2022-05-30 15:38:47 +02:00
Martin Pulec
a354d2ab56 replaced some occurences of get_bpp with int version 2022-05-24 14:09:03 +02:00
Martin Pulec
cec2f43b32 fixed some (mostly Windows) warnings 2022-02-01 14:12:56 +01:00
Martin Pulec
35bfc4cced Fixed warnings for -Og 2022-01-17 15:10:34 +01:00
Martin Pulec
fd20479a0d Decoders: increse log level for wrong AES CRC
As UDP is checksummed it should not occur anyway and if so, it is
perhaps worth warning.
2021-11-30 17:09:29 +01:00
Martin Pulec
af4888d697 Fixed handling of newly reserved PT 95 2021-11-23 12:54:26 +01:00
Martin Pulec
e5716f3f5c Reserve PT 95 for future use in UG
+ do not abort on unknown PT in audio
2021-11-05 10:43:59 +01:00
Martin Pulec
0cfc4c778a Video decoder: support unknown FPS values
Support FPS values that are not understood by UG (FPSd == 0) and
replace it by 30.

This is a forward compatibility feature when there may be special meaning FPS
values (unlimited etc.) but it can still be displayed, especially by displays
that don't honor FPS value like OpenGL.
2021-11-05 10:43:57 +01:00
Martin Pulec
ef48f01727 Fixed video dec stats
Adding of displayed and corrupted frames was accidentaly removed by a779d96c.
2021-10-22 12:42:57 +02:00
Martin Pulec
c35083fa91 Suppress clang warnings 2021-09-08 08:25:10 +02:00
Martin Pulec
3663843682 renamed fec_video_payload_hdr_t to fec_payload_hdr_t
Can be used for audio as well.
2021-08-23 11:00:28 +02:00
Martin Pulec
f2814cf3dd Replaced some occurences of default {r,g,b}-shifts
Replaced only those occurences that are implicitly default.
2021-08-09 14:33:03 +02:00
Martin Pulec
465e5e8855 Video decoder: reported_statistics_cumul lock free
After removing CoUniverse-related reporting, most of the work is done
from single thread, except of FEC statistics, that is however replaced
by atomic vars which is sufficient here.
2021-08-04 11:01:22 +02:00
Martin Pulec
627f5064f9 Video decoder: small missing frames computation fix
Use the macro + fix off-by-one error
2021-08-04 11:01:22 +02:00
Martin Pulec
8ba70ca0d4 Get rid of most reporting through control socket
This was originally for CoUniverse/UltraGridAfco - both of them are
inactive now so removing that because it may unnecesarily cause some
overhead.

Audio statistics are kept since those are used by the GUI.
2021-08-04 11:01:14 +02:00
Martin Pulec
ad64f77f86 Video decoder cumulative stats: updates
To be in sync with audio (reporting interval 30 sec).

+ small improvements - do the printing in main thread
+ better encapslulation
2021-07-27 16:13:24 +02:00
Martin Pulec
8eb8ecfcac Fixed 711eb170 2021-06-28 14:42:11 +02:00
Martin Pulec
711eb170ad RTP video decoder: check bounds also for compressed/FEC
Check bounds also for compressed/FEC streams to avoid crashes and/or
potential attacks. This can occur for instance when VR has some
unexpected data outside the buffer.
2021-06-21 11:05:31 +02:00
Martin Piatka
eab94c12c0 Remove some unused includes
Removes some unused includes reported by include-what-you-use
2021-06-08 15:22:25 +02:00
Martin Pulec
986606f1e7 Renamed error() to handle_error()
to avoid clashes with GNU function error()
2021-05-13 09:08:26 +02:00
Martin Pulec
120a7b4ff6 Changed some messages verbosity
- signal handler - verbose
- frame incomplete - debug (usually quite chatty)
2021-04-14 13:55:57 +02:00
Martin Pulec
8ba1decc5f Decoder: minor fixes for drop policy
- actually accept the parameter "decoder-drop-policy"
- avoid evaluating the param for every frame
2021-03-02 15:46:48 +01:00
Martin Pulec
15df3f7268 Video display: get_property->ctl_property
Renamed display_get_property to display_ctl_property to indicate that
the function can be used as a setter as well.
2020-08-28 15:10:28 +02:00
Martin Pulec
c8a979a14e Decompress multiple tile: fixes
- fixed decompress deinit when one init fails
- fixed a crash when number of substream changes - destroyed the new
  number of substreams but old was allocated
2020-08-28 15:10:28 +02:00
Martin Pulec
856212229f Finally fix dce2ea59 2020-07-14 15:36:03 +02:00
Martin Pulec
2f242c5b9e Fixed previous commit (dce2ea59) 2020-07-10 11:55:49 +02:00
Martin Pulec
dce2ea595d Decoder: use vector for native codecs
This fixes a problem with incorrect handling native codec list - using
parameter "decoder-use-codec" only set native_count but there were
places where was expected a NULL-terminated list. (Example wrong
behavior may be observed with "-d dummy --param decoder-use-codes="
when the codec is not reflected).
2020-07-09 13:34:12 +02:00
Martin Pulec
055483276c --param decoder-use-codec help 2020-06-29 14:15:07 +02:00
Martin Pulec
48895b0783 ADD_TO_PARAM: salt is no longer needed
UNIQUE_NAME is used instead of the salt
2020-06-09 14:02:37 +02:00
Martin Pulec
35c24046b8 Added hints for params decoder-use-codec and force-lavd-decoder 2020-06-08 10:30:45 +02:00
Martin Pulec
3f1b0c7d78 Video dec.: if the pixfmt is not supported, report which ones are 2020-06-05 16:40:36 +02:00
Martin Pulec
c5672184d3 Video decoder: choose line decoders in a more smart way
Implement more smart selection of decoders. Until now, first was chosen
(only the fast property was taken into accout). Now reflect also bit
depth.
2020-05-25 17:40:15 +02:00
Martin Pulec
7484857f5d Video decoder: changed eligible codec sorting
Try nearest higher-bit depth than the internal first, then
downwardly lower ones. Eg. when RGB is received and only R10k and RG48
is available, R10k is chosen instead of RG48.
2020-05-23 23:25:36 +02:00
Martin Pulec
4fc89a8063 Video dec.: print decompress duration 2020-04-22 15:05:58 +02:00
Martin Pulec
db2150c2e3 Fixed commit f705331
Fixes crashes with multiple tiles.
2020-04-17 10:19:50 +02:00
Martin Pulec
8469e5db76 Video dec.: option to force decoded codec 2020-03-05 15:27:58 +01:00
Martin Pulec
31d9809fcd Updated documentation
Updated authors, copyright to 3-clause BSD (where possible) and file-level Doxygen
2019-11-09 13:47:11 +01:00
Martin Pulec
1edb21b68a Removed NOTES.source
Moved the documentation into the video_decoders.cpp. But generally the
out-of-source documentation may not be a bad idea.

+ moved video_decoder.cpp to appropriate group
2019-11-07 07:23:44 +01:00
Martin Pulec
0edbb9d712 RTP video dec.: query dec corr propert after reconf
Query decoder corrupted frames acceptance property after reconfiguration
because the ability may differ according to the properties (namely codec
for libavcodec).
2019-10-10 09:20:39 +02:00
Martin Pulec
737e9df850 Pass incomplete FEC decoded frame
Allow further processing of not entirely corrected video frame (eg. when
uncompressed or when decoder is able to handle broken streams).
2019-09-27 15:29:59 +02:00
Martin Pulec
f705331806 RTP video dec.: zero buffer where missing data
Zero parts of the framebuffer for compressed streams. This should be
safer for decoder when trying to decompress an incomplete frame.
2019-09-27 13:18:58 +02:00
Martin Piatka
84fc349cd4 video_decoders: Fix uninitialized variable warn 2019-07-31 13:07:55 +02:00
Martin Pulec
ab9add0799 Fixed further warnings 2019-07-24 10:57:06 +02:00
Martin Pulec
6ef9969abc Use logger again
Use logger again where there is output printed in a color or highlighted.
2019-06-26 16:25:49 +02:00
Martin Pulec
c29a3cbe82 Video decoder: typo 2019-06-19 16:44:20 +02:00