AVCodecContext holds a lot of fields that are used seldom within
libavcodec, in most cases only to set options that apply to a single
family of codecs, or sometimes to completely unrelated codecs.
This was done before in the long past there was no codec private option,
and in fact nowadays global context options are rarely added (and only
when it really applies to something global), preferring to add codec
private options instead.

This set (1 of 3) tries to go over each context field and to identify
which not-really-global options should be moved to private codec options.
The rationale is that after my changes options would have a much more precise
scope, as right now it is not possible to understand which option affects
which codec without looking at the source code. The (long term) improvement
would also be to have a more compact context, with less fields to document

The option selection is a trade off between how widespread the option is
within libavcodec and how much it makes sense for an option to be global.

Vittorio

Vittorio Giovara (14):
  lavc: Move b_frame_strategy and b_sensitivity to codec private options
  lavc: Move brd_scale to codec private options
  lavc: Move frame_skip_* to codec private options
  lavc: Move chromaoffset to codec private options
  lavc: Move scenechange_threshold to codec private options
  lavc: Move noise_reduction to codec private options
  lavc: Move mpeg_quant to codec private options
  lavc: Move context_model to codec private options
  lavc: Move timecode_frame_start to codec private options
  lavc: Move rtp_payload_size to codec private options
  lavc: Move {min,max}_prediction_order to codec private options
  lavc: Move prediction_method to codec private options
  lavc: Move me_penalty_compensation to codec private options
  lavc: Move pre_me to codec private options

 libavcodec/alacenc.c         |  27 +++++++-
 libavcodec/avcodec.h         | 147 +++++++++++++++++++------------------------
 libavcodec/ffv1.h            |   1 +
 libavcodec/ffv1enc.c         |  20 ++++--
 libavcodec/flacenc.c         |  33 ++++++++--
 libavcodec/huffyuvenc.c      |  58 +++++++++++++++--
 libavcodec/jpeglsenc.c       |  39 +++++++++++-
 libavcodec/libopenh264enc.c  |  11 +---
 libavcodec/libvpxenc.c       |  21 ++++++-
 libavcodec/libx264.c         |  54 ++++++++++++++--
 libavcodec/libxavs.c         |  46 ++++++++++++--
 libavcodec/libxvid.c         |  10 +++
 libavcodec/ljpegenc.c        |  43 +++++++++++--
 libavcodec/mjpegenc.c        |  19 ++++++
 libavcodec/mjpegenc_common.c |   4 +-
 libavcodec/mjpegenc_common.h |   2 +-
 libavcodec/mpeg12enc.c       |  13 +++-
 libavcodec/mpegvideo.c       |   2 +-
 libavcodec/mpegvideo.h       |  48 ++++++++++++++
 libavcodec/mpegvideo_enc.c   | 129 +++++++++++++++++++++++++++----------
 libavcodec/options_table.h   |  26 ++++++++
 libavcodec/pngenc.c          |  35 ++++++++++-
 libavcodec/qsvenc.c          |   8 ++-
 libavcodec/qsvenc.h          |   2 +
 libavcodec/qsvenc_h264.c     |   2 +
 libavcodec/qsvenc_hevc.c     |   2 +
 libavcodec/qsvenc_mpeg2.c    |   2 +
 libavcodec/utvideo.c         |   2 +
 libavcodec/utvideoenc.c      |  29 ++++++++-
 libavcodec/version.h         |   3 +
 tests/fate/utvideo.mak       |   8 +--
 tests/fate/vcodec.mak        |   3 +-
 32 files changed, 671 insertions(+), 178 deletions(-)

-- 
2.6.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to