Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Media Common] Add DRM format mappings for JPEG decoder output #1708

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

philipl
Copy link
Contributor

@philipl philipl commented Aug 5, 2023

The output formats from the JPEG decoder are currently not included
in the DRM format mapping functions. This means that any attempt to
call vaExportSurface on JPEG images will fail.

However, there is no functional gap beyond the missing mappings, so if
we add them in, exporting will then work correctly.

The four formats in question are IMC3, 422H, 422V, and 444P.

  • 422H and 444P have trivial 1:1 mappings.
  • IMC3 can be treated the same as I420, because the only difference is
    the chroma pitch, and that's explicitly set in the descriptor
  • 422V (aka 440P) has the same memory layout as 422H - it's just a
    difference in how the consumer handle the chroma

I also added the missing XYUV composite object mapping - it was already
present for separate planes.

Tested with ffmpeg+mpv.

@philipl philipl force-pushed the imc3-drm-format branch 2 times, most recently from 798dc4d to 633a91e Compare August 5, 2023 10:44
@philipl philipl changed the title [Media Common] Add DRM format mappings for IMC3 [Media Common] Add DRM format mappings for JPEG decoder output Aug 5, 2023
The output formats from the JPEG decoder are currently not included
in the DRM format mapping functions. This means that any attempt to
call vaExportSurface on JPEG images will fail.

However, there is no functional gap beyond the missing mappings, so if
we add them in, exporting will then work correctly.

The four formats in question are IMC3, 422H, 422V, and 444P.

* 422H and 444P have trivial 1:1 mappings.
* IMC3 can be treated the same as I420, because the only difference is
  the chroma pitch, and that's explicitly set in the descriptor
* 422V (aka 440P) has the same memory layout as 422H - it's just a
  difference in how the consumer handle the chroma

I also added the missing XYUV composite object mapping - it was already
present for separate planes.

Tested with ffmpeg+mpv.
@Sherry-Lin Sherry-Lin added the verifying PR: fix ready and verifying with build/test label Aug 24, 2023
@intel-mediadev intel-mediadev merged commit c7cd5a6 into intel:master Aug 24, 2023
12 checks passed
@Jexu
Copy link
Contributor

Jexu commented Aug 30, 2023

Hi @philipl , thanks for your fix that helps it work in media lagecy code path. But intel xe plaforms will switch to the APO code path under media_softlet, so could you also help port this fix there in https://github.com/intel/media-driver/blob/master/media_softlet/linux/common/ddi/media_libva_interface_next.cpp?

@philipl philipl deleted the imc3-drm-format branch August 30, 2023 16:27
@philipl
Copy link
Contributor Author

philipl commented Aug 30, 2023

See #1718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verifying PR: fix ready and verifying with build/test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants