This is my entry in the evil plan competitions, I branded it 'lesser' due to its small-case.
More seriously, this reflects the discussions and proposals that came up this and the past week, regarding the coded_frame field. As I dug further, I found a relatively simple way to make everyone happy, with a compression statitics side data (for both packet and frame), and a long lasting compatibility layer (so that users will have time to upgrade) with relatively little code. In the first part of the set I try to consolidate the coded_frame usage, in which some encoders set completely random fields that noone ever read; then I try to untangle coded_frame from the frame management in a few codecs and use internal context fields where needed. Finally I introduce the AVStats structure and API, and I replace every instance of coded_frame in the codebase. I added some lengthy comments in the more relavant commits, so make sure to check them out. If anyone wants to run the code, it's available on my repo, https://github.com/kodabb/libav/tree/codedframe. Cheers, Vittorio Vittorio Giovara (14): Move AVAudioServiceType enum from lavc to lavu Drop a few peculiar usages of coded_frame roqvideoenc: Skip assigning coded_frame libvpxenc: Do not entangle coded_frame proresenc: Do not entangle coded_frame svq1enc: Do not entangle coded_frame ffv1enc: Keep coded_frame.key_frame a write-only variable libtheoraenc: Keep coded_frame.key_frame a write-only variable qtrleenc: Keep coded_frame.key_frame a write-only variable Introduce AVStats to carry side data compression statistics lavc: Gather all coded_frame allocation and free functions to a single place lavc: Replace every instance of coded_frame with AVStats avconv: Use the new AVStats API Deprecate avctx.coded_frame avconv.c | 41 ++++++++++++++++++--------- avconv.h | 4 +++ avconv_opt.c | 9 ++++++ doc/APIchanges | 11 ++++++++ libavcodec/a64multienc.c | 21 +++++--------- libavcodec/alacenc.c | 7 ----- libavcodec/aliaspixenc.c | 23 +++------------- libavcodec/asvenc.c | 25 ++++------------- libavcodec/avcodec.h | 25 ++++++++--------- libavcodec/bmpenc.c | 17 +++--------- libavcodec/cljrenc.c | 24 +++------------- libavcodec/dnxhdenc.c | 20 ++++++-------- libavcodec/dpxenc.c | 18 +++--------- libavcodec/dvenc.c | 22 ++++----------- libavcodec/ffv1.h | 1 + libavcodec/ffv1enc.c | 29 +++++++++----------- libavcodec/flashsvenc.c | 26 ++++++++---------- libavcodec/gif.c | 13 +++------ libavcodec/huffyuvenc.c | 15 ++++------ libavcodec/internal.h | 5 ++++ libavcodec/jpeglsenc.c | 18 +++--------- libavcodec/lclenc.c | 13 +++------ libavcodec/libopencore-amr.c | 1 - libavcodec/libopenjpegenc.c | 8 ------ libavcodec/libschroedingerenc.c | 27 +++++++++++------- libavcodec/libtheoraenc.c | 24 ++++++++++------ libavcodec/libvpxenc.c | 36 ++++++++++++------------ libavcodec/libx264.c | 24 ++++++++-------- libavcodec/libx265.c | 22 +++++++-------- libavcodec/libxavs.c | 24 ++++++++-------- libavcodec/libxvid.c | 29 ++++++++++---------- libavcodec/ljpegenc.c | 13 ++++----- libavcodec/mpegvideo_enc.c | 17 ++++++++---- libavcodec/pamenc.c | 24 +++------------- libavcodec/pcm.c | 11 -------- libavcodec/pcxenc.c | 24 +++------------- libavcodec/pngenc.c | 19 ++++--------- libavcodec/pnmenc.c | 31 ++++----------------- libavcodec/proresenc.c | 27 ++++++++---------- libavcodec/pthread_frame.c | 4 +++ libavcodec/qsvenc.c | 21 ++++++++------ libavcodec/qtrleenc.c | 36 +++++++++++++----------- libavcodec/rawenc.c | 18 ++++-------- libavcodec/roqvideoenc.c | 2 -- libavcodec/sgienc.c | 18 +++--------- libavcodec/sunrastenc.c | 17 +++--------- libavcodec/svq1enc.c | 45 ++++++++++++++++++------------ libavcodec/svq1enc.h | 4 +++ libavcodec/targaenc.c | 24 +++------------- libavcodec/tiffenc.c | 25 ++++------------- libavcodec/utils.c | 61 +++++++++++++++++++++++++++++++++++++++-- libavcodec/utvideoenc.c | 14 ++-------- libavcodec/v210enc.c | 18 +++--------- libavcodec/v410enc.c | 22 +++------------ libavcodec/version.h | 5 +++- libavcodec/xbmenc.c | 23 +++------------- libavcodec/xwdenc.c | 25 +++-------------- libavcodec/zmbvenc.c | 22 ++++++++------- libavdevice/v4l2.c | 6 ---- libavfilter/af_ashowinfo.c | 1 + libavfilter/avfilter.h | 1 - libavformat/dump.c | 24 ++++++++++++++++ libavutil/Makefile | 1 + libavutil/frame.h | 9 +++++- libavutil/metadata.h | 57 ++++++++++++++++++++++++++++++++++++++ libavutil/version.h | 4 +-- 66 files changed, 581 insertions(+), 674 deletions(-) create mode 100644 libavutil/metadata.h -- 1.9.5 (Apple Git-50.3) _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
