Page MenuHomePhabricator

Bug 1837627 Don't use YUVColorSpace::Identity for YUV pixel formats r?alwu
ClosedPublic

Authored by stransky on Jul 25 2023, 12:10 PM.
Referenced Files
Unknown Object (File)
Thu, Oct 16, 3:17 PM
Unknown Object (File)
Tue, Sep 23, 5:18 AM
Unknown Object (File)
Sep 14 2025, 9:25 PM
Unknown Object (File)
Jan 25 2025, 7:07 AM
Unknown Object (File)
Dec 29 2024, 11:29 AM
Unknown Object (File)
Dec 16 2024, 8:17 AM
Subscribers

Details

Summary

Check color space of video frames and use YUVColorSpace::Identity for RGB frames only. This patch also unifies color space setup for shm and non-shm video decoding paths.

  • Implement TransferAVColorSpaceToColorSpace() to convert color space from AVColorSpace to gfx::YUVColorSpace. It also check color format and doesn't allow to mix YUV color space and RGB formats.
  • Use TransferAVColorSpaceToColorSpace() in both shm and non-shm decoding paths.

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.

Code analysis found 5 defects in diff 746417:

  • 5 build errors found by clang-tidy
IMPORTANT: Found 5 defects (error level) that must be fixed before landing.

You can run this analysis locally with:

  • ./mach static-analysis check --outgoing (C/C++)

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 746417.

alwu added inline comments.
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
616

Should we check other RGB formats as well? or AV_PIX_FMT_GBRP is the only RGB format we support?

This revision is now accepted and ready to land.Jul 26 2023, 10:31 PM
stransky added inline comments.