summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_examiner.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-10-03 02:02:12 +0200
committerCarl Hetherington <cth@carlh.net>2021-10-03 23:41:02 +0200
commitc2a17a87868eba87072fc369102b2b3cd8905e5a (patch)
tree0f5b5e425476efca9ad297c5e65845ae31531ba6 /src/lib/ffmpeg_examiner.cc
parentaee64f1b2c9252f8315eaead7d43e1ec58a39ee2 (diff)
Add PixelQuanta to VideoContent.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
-rw-r--r--src/lib/ffmpeg_examiner.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index 853db90be..0a236d836 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -480,3 +480,12 @@ FFmpegExaminer::range () const
return VideoRange::FULL;
}
}
+
+
+PixelQuanta
+FFmpegExaminer::pixel_quanta () const
+{
+ auto const desc = av_pix_fmt_desc_get(video_codec_context()->pix_fmt);
+ return { 1 << desc->log2_chroma_w, 1 << desc->log2_chroma_h };
+}
+