mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 10:40:21 +00:00
vdec/lavc: accept corrupted for all except MJPEG
Retestd with MJPEG, VP9, AV1 and HEVC and except the first one all (AV1 is indecisive) seem to produce better results. Tested with: ``` tc qdisc replace dev lo root netem loss 0.1% uv -t testcard:patt=text:s=1280x720 -c lavc:c=CODEC -d gl ``` and with `--param lavd-accept-corrupted[=no]` Namely HEVC seem to produce significantly better results (often avoiding the intra refresh wave). This may be revided later (HW decoders, disabled intra refresh with H.265 and so).
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* @author Martin Pulec <pulec@cesnet.cz>
|
* @author Martin Pulec <pulec@cesnet.cz>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2024 CESNET, z. s. p. o.
|
* Copyright (c) 2013-2025 CESNET
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -1145,6 +1145,7 @@ ADD_TO_PARAM("lavd-accept-corrupted",
|
|||||||
"* lavd-accept-corrupted[=no]\n"
|
"* lavd-accept-corrupted[=no]\n"
|
||||||
" Pass corrupted frames to decoder. If decoder isn't error-resilient,\n"
|
" Pass corrupted frames to decoder. If decoder isn't error-resilient,\n"
|
||||||
" may crash! Use \"no\" to disable even if enabled by default.\n");
|
" may crash! Use \"no\" to disable even if enabled by default.\n");
|
||||||
|
/// if not requesteed, disable just for MJPEG
|
||||||
static bool
|
static bool
|
||||||
accept_corrupted(const AVCodecContext *ctx)
|
accept_corrupted(const AVCodecContext *ctx)
|
||||||
{
|
{
|
||||||
@@ -1152,13 +1153,10 @@ accept_corrupted(const AVCodecContext *ctx)
|
|||||||
if (val != NULL) {
|
if (val != NULL) {
|
||||||
return strcmp(val, "no") != 0;
|
return strcmp(val, "no") != 0;
|
||||||
}
|
}
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL && ctx->codec->id == AV_CODEC_ID_MJPEG) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (ctx->codec->id == AV_CODEC_ID_H264) {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int libavcodec_decompress_get_property(void *state, int property, void *val, size_t *len)
|
static int libavcodec_decompress_get_property(void *state, int property, void *val, size_t *len)
|
||||||
|
|||||||
Reference in New Issue
Block a user