webrtc/video/corruption_detection/generic_mapping_functions.h
Fanny Linderborg 4fffeabba3 Add generic mapping functions for automatic corruption detection
The functions will be used to map a frame's QP to its optimal standard
deviation for the Gaussian kernel for the filter applied in the
automatic corruption detection algorithm.

Bug: b/358039777
Change-Id: Idb3b8cfdbd4a405151c660df87205e3949f9b085
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359380
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42777}
2024-08-14 07:31:02 +00:00

28 lines
883 B
C++

/*
* Copyright 2024 The WebRTC project authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VIDEO_CORRUPTION_DETECTION_GENERIC_MAPPING_FUNCTIONS_H_
#define VIDEO_CORRUPTION_DETECTION_GENERIC_MAPPING_FUNCTIONS_H_
#include "api/video/video_codec_type.h"
namespace webrtc {
struct FilterSettings {
double std_dev = 0.0;
int luma_error_threshold = 0;
int chroma_error_threshold = 0;
};
FilterSettings GetCorruptionFilterSettings(int qp, VideoCodecType codec_type);
} // namespace webrtc
#endif // VIDEO_CORRUPTION_DETECTION_GENERIC_MAPPING_FUNCTIONS_H_