Hi On Wed, Jul 02, 2025 at 12:57:46PM +0200, Timothee wrote: > Hello, > > I am working on a modification toextract per-macroblock prediction modes > (H.264 for now). The goal is to make this information available to > vf_codecview and print it in a log file (for now). > > This are what I have added: > > 1. > > A new H264MBInfostruct holding the prediction modes. If existing data structures proof inadequate then a newly introduced data structure should allow storing macroblock info for an arbitrary square lattice of macroblocks and arbitrary rectangular subdivision tree. Or said differently, new API should support H264, H265, H266 We cannot have a incompatible data structure for each standard in public API > > 2. > > An AVBufferRef *mb_info_refis added to the H264Picturestruct to > store this data for each picture. > > 3. > > This buffer is allocated with av_buffer_allocz()in > alloc_picture()and its reference is released with > av_buffer_unref()in ff_h264_unref_picture(). > > 4. > > A new function, ff_h264_collect_mb_info(), is called after > macroblock decoding to populate the buffer. > > 5. > > In output_frame(), a new side data (AV_FRAME_DATA_H264_MB_INFO) > buffer is allocated, and the contents of srcp->mb_info_ref->dataare > copied into it. > > 6. A new function to log the result in vf_codecview.c > > This implementation results in a segmentation fault. I guess it is a race > condition, but I am struggling to fix it. missing entry in sd_props[] also make sure "make fate" works thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope