LibMedia: Use FFmpeg's info to tell us if YUVJ is full-range

It reports this correctly for the video linked in #4993, and likely any
other videos using the YUVJ format, so we don't need this extra check.
This commit is contained in:
Zaggy1024 2025-09-10 19:42:58 -05:00 committed by Gregory Bertilson
parent 4a5c374084
commit 924ba6c1f4
Notes: github-actions[bot] 2025-09-11 23:43:06 +00:00

View file

@ -140,15 +140,6 @@ DecoderErrorOr<NonnullOwnPtr<VideoFrame>> FFmpegVideoDecoder::get_decoded_frame(
auto transfer_characteristics = static_cast<TransferCharacteristics>(m_frame->color_trc);
auto matrix_coefficients = static_cast<MatrixCoefficients>(m_frame->colorspace);
auto color_range = [&] {
switch (m_frame->format) {
case AV_PIX_FMT_YUVJ420P:
case AV_PIX_FMT_YUVJ422P:
case AV_PIX_FMT_YUVJ444P:
return VideoFullRangeFlag::Full;
default:
break;
}
switch (m_frame->color_range) {
case AVColorRange::AVCOL_RANGE_MPEG:
return VideoFullRangeFlag::Studio;