X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_examiner.cc;h=0a236d836be46b4f5baacdee175201e154de6cab;hb=c2a17a87868eba87072fc369102b2b3cd8905e5a;hp=853db90be3e3ef1ec36cc834a51f0ff6754468e9;hpb=aee64f1b2c9252f8315eaead7d43e1ec58a39ee2;p=dcpomatic.git 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 }; +} +