So, I went a bit further and made it into an internal API usable with other codecs. H.264 has a pretty much full implementation (though still missing some SEI and the silly baseline features (FMO <3)). Also included is a partial MPEG-2 implementation, missing writing support.
h264_trace has been renamed to trace_headers, and works with MPEG-2 as well. h264_metadata and h264_redundant_pps are updated, h264_closegop has been dropped for now due to unresolved corruption issues which I may come back to later. Thoughts still welcome on everything. From last time: > Todo: > * Replace the ad-hoc header-writing code in VAAPI H.264 with this. Done. Also added support for AUDs and SEI recovery points. > * Much of the error handling is missing (leaves structures in invalid states > and leaks memory). Mostly done. > * Some internal documentation would be nice. I'd like people to at least agree that the API is sensible first... > * Some way to avoid all of the copying in cases which don't need it - for > example, h264_metadata doesn't need to deal with the slice data at all, and > undoing and redoing the emulation prevention on the whole stream is a waste > of time (note that the two fixup BSFs do need this, because they may change > the byte alignment of the slice data). Not done. The current structure will support only decomposing some units in a fragment, but I haven't made it work yet. > * SEI read/write is kindof messy (ifdefs and required lengths), could be > improved. Maybe a bit better? > * Support more SEI - ideally everything which might reasonably be found in > any normal stream would be supported. > * Inferred values are incomplete. Unchanged. > * h264_generate_ts BSF: we have enough information here to generate correct > PTS/DTS for muxing raw streams, even when reordering is present. Still thinking about this - a standalone implementation of reordering would be useful for other cases as well (videotoolbox). (Another idea: a h264_mark_keyframes BSF would be nice for broadcast streams which don't include SEI recovery points.) > * More trace information - e.g. knowing all of the reference picture lists > would be rather nice. Comes with the reordering stuff, I think? > * Support for the slice data? (E.g. to make a lossless CAVLC <-> CABAC > filter...) Probably madness. Might as well write a whole decoder... - Mark (On nomenclature: "unit" = smallest standalone bitstream unit. E.g. H.26[45] NAL unit, MPEG-2 thing-beginning-with-start-code, JPEG marker segment. "fragment" = any sequence of units (though need not actually form some greater whole). E.g. H.26[45] extradata or access unit, MPEG-2 sequence, JPEG image. Naming suggestions invited.) _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
