Skip to content

Draft: androidmedia: Extend mapping tables

Rylie Pavlik requested to merge rpavlik/gstreamer:rp/amcdec-tables into main

This patch set I am least confident in. It does silence a number of warnings/errors at startup on an almost-modern Android OS phone (Pixel 3), and seems to enhance the caps sets I see fly by when the decoder is negotiating, but I do have a few questions/notes.

  • I only added name strings that I could find in use elsewhere in the codebase/plugin caps, since my understanding is these are used for caps negotiation.
    • In an earlier revision of these patches, I simply named all constants that I got an error on the Pixel 3 with, but I am almost definitely not the right person to be making API/ABI decisions with these names. 😀
  • I am not fully confident in the "alt" names in the HEVC profile table.
    • I can follow where they are used (gst_amc_avc_profile_to_string uses the table, and the only place the alternate names are retrieved is in gst_amc_codec_info_to_caps), and it makes sense that e.g. a more-constrained version of the "baseline" profile can be decoded by a codec capable of reading the "baseline" profile, but the reverse in the encoding case is not true, as far as I can tell. The git history does not help much here either. With gst_amc_codec_info_to_caps used by both the amcvideodec and amcvideoenc code, and with amcvideoenc additionally using gst_amc_avc_profile_to_string without retrieving the alternate name, it seems like there would probably need to be an "encode_alt" and "decode_alt" field rather than just a single alternate.
    • FWIW, the additional field was added in this change: d06af026
    • So, I opted to not modify the existing table entries in this patch revision, nor supply alternates for the additional table entries I added.
  • I do not know if this is considered safe to backport.

I have marked this as draft/WIP for these reasons

Edited by Rylie Pavlik

Merge request reports