Fei, Thank you for your response. I am looking at adding my own header which I'm planning to parse in mesa driver. To be exact, I would like to add my header after the default frame headers in the unit->data at the av1_decode_frame() function. I tried allocating my own buffer bigger than the "raw_tile_group->tile_data.data" and added my header in front of the actual data. I'm afraid the cleanup will miss my buffer and lead to leak. I have two questions 1. How can I get the frame header size? I see the frame header size is available from CodedBitstreamAV1Context in the libavcodec/cbs_av1_syntax_template.c:frame_header_obu(). Please let me know how to get it in the AV1DecContext in the av1dec.c. 2. How to realloc the "raw_tile_group->tile_data.data" to insert my buffer inbetween. Let's say the current buffer sent to hw_decode is (FrameHeader+FrameData), the modified buffer will look like (FrameHeader+MyOwnHeader+FrameData).
The other codecs hevc and vp9 were using "AVPacket" for the slice data, I added my header by a simple realloc of the AVPacket. For AV1, I'm a bit lost because of the tile data structures. Thanks, Veera On Wed, Aug 17, 2022 at 7:28 PM Wang, Fei W < fei.w.wang-at-intel....@ffmpeg.org> wrote: > On Wed, 2022-08-17 at 18:13 +0530, Veerabadhran Gopalakrishnan wrote: > > Hi, > I would like to add an extra header in front of the tile data which is > being passed to the decode_slice. > Could you please recommend how to modify the buffers in a safer and leak > proof way? > > > What kind of extra header? If frame header or sequence header you can get > from AVCodecContext inside decode_slice. > > Thanks > Fei > > > > _______________________________________________ > > Libav-user mailing list > > Libav-user@ffmpeg.org > > > https://ffmpeg.org/mailman/listinfo/libav-user > > > > To unsubscribe, visit link above, or email > > libav-user-requ...@ffmpeg.org > > with subject "unsubscribe". > > _______________________________________________ > Libav-user mailing list > Libav-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/libav-user > > To unsubscribe, visit link above, or email > libav-user-requ...@ffmpeg.org with subject "unsubscribe". > -- Thanks & Regards, Veerabadhran G Ph - 8553776883
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".