Igalia / GstVkVideoParser

Video parsing library using GStreamer
GNU Lesser General Public License v2.1
5 stars 3 forks source link

Support foot h265 stream #8

Open dabrain34 opened 2 years ago

dabrain34 commented 2 years ago

The foot.zip is not correctly displayed by vk_video_decoder using GstVkVideoParser

charlie-ht commented 1 year ago

I took a look into this stream. It's characteristics are,

Geometry  :                                                           
        Coded Width : 1920                                            
        Displayed Width : 1920                                        
        Coded Height : 1080                                           
        Displayed Height : 1080                                       
Codec : decode h.265                                                  
VideoChromaFormat : 420                                                                                                                      
VideoFormat : PAL
ColorPrimaries : BT470BG
TransferCharacteristics : BT470BG
MatrixCoefficients : BT470BG

The rendering with GstVkParser has no relevant detail in the resultant pictures. The problem is that the parser is not correctly handling the scaling lists. I get correct rendering if I fudge them to the right values. I will investigate the root cause of the scaling matrix parsing next.

I'm attaching API dumps of Gst vs Nvidia for future reference. There are several interesting differences,

  1. The scaling matrices. Gst doesn't seem to be parsing these correclty. Causes the misrendering.
  2. The codedExtent's height in vkCmdDecodeVideo is 1080 for Gst, but 1088 for nv. Apparently not a problem, but weird!
  3. sar_width and sar_height are 0 for gst, 1 for nv. Ditto for 2.
  4. No pShortTermRefPicSet, there is a FIXME in the parser about handling this properly. Ditto for 2.

JSON API dumps between nvidia are gst gst.txt nvidia.txt