-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathvideo_filter_context.h
More file actions
32 lines (26 loc) · 1.01 KB
/
video_filter_context.h
File metadata and controls
32 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <map>
#include <string>
#include "core_types.h"
#include "demuxer.h"
#include "video_decoder.h"
// VideoFilterContext encapsulates a set of videos (left + right videos) and provides
// methods to determine reference videos for auto-filter determination.
class VideoFilterContext {
public:
struct VideoInfo {
const Demuxer* demuxer;
const VideoDecoder* decoder;
std::string custom_color_trc;
};
void add(const Side& side, const Demuxer* demuxer, const VideoDecoder* decoder, const std::string& custom_color_trc);
// Get the maximum frame rate among all videos except the given side
// (used for frame rate harmonization)
double get_max_frame_rate_excluding(const Side& side) const;
// Get the maximum peak luminance (in nits) among all videos except the given side
// (used for relative tone mapping)
unsigned get_max_peak_luminance_excluding(const Side& side) const;
private:
static bool is_interlaced(const VideoDecoder* decoder);
std::map<Side, VideoInfo> videos_;
};