Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Oct 2013 10:34:23 +0000 (12:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Oct 2013 10:34:23 +0000 (12:34 +0200)
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
libavcodec/8svx.c
libavcodec/alac.c
libavcodec/cljr.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dpxenc.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/dvdsubenc.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g726.c
libavcodec/gif.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopencore-amr.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libspeexenc.c
libavcodec/libvo-amrwbenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/ljpegenc.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/proresdec_lgpl.c
libavcodec/proresenc_kostya.c
libavcodec/ra144enc.c
libavcodec/rawdec.c
libavcodec/rv10.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tta.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/wavpack.c
libavcodec/xbmenc.c
libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
267 files changed:
1  2 
libavcodec/4xm.c
libavcodec/8bps.c
libavcodec/8svx.c
libavcodec/a64multienc.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/aasc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_fixed.c
libavcodec/ac3enc_float.c
libavcodec/adpcm.c
libavcodec/adpcmenc.c
libavcodec/adxdec.c
libavcodec/adxenc.c
libavcodec/aic.c
libavcodec/alac.c
libavcodec/alacenc.c
libavcodec/alsdec.c
libavcodec/amrnbdec.c
libavcodec/amrwbdec.c
libavcodec/anm.c
libavcodec/ansi.c
libavcodec/apedec.c
libavcodec/asvdec.c
libavcodec/asvenc.c
libavcodec/aura.c
libavcodec/avs.c
libavcodec/bethsoftvideo.c
libavcodec/bfi.c
libavcodec/bink.c
libavcodec/binkaudio.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/bmv.c
libavcodec/c93.c
libavcodec/cavsdec.c
libavcodec/cdgraphics.c
libavcodec/cdxl.c
libavcodec/cinepak.c
libavcodec/cljr.c
libavcodec/cllc.c
libavcodec/cngdec.c
libavcodec/cngenc.c
libavcodec/cook.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dcadec.c
libavcodec/dfa.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dpcm.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/dsicinav.c
libavcodec/dv.c
libavcodec/dvbsub.c
libavcodec/dvbsubdec.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/dvdsubenc.c
libavcodec/dxa.c
libavcodec/eac3enc.c
libavcodec/eacmv.c
libavcodec/eamad.c
libavcodec/eatgq.c
libavcodec/eatgv.c
libavcodec/eatqi.c
libavcodec/escape124.c
libavcodec/escape130.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flashsv.c
libavcodec/flashsvenc.c
libavcodec/flicvideo.c
libavcodec/flvdec.c
libavcodec/flvenc.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g722dec.c
libavcodec/g722enc.c
libavcodec/g723_1.c
libavcodec/g726.c
libavcodec/gif.c
libavcodec/gifdec.c
libavcodec/gsmdec.c
libavcodec/h261dec.c
libavcodec/h261enc.c
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/huffyuvdec.c
libavcodec/huffyuvenc.c
libavcodec/idcinvideo.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/indeo2.c
libavcodec/indeo3.c
libavcodec/indeo4.c
libavcodec/indeo5.c
libavcodec/intelh263dec.c
libavcodec/interplayvideo.c
libavcodec/kgv1dec.c
libavcodec/kmvc.c
libavcodec/lagarith.c
libavcodec/lcldec.c
libavcodec/lclenc.c
libavcodec/libfaac.c
libavcodec/libfdk-aacenc.c
libavcodec/libgsm.c
libavcodec/libilbc.c
libavcodec/libmp3lame.c
libavcodec/libopencore-amr.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libopusdec.c
libavcodec/libopusenc.c
libavcodec/libschroedingerdec.c
libavcodec/libschroedingerenc.c
libavcodec/libspeexdec.c
libavcodec/libspeexenc.c
libavcodec/libtheoraenc.c
libavcodec/libvo-aacenc.c
libavcodec/libvo-amrwbenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/ljpegenc.c
libavcodec/loco.c
libavcodec/mace.c
libavcodec/mdec.c
libavcodec/mimic.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/mlpdec.c
libavcodec/mmvideo.c
libavcodec/motionpixels.c
libavcodec/mpc7.c
libavcodec/mpc8.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegaudiodec.c
libavcodec/mpegaudiodec_float.c
libavcodec/mpegaudioenc.c
libavcodec/mpegvideo_enc.c
libavcodec/msmpeg4dec.c
libavcodec/msrle.c
libavcodec/mss1.c
libavcodec/mss2.c
libavcodec/mss3.c
libavcodec/mss4.c
libavcodec/msvideo1.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nuv.c
libavcodec/pamenc.c
libavcodec/pcm-bluray.c
libavcodec/pcm.c
libavcodec/pcx.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pictordec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/proresdec_lgpl.c
libavcodec/proresenc_kostya.c
libavcodec/ptx.c
libavcodec/qcelpdec.c
libavcodec/qdm2.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrle.c
libavcodec/qtrleenc.c
libavcodec/r210dec.c
libavcodec/ra144dec.c
libavcodec/ra144enc.c
libavcodec/ra288.c
libavcodec/ralf.c
libavcodec/rawdec.c
libavcodec/rawenc.c
libavcodec/rl2.c
libavcodec/roqaudioenc.c
libavcodec/roqvideodec.c
libavcodec/roqvideoenc.c
libavcodec/rpza.c
libavcodec/rv10.c
libavcodec/rv10enc.c
libavcodec/rv20enc.c
libavcodec/rv30.c
libavcodec/rv40.c
libavcodec/s302m.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/shorten.c
libavcodec/sipr.c
libavcodec/smacker.c
libavcodec/smc.c
libavcodec/sp5xdec.c
libavcodec/sunrast.c
libavcodec/sunrastenc.c
libavcodec/svq1dec.c
libavcodec/svq1enc.c
libavcodec/svq3.c
libavcodec/takdec.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiertexseqv.c
libavcodec/tmv.c
libavcodec/truemotion1.c
libavcodec/truemotion2.c
libavcodec/truespeech.c
libavcodec/tscc.c
libavcodec/tscc2.c
libavcodec/tta.c
libavcodec/twinvqdec.c
libavcodec/txd.c
libavcodec/ulti.c
libavcodec/utvideodec.c
libavcodec/utvideoenc.c
libavcodec/v210dec.c
libavcodec/v210enc.c
libavcodec/v210x.c
libavcodec/v410dec.c
libavcodec/v410enc.c
libavcodec/vb.c
libavcodec/vble.c
libavcodec/vc1dec.c
libavcodec/vcr1.c
libavcodec/vmdav.c
libavcodec/vmnc.c
libavcodec/vorbisdec.c
libavcodec/vorbisenc.c
libavcodec/vp3.c
libavcodec/vp5.c
libavcodec/vp6.c
libavcodec/vp8.c
libavcodec/vqavideo.c
libavcodec/wavpack.c
libavcodec/wmadec.c
libavcodec/wmaenc.c
libavcodec/wmalosslessdec.c
libavcodec/wmaprodec.c
libavcodec/wmavoice.c
libavcodec/wmv2dec.c
libavcodec/wmv2enc.c
libavcodec/wnv1.c
libavcodec/ws-snd1.c
libavcodec/xan.c
libavcodec/xbmenc.c
libavcodec/xl.c
libavcodec/xsubdec.c
libavcodec/xsubenc.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/xxan.c
libavcodec/yop.c
libavcodec/zerocodec.c
libavcodec/zmbv.c
libavcodec/zmbvenc.c

Simple merge
Simple merge
@@@ -184,32 -196,30 +184,32 @@@ static av_cold int eightsvx_decode_clos
      return 0;
  }
  
 +#if CONFIG_EIGHTSVX_FIB_DECODER
  AVCodec ff_eightsvx_fib_decoder = {
    .name           = "8svx_fib",
+   .long_name      = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = AV_CODEC_ID_8SVX_FIB,
    .priv_data_size = sizeof (EightSvxContext),
    .init           = eightsvx_decode_init,
 -  .close          = eightsvx_decode_close,
    .decode         = eightsvx_decode_frame,
 -  .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
 +  .close          = eightsvx_decode_close,
 +  .capabilities   = CODEC_CAP_DR1,
-   .long_name      = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
    .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                      AV_SAMPLE_FMT_NONE },
  };
 -
 +#endif
 +#if CONFIG_EIGHTSVX_EXP_DECODER
  AVCodec ff_eightsvx_exp_decoder = {
    .name           = "8svx_exp",
+   .long_name      = NULL_IF_CONFIG_SMALL("8SVX exponential"),
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = AV_CODEC_ID_8SVX_EXP,
    .priv_data_size = sizeof (EightSvxContext),
    .init           = eightsvx_decode_init,
 -  .close          = eightsvx_decode_close,
    .decode         = eightsvx_decode_frame,
 -  .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
 +  .close          = eightsvx_decode_close,
 +  .capabilities   = CODEC_CAP_DR1,
-   .long_name      = NULL_IF_CONFIG_SMALL("8SVX exponential"),
    .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                      AV_SAMPLE_FMT_NONE },
  };
@@@ -393,9 -371,9 +393,10 @@@ static int a64multi_encode_frame(AVCode
      return 0;
  }
  
 +#if CONFIG_A64MULTI_ENCODER
  AVCodec ff_a64multi_encoder = {
      .name           = "a64multi",
+     .long_name      = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_A64_MULTI,
      .priv_data_size = sizeof(A64Context),
      .encode2        = a64multi_encode_frame,
      .close          = a64multi_close_encoder,
      .pix_fmts       = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
-     .long_name      = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
      .capabilities   = CODEC_CAP_DELAY,
  };
 -
 +#endif
 +#if CONFIG_A64MULTI5_ENCODER
  AVCodec ff_a64multi5_encoder = {
      .name           = "a64multi5",
+     .long_name      = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_A64_MULTI5,
      .priv_data_size = sizeof(A64Context),
      .encode2        = a64multi_encode_frame,
      .close          = a64multi_close_encoder,
      .pix_fmts       = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
-     .long_name      = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
      .capabilities   = CODEC_CAP_DELAY,
  };
 +#endif
Simple merge
@@@ -806,15 -802,9 +806,16 @@@ static const AVClass aacenc_class = 
      LIBAVUTIL_VERSION_INT,
  };
  
 +/* duplicated from avpriv_mpeg4audio_sample_rates to avoid shared build
 + * failures */
 +static const int mpeg4audio_sample_rates[16] = {
 +    96000, 88200, 64000, 48000, 44100, 32000,
 +    24000, 22050, 16000, 12000, 11025, 8000, 7350
 +};
 +
  AVCodec ff_aac_encoder = {
      .name           = "aac",
+     .long_name      = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_AAC,
      .priv_data_size = sizeof(AACEncContext),
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -617,22 -569,14 +617,22 @@@ static av_cold int alac_decode_init(AVC
      return 0;
  }
  
 +static int init_thread_copy(AVCodecContext *avctx)
 +{
 +    ALACContext *alac = avctx->priv_data;
 +    alac->avctx = avctx;
 +    return allocate_buffers(alac);
 +}
 +
  AVCodec ff_alac_decoder = {
      .name           = "alac",
+     .long_name      = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_ALAC,
      .priv_data_size = sizeof(ALACContext),
      .init           = alac_decode_init,
      .close          = alac_decode_close,
      .decode         = alac_decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -307,9 -312,9 +307,10 @@@ static av_cold int decode_end(AVCodecCo
      return 0;
  }
  
 +#if CONFIG_ASV1_DECODER
  AVCodec ff_asv1_decoder = {
      .name           = "asv1",
+     .long_name      = NULL_IF_CONFIG_SMALL("ASUS V1"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_ASV1,
      .priv_data_size = sizeof(ASV1Context),
      .close          = decode_end,
      .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("ASUS V1"),
  };
 +#endif
  
 +#if CONFIG_ASV2_DECODER
  AVCodec ff_asv2_decoder = {
      .name           = "asv2",
+     .long_name      = NULL_IF_CONFIG_SMALL("ASUS V2"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_ASV2,
      .priv_data_size = sizeof(ASV1Context),
      .close          = decode_end,
      .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("ASUS V2"),
  };
 +#endif
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -161,8 -161,10 +161,9 @@@ static int bmp_encode_frame(AVCodecCont
  
  AVCodec ff_bmp_encoder = {
      .name           = "bmp",
+     .long_name      = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_BMP,
 -    .priv_data_size = sizeof(BMPContext),
      .init           = bmp_encode_init,
      .encode2        = bmp_encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]){
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -161,22 -150,9 +161,23 @@@ static int encode_frame(AVCodecContext 
      return 0;
  }
  
 +#define OFFSET(x) offsetof(CLJRContext, x)
 +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 +static const AVOption options[] = {
 +    { "dither_type",   "Dither type",   OFFSET(dither_type),        AV_OPT_TYPE_INT, { .i64=1 }, 0, 2, VE},
 +    { NULL },
 +};
 +
 +static const AVClass cljr_class = {
 +    .class_name = "cljr encoder",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_cljr_encoder = {
      .name           = "cljr",
+     .long_name      = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_CLJR,
      .priv_data_size = sizeof(CLJRContext),
      .encode2        = encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
                                                     AV_PIX_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
 +    .priv_class     = &cljr_class,
  };
  #endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -419,6 -392,5 +420,5 @@@ AVCodec ff_dnxhd_decoder = 
      .init           = dnxhd_decode_init,
      .close          = dnxhd_decode_close,
      .decode         = dnxhd_decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
  };
@@@ -1030,13 -1018,9 +1030,14 @@@ static av_cold int dnxhd_encode_end(AVC
      return 0;
  }
  
 +static const AVCodecDefault dnxhd_defaults[] = {
 +    { "qmax", "1024" }, /* Maximum quantization scale factor allowed for VC-3 */
 +    { NULL },
 +};
 +
  AVCodec ff_dnxhd_encoder = {
      .name           = "dnxhd",
+     .long_name      = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_DNXHD,
      .priv_data_size = sizeof(DNXHDEncContext),
      .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P,
                                                    AV_PIX_FMT_YUV422P10,
                                                    AV_PIX_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("VC3/DNxHD"),
 -    .priv_class     = &class,
 +    .priv_class     = &dnxhd_class,
 +    .defaults       = dnxhd_defaults,
  };
Simple merge
Simple merge
@@@ -234,18 -174,17 +234,18 @@@ static int encode_frame(AVCodecContext 
  }
  
  AVCodec ff_dpx_encoder = {
 -    .name = "dpx",
 -    .long_name = NULL_IF_CONFIG_SMALL("DPX image"),
 -    .type = AVMEDIA_TYPE_VIDEO,
 -    .id   = AV_CODEC_ID_DPX,
 +    .name           = "dpx",
++    .long_name      = NULL_IF_CONFIG_SMALL("DPX image"),
 +    .type           = AVMEDIA_TYPE_VIDEO,
 +    .id             = AV_CODEC_ID_DPX,
      .priv_data_size = sizeof(DPXContext),
 -    .init   = encode_init,
 -    .encode2 = encode_frame,
 -    .pix_fmts = (const enum AVPixelFormat[]){
 -        AV_PIX_FMT_RGB24,
 -        AV_PIX_FMT_RGBA,
 -        AV_PIX_FMT_RGB48LE,
 -        AV_PIX_FMT_RGB48BE,
 +    .init           = encode_init,
 +    .encode2        = encode_frame,
 +    .pix_fmts       = (const enum AVPixelFormat[]){
 +        AV_PIX_FMT_RGB24,    AV_PIX_FMT_RGBA,
 +        AV_PIX_FMT_RGB48LE,  AV_PIX_FMT_RGB48BE,
 +        AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_RGBA64BE,
 +        AV_PIX_FMT_GBRP10LE, AV_PIX_FMT_GBRP10BE,
 +        AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP12BE,
          AV_PIX_FMT_NONE},
-     .long_name     = NULL_IF_CONFIG_SMALL("DPX image"),
  };
Simple merge
diff --cc libavcodec/dv.c
Simple merge
Simple merge
Simple merge
@@@ -377,6 -378,4 +378,5 @@@ AVCodec ff_dvvideo_decoder = 
      .close          = dvvideo_close,
      .decode         = dvvideo_decode_frame,
      .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
 +    .max_lowres     = 3,
  };
@@@ -640,27 -538,12 +640,27 @@@ static av_cold int dvdsub_close(AVCodec
      return 0;
  }
  
 +#define OFFSET(field) offsetof(DVDSubContext, field)
 +#define VD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
 +static const AVOption options[] = {
 +    { "palette", "set the global palette", OFFSET(palette_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VD },
 +    { NULL }
 +};
 +static const AVClass dvdsub_class = {
 +    .class_name = "dvdsubdec",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_dvdsub_decoder = {
      .name           = "dvdsub",
+     .long_name      = NULL_IF_CONFIG_SMALL("DVD subtitles"),
      .type           = AVMEDIA_TYPE_SUBTITLE,
      .id             = AV_CODEC_ID_DVD_SUBTITLE,
      .priv_data_size = sizeof(DVDSubContext),
      .init           = dvdsub_init,
      .decode         = dvdsub_decode,
-     .long_name      = NULL_IF_CONFIG_SMALL("DVD subtitles"),
 +    .close          = dvdsub_close,
 +    .priv_class     = &dvdsub_class,
  };
@@@ -434,10 -217,8 +434,10 @@@ static int dvdsub_encode(AVCodecContex
  
  AVCodec ff_dvdsub_encoder = {
      .name           = "dvdsub",
+     .long_name      = NULL_IF_CONFIG_SMALL("DVD subtitles"),
      .type           = AVMEDIA_TYPE_SUBTITLE,
      .id             = AV_CODEC_ID_DVD_SUBTITLE,
 +    .init           = dvdsub_init,
      .encode_sub     = dvdsub_encode,
-     .long_name      = NULL_IF_CONFIG_SMALL("DVD subtitles"),
 +    .priv_data_size = sizeof(DVDSubtitleContext),
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -967,109 -906,15 +967,109 @@@ static int decode_frame(AVCodecContext 
      return buf_size;
  }
  
 +static int init_thread_copy(AVCodecContext *avctx)
 +{
 +    FFV1Context *f = avctx->priv_data;
 +    int i, ret;
 +
 +    f->picture.f      = NULL;
 +    f->last_picture.f = NULL;
 +    f->sample_buffer  = NULL;
 +    f->slice_count = 0;
 +
 +    for (i = 0; i < f->quant_table_count; i++) {
 +        av_assert0(f->version > 1);
 +        f->initial_states[i] = av_memdup(f->initial_states[i],
 +                                         f->context_count[i] * sizeof(*f->initial_states[i]));
 +    }
 +
 +    f->picture.f      = av_frame_alloc();
 +    f->last_picture.f = av_frame_alloc();
 +
 +    if ((ret = ffv1_init_slice_contexts(f)) < 0)
 +        return ret;
 +
 +    return 0;
 +}
 +
 +static void copy_fields(FFV1Context *fsdst, FFV1Context *fssrc, FFV1Context *fsrc)
 +{
 +    fsdst->version             = fsrc->version;
 +    fsdst->micro_version       = fsrc->micro_version;
 +    fsdst->chroma_planes       = fsrc->chroma_planes;
 +    fsdst->chroma_h_shift      = fsrc->chroma_h_shift;
 +    fsdst->chroma_v_shift      = fsrc->chroma_v_shift;
 +    fsdst->transparency        = fsrc->transparency;
 +    fsdst->plane_count         = fsrc->plane_count;
 +    fsdst->ac                  = fsrc->ac;
 +    fsdst->colorspace          = fsrc->colorspace;
 +
 +    fsdst->ec                  = fsrc->ec;
 +    fsdst->intra               = fsrc->intra;
 +    fsdst->slice_damaged       = fssrc->slice_damaged;
 +    fsdst->key_frame_ok        = fsrc->key_frame_ok;
 +
 +    fsdst->bits_per_raw_sample = fsrc->bits_per_raw_sample;
 +    fsdst->packed_at_lsb       = fsrc->packed_at_lsb;
 +    fsdst->slice_count         = fsrc->slice_count;
 +    if (fsrc->version<3){
 +        fsdst->slice_x             = fssrc->slice_x;
 +        fsdst->slice_y             = fssrc->slice_y;
 +        fsdst->slice_width         = fssrc->slice_width;
 +        fsdst->slice_height        = fssrc->slice_height;
 +    }
 +}
 +
 +static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
 +{
 +    FFV1Context *fsrc = src->priv_data;
 +    FFV1Context *fdst = dst->priv_data;
 +    int i, ret;
 +
 +    if (dst == src)
 +        return 0;
 +
 +    {
 +        FFV1Context bak = *fdst;
 +        memcpy(fdst, fsrc, sizeof(*fdst));
 +        memcpy(fdst->initial_states, bak.initial_states, sizeof(fdst->initial_states));
 +        memcpy(fdst->slice_context,  bak.slice_context , sizeof(fdst->slice_context));
 +        fdst->picture      = bak.picture;
 +        fdst->last_picture = bak.last_picture;
 +        for (i = 0; i<fdst->num_h_slices * fdst->num_v_slices; i++) {
 +            FFV1Context *fssrc = fsrc->slice_context[i];
 +            FFV1Context *fsdst = fdst->slice_context[i];
 +            copy_fields(fsdst, fssrc, fsrc);
 +        }
 +        av_assert0(!fdst->plane[0].state);
 +        av_assert0(!fdst->sample_buffer);
 +    }
 +
 +    av_assert1(fdst->slice_count == fsrc->slice_count);
 +
 +
 +    ff_thread_release_buffer(dst, &fdst->picture);
 +    if (fsrc->picture.f->data[0]) {
 +        if ((ret = ff_thread_ref_frame(&fdst->picture, &fsrc->picture)) < 0)
 +            return ret;
 +    }
 +
 +    fdst->fsrc = fsrc;
 +
 +    return 0;
 +}
 +
  AVCodec ff_ffv1_decoder = {
      .name           = "ffv1",
+     .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_FFV1,
      .priv_data_size = sizeof(FFV1Context),
 -    .init           = ffv1_decode_init,
 +    .init           = decode_init,
      .close          = ffv1_close,
 -    .decode         = ffv1_decode_frame,
 +    .decode         = decode_frame,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
      .capabilities   = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/ |
 -                      CODEC_CAP_SLICE_THREADS,
 +                      CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
  };
@@@ -1232,7 -1097,6 +1233,6 @@@ AVCodec ff_ffv1_encoder = 
          AV_PIX_FMT_NONE
  
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
      .defaults       = ffv1_defaults,
 -    .priv_class     = &class,
 +    .priv_class     = &ffv1_class,
  };
@@@ -597,9 -564,7 +598,8 @@@ AVCodec ff_flac_decoder = 
      .init           = flac_decode_init,
      .close          = flac_decode_close,
      .decode         = flac_decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
                                                        AV_SAMPLE_FMT_S16P,
                                                        AV_SAMPLE_FMT_S32,
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -131,7 -129,5 +132,6 @@@ AVCodec ff_flv_decoder = 
      .close          = ff_h263_decode_end,
      .decode         = ff_h263_decode_frame,
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
Simple merge
@@@ -319,6 -377,5 +320,5 @@@ AVCodec ff_fraps_decoder = 
      .init           = decode_init,
      .close          = decode_end,
      .decode         = decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("Fraps"),
  };
@@@ -102,27 -94,12 +102,27 @@@ static int decode_frame(AVCodecContext 
      return avpkt->size;
  }
  
 +static const AVOption frwu_options[] = {
 +    {"change_field_order", "Change field order", offsetof(FRWUContext, change_field_order), FF_OPT_TYPE_INT,
 +     {.i64 = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM},
 +    {NULL}
 +};
 +
 +static const AVClass frwu_class = {
 +    .class_name = "frwu Decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = frwu_options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_frwu_decoder = {
      .name           = "frwu",
+     .long_name      = NULL_IF_CONFIG_SMALL("Forward Uncompressed"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_FRWU,
 +    .priv_data_size = sizeof(FRWUContext),
      .init           = decode_init,
      .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Forward Uncompressed"),
 +    .priv_class     = &frwu_class,
  };
Simple merge
Simple merge
Simple merge
@@@ -390,8 -393,7 +391,7 @@@ AVCodec ff_adpcm_g726_encoder = 
      .capabilities   = CODEC_CAP_SMALL_LAST_FRAME,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
 -    .priv_class     = &class,
 +    .priv_class     = &g726_class,
      .defaults       = defaults,
  };
  #endif
@@@ -283,24 -179,9 +283,25 @@@ static int gif_encode_close(AVCodecCont
      return 0;
  }
  
 +#define OFFSET(x) offsetof(GIFContext, x)
 +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 +static const AVOption gif_options[] = {
 +    { "gifflags", "set GIF flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = GF_OFFSETTING|GF_TRANSDIFF}, 0, INT_MAX, FLAGS, "flags" },
 +        { "offsetting", "enable picture offsetting", 0, AV_OPT_TYPE_CONST, {.i64=GF_OFFSETTING}, INT_MIN, INT_MAX, FLAGS, "flags" },
 +        { "transdiff", "enable transparency detection between frames", 0, AV_OPT_TYPE_CONST, {.i64=GF_TRANSDIFF}, INT_MIN, INT_MAX, FLAGS, "flags" },
 +    { NULL }
 +};
 +
 +static const AVClass gif_class = {
 +    .class_name = "GIF encoder",
 +    .item_name  = av_default_item_name,
 +    .option     = gif_options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_gif_encoder = {
      .name           = "gif",
+     .long_name      = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_GIF,
      .priv_data_size = sizeof(GIFContext),
          AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE,
          AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
 +    .priv_class     = &gif_class,
  };
@@@ -514,24 -317,9 +514,25 @@@ static av_cold int gif_decode_close(AVC
      return 0;
  }
  
 +static const AVOption options[] = {
 +    { "trans_color", "color value (ARGB) that is used instead of transparent color",
 +      offsetof(GifState, trans_color), AV_OPT_TYPE_INT,
 +      {.i64 = GIF_TRANSPARENT_COLOR}, 0, 0xffffffff,
 +      AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM },
 +    { NULL },
 +};
 +
 +static const AVClass decoder_class = {
 +    .class_name = "gif decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +    .category   = AV_CLASS_CATEGORY_DECODER,
 +};
 +
  AVCodec ff_gif_decoder = {
      .name           = "gif",
+     .long_name      = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_GIF,
      .priv_data_size = sizeof(GifState),
      .close          = gif_decode_close,
      .decode         = gif_decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"),
 +    .priv_class     = &decoder_class,
  };
@@@ -108,9 -101,9 +108,10 @@@ static void gsm_flush(AVCodecContext *a
      memset(s, 0, sizeof(*s));
  }
  
 +#if CONFIG_GSM_DECODER
  AVCodec ff_gsm_decoder = {
      .name           = "gsm",
+     .long_name      = NULL_IF_CONFIG_SMALL("GSM"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM,
      .priv_data_size = sizeof(GSMContext),
      .decode         = gsm_decode_frame,
      .flush          = gsm_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("GSM"),
  };
 -
 +#endif
 +#if CONFIG_GSM_MS_DECODER
  AVCodec ff_gsm_ms_decoder = {
      .name           = "gsm_ms",
+     .long_name      = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM_MS,
      .priv_data_size = sizeof(GSMContext),
      .decode         = gsm_decode_frame,
      .flush          = gsm_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"),
  };
 +#endif
@@@ -670,6 -669,4 +671,5 @@@ AVCodec ff_h261_decoder = 
      .close          = h261_decode_end,
      .decode         = h261_decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("H.261"),
 +    .max_lowres     = 3,
  };
Simple merge
@@@ -794,23 -740,5 +795,22 @@@ AVCodec ff_h263_decoder = 
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 |
                        CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
      .flush          = ff_mpeg_flush,
-     .long_name      = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
 +    .max_lowres     = 3,
-     .long_name      = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
 +    .pix_fmts       = ff_h263_hwaccel_pixfmt_list_420,
 +};
 +
 +AVCodec ff_h263p_decoder = {
 +    .name           = "h263p",
++    .long_name      = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
 +    .type           = AVMEDIA_TYPE_VIDEO,
 +    .id             = AV_CODEC_ID_H263P,
 +    .priv_data_size = sizeof(MpegEncContext),
 +    .init           = ff_h263_decode_init,
 +    .close          = ff_h263_decode_end,
 +    .decode         = ff_h263_decode_frame,
 +    .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 |
 +                      CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
 +    .flush          = ff_mpeg_flush,
 +    .max_lowres     = 3,
      .pix_fmts       = ff_h263_hwaccel_pixfmt_list_420,
  };
@@@ -5162,28 -4877,9 +5162,29 @@@ static const AVProfile profiles[] = 
      { FF_PROFILE_UNKNOWN },
  };
  
 +static const AVOption h264_options[] = {
 +    {"is_avc", "is avc", offsetof(H264Context, is_avc), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 1, 0},
 +    {"nal_length_size", "nal_length_size", offsetof(H264Context, nal_length_size), FF_OPT_TYPE_INT, {.i64 = 0}, 0, 4, 0},
 +    {NULL}
 +};
 +
 +static const AVClass h264_class = {
 +    .class_name = "H264 Decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = h264_options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
 +static const AVClass h264_vdpau_class = {
 +    .class_name = "H264 VDPAU Decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = h264_options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_h264_decoder = {
      .name                  = "h264",
+     .long_name             = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
      .type                  = AVMEDIA_TYPE_VIDEO,
      .id                    = AV_CODEC_ID_H264,
      .priv_data_size        = sizeof(H264Context),
Simple merge
Simple merge
Simple merge
@@@ -868,29 -367,26 +868,29 @@@ static av_cold int decode_end(AVCodecCo
      return 0;
  }
  
 +#if CONFIG_IFF_ILBM_DECODER
  AVCodec ff_iff_ilbm_decoder = {
 -    .name           = "iff_ilbm",
 -    .long_name      = NULL_IF_CONFIG_SMALL("IFF ILBM"),
 +    .name           = "iff",
++    .long_name      = NULL_IF_CONFIG_SMALL("IFF"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_IFF_ILBM,
      .priv_data_size = sizeof(IffContext),
      .init           = decode_init,
      .close          = decode_end,
 -    .decode         = decode_frame_ilbm,
 +    .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("IFF"),
  };
 -
 +#endif
 +#if CONFIG_IFF_BYTERUN1_DECODER
  AVCodec ff_iff_byterun1_decoder = {
 -    .name           = "iff_byterun1",
 -    .long_name      = NULL_IF_CONFIG_SMALL("IFF ByteRun1"),
 +    .name           = "iff",
++    .long_name      = NULL_IF_CONFIG_SMALL("IFF"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_IFF_BYTERUN1,
      .priv_data_size = sizeof(IffContext),
      .init           = decode_init,
      .close          = decode_end,
 -    .decode         = decode_frame_byterun1,
 +    .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("IFF"),
  };
 +#endif
@@@ -1055,42 -1044,31 +1055,42 @@@ static av_cold int imc_decode_close(AVC
      return 0;
  }
  
 +static av_cold void flush(AVCodecContext *avctx)
 +{
 +    IMCContext *q = avctx->priv_data;
 +
 +    q->chctx[0].decoder_reset =
 +    q->chctx[1].decoder_reset = 1;
 +}
  
 +#if CONFIG_IMC_DECODER
  AVCodec ff_imc_decoder = {
      .name           = "imc",
+     .long_name      = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_IMC,
      .priv_data_size = sizeof(IMCContext),
      .init           = imc_decode_init,
      .close          = imc_decode_close,
      .decode         = imc_decode_frame,
 +    .flush          = flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                        AV_SAMPLE_FMT_NONE },
  };
 -
 +#endif
 +#if CONFIG_IAC_DECODER
  AVCodec ff_iac_decoder = {
      .name           = "iac",
+     .long_name      = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_IAC,
      .priv_data_size = sizeof(IMCContext),
      .init           = imc_decode_init,
      .close          = imc_decode_close,
      .decode         = imc_decode_frame,
 +    .flush          = flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"),
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                        AV_SAMPLE_FMT_NONE },
  };
Simple merge
Simple merge
Simple merge
@@@ -674,8 -646,10 +674,9 @@@ static av_cold int decode_init(AVCodecC
      return 0;
  }
  
 -
  AVCodec ff_indeo5_decoder = {
      .name           = "indeo5",
+     .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_INDEO5,
      .priv_data_size = sizeof(IVI45DecContext),
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -115,9 -112,9 +115,10 @@@ static int libgsm_encode_frame(AVCodecC
  }
  
  
 +#if CONFIG_LIBGSM_ENCODER
  AVCodec ff_libgsm_encoder = {
      .name           = "libgsm",
+     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM,
      .init           = libgsm_encode_init,
      .close          = libgsm_encode_close,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM"),
  };
 -
 +#endif
 +#if CONFIG_LIBGSM_MS_ENCODER
  AVCodec ff_libgsm_ms_encoder = {
      .name           = "libgsm_ms",
+     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM_MS,
      .init           = libgsm_encode_init,
      .close          = libgsm_encode_close,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
  };
 +#endif
  
  typedef struct LibGSMDecodeContext {
      struct gsm_state *state;
@@@ -224,9 -219,9 +224,10 @@@ static void libgsm_flush(AVCodecContex
          gsm_option(s->state, GSM_OPT_WAV49, &one);
  }
  
 +#if CONFIG_LIBGSM_DECODER
  AVCodec ff_libgsm_decoder = {
      .name           = "libgsm",
+     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM,
      .priv_data_size = sizeof(LibGSMDecodeContext),
      .decode         = libgsm_decode_frame,
      .flush          = libgsm_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM"),
  };
 -
 +#endif
 +#if CONFIG_LIBGSM_MS_DECODER
  AVCodec ff_libgsm_ms_decoder = {
      .name           = "libgsm_ms",
+     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_GSM_MS,
      .priv_data_size = sizeof(LibGSMDecodeContext),
      .decode         = libgsm_decode_frame,
      .flush          = libgsm_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("libgsm GSM Microsoft variant"),
  };
 +#endif
Simple merge
Simple merge
@@@ -290,8 -294,7 +291,7 @@@ AVCodec ff_libopencore_amrnb_encoder = 
      .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_SMALL_LAST_FRAME,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)"),
 -    .priv_class     = &class,
 +    .priv_class     = &amrnb_class,
  };
  #endif /* CONFIG_LIBOPENCORE_AMRNB_ENCODER */
  
@@@ -411,7 -435,5 +412,6 @@@ AVCodec ff_libopenjpeg_decoder = 
      .init             = libopenjpeg_decode_init,
      .decode           = libopenjpeg_decode_frame,
      .capabilities     = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
 -    .priv_class       = &class,
 +    .max_lowres       = 31,
-     .long_name        = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
 +    .priv_class       = &openjpeg_class,
  };
@@@ -644,24 -422,15 +645,23 @@@ AVCodec ff_libopenjpeg_encoder = 
      .close          = libopenjpeg_encode_close,
      .capabilities   = 0,
      .pix_fmts       = (const enum AVPixelFormat[]) {
 -        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48,
 -        AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, AV_PIX_FMT_Y400A,
 +        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48, AV_PIX_FMT_RGBA64,
 +        AV_PIX_FMT_GBR24P,
 +        AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
 +        AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, AV_PIX_FMT_GRAY16,
          AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA420P,
 -        AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P,
 -        AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
 +        AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA422P,
 +        AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA444P,
          AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9,
 +        AV_PIX_FMT_YUVA420P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA444P9,
          AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
 +        AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
 +        AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12,
 +        AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14,
          AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16,
 +        AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
 +        AV_PIX_FMT_XYZ12,
          AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"),
 -    .priv_class     = &class,
 +    .priv_class     = &openjpeg_class,
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -362,7 -364,6 +363,6 @@@ AVCodec ff_libspeex_encoder = 
                                             AV_CH_LAYOUT_STEREO,
                                             0 },
      .supported_samplerates = (const int[]){ 8000, 16000, 32000, 0 },
-     .long_name      = NULL_IF_CONFIG_SMALL("libspeex Speex"),
 -    .priv_class     = &class,
 +    .priv_class     = &speex_class,
      .defaults       = defaults,
  };
Simple merge
@@@ -177,15 -179,9 +177,16 @@@ static int aac_encode_frame(AVCodecCont
      return 0;
  }
  
 +/* duplicated from avpriv_mpeg4audio_sample_rates to avoid shared build
 + * failures */
 +static const int mpeg4audio_sample_rates[16] = {
 +    96000, 88200, 64000, 48000, 44100, 32000,
 +    24000, 22050, 16000, 12000, 11025, 8000, 7350
 +};
 +
  AVCodec ff_libvo_aacenc_encoder = {
      .name           = "libvo_aacenc",
+     .long_name      = NULL_IF_CONFIG_SMALL("Android VisualOn AAC (Advanced Audio Coding)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_AAC,
      .priv_data_size = sizeof(AACContext),
@@@ -146,7 -150,5 +148,5 @@@ AVCodec ff_libvo_amrwbenc_encoder = 
      .close          = amr_wb_encode_close,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("Android VisualOn AMR-WB "
-                                            "(Adaptive Multi-Rate Wide-Band)"),
 -    .priv_class     = &class,
 +    .priv_class     = &amrwb_class,
  };
@@@ -363,16 -337,16 +363,16 @@@ static int oggvorbis_encode_frame(AVCod
  
  AVCodec ff_libvorbis_encoder = {
      .name           = "libvorbis",
 -    .long_name      = NULL_IF_CONFIG_SMALL("libvorbis Vorbis"),
++    .long_name      = NULL_IF_CONFIG_SMALL("libvorbis"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_VORBIS,
 -    .priv_data_size = sizeof(OggVorbisContext),
 +    .priv_data_size = sizeof(OggVorbisEncContext),
      .init           = oggvorbis_encode_init,
      .encode2        = oggvorbis_encode_frame,
      .close          = oggvorbis_encode_close,
      .capabilities   = CODEC_CAP_DELAY,
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                        AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libvorbis"),
 -    .priv_class     = &class,
 +    .priv_class     = &vorbis_class,
      .defaults       = defaults,
  };
Simple merge
@@@ -786,8 -596,7 +787,7 @@@ AVCodec ff_libvpx_vp8_encoder = 
      .encode2        = vp8_encode,
      .close          = vp8_free,
      .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
 -    .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
 +    .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libvpx VP8"),
      .priv_class     = &class_vp8,
      .defaults       = defaults,
  };
@@@ -752,8 -611,7 +753,7 @@@ AVCodec ff_libx264_encoder = 
      .encode2          = X264_frame,
      .close            = X264_close,
      .capabilities     = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
-     .long_name        = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
 -    .priv_class       = &class,
 +    .priv_class       = &x264_class,
      .defaults         = x264_defaults,
      .init_static_data = X264_init_static,
  };
@@@ -426,7 -429,6 +427,6 @@@ AVCodec ff_libxavs_encoder = 
      .close          = XAVS_close,
      .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
      .pix_fmts       = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"),
 -    .priv_class     = &class,
 +    .priv_class     = &xavs_class,
      .defaults       = xavs_defaults,
  };
@@@ -803,28 -748,9 +803,29 @@@ static av_cold int xvid_encode_close(AV
      return 0;
  }
  
 +#define OFFSET(x) offsetof(struct xvid_context, x)
 +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 +static const AVOption options[] = {
 +    { "lumi_aq",     "Luminance masking AQ", OFFSET(lumi_aq),     AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
 +    { "variance_aq", "Variance AQ",          OFFSET(variance_aq), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
 +    { "ssim",        "Show SSIM information to stdout",       OFFSET(ssim),              AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE, "ssim" },
 +        { "off",     NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "ssim" },
 +        { "avg",     NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "ssim" },
 +        { "frame",   NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "ssim" },
 +    { "ssim_acc",    "SSIM accuracy",                         OFFSET(ssim_acc),          AV_OPT_TYPE_INT, { .i64 = 2 }, 0, 4, VE },
 +    { NULL },
 +};
 +
 +static const AVClass xvid_class = {
 +    .class_name = "libxvid",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_libxvid_encoder = {
      .name           = "libxvid",
+     .long_name      = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_MPEG4,
      .priv_data_size = sizeof(struct xvid_context),
      .encode2        = xvid_encode_frame,
      .close          = xvid_encode_close,
      .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
 +    .priv_class     = &xvid_class,
  };
@@@ -227,10 -214,4 +228,9 @@@ AVCodec ff_ljpeg_encoder = { //FIXME av
      .init           = ff_MPV_encode_init,
      .encode2        = encode_picture_lossless,
      .close          = ff_MPV_encode_end,
-     .long_name      = NULL_IF_CONFIG_SMALL("Lossless JPEG"),
 +    .pix_fmts       = (const enum AVPixelFormat[]){
 +        AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_BGR0,
 +        AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P,
 +        AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P,
 +        AV_PIX_FMT_NONE},
  };
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -162,6 -158,4 +163,5 @@@ AVCodec ff_mjpegb_decoder = 
      .close          = ff_mjpeg_decode_end,
      .decode         = mjpegb_decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
 +    .max_lowres     = 3,
  };
@@@ -2084,25 -1691,18 +2085,24 @@@ AVCodec ff_mjpeg_decoder = 
      .init           = ff_mjpeg_decode_init,
      .close          = ff_mjpeg_decode_end,
      .decode         = ff_mjpeg_decode_frame,
 +    .flush          = decode_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
 +    .max_lowres     = 3,
      .priv_class     = &mjpegdec_class,
  };
 -
 +#endif
 +#if CONFIG_THP_DECODER
  AVCodec ff_thp_decoder = {
      .name           = "thp",
+     .long_name      = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_THP,
      .priv_data_size = sizeof(MJpegDecodeContext),
      .init           = ff_mjpeg_decode_init,
      .close          = ff_mjpeg_decode_end,
      .decode         = ff_mjpeg_decode_frame,
 +    .flush          = decode_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"),
 +    .max_lowres     = 3,
  };
 +#endif
@@@ -491,53 -442,15 +491,53 @@@ void ff_mjpeg_encode_mb(MpegEncContext 
      s->i_tex_bits += get_bits_diff(s);
  }
  
 +// maximum over s->mjpeg_vsample[i]
 +#define V_MAX 2
 +static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
 +                              const AVFrame *pic_arg, int *got_packet)
 +
 +{
 +    MpegEncContext *s = avctx->priv_data;
 +    AVFrame pic = *pic_arg;
 +    int i;
 +
 +    //CODEC_FLAG_EMU_EDGE have to be cleared
 +    if(s->avctx->flags & CODEC_FLAG_EMU_EDGE)
 +        return -1;
 +
 +    //picture should be flipped upside-down
 +    for(i=0; i < 3; i++) {
 +        pic.data[i] += (pic.linesize[i] * (s->mjpeg_vsample[i] * (8 * s->mb_height -((s->height/V_MAX)&7)) - 1 ));
 +        pic.linesize[i] *= -1;
 +    }
 +    return ff_MPV_encode_picture(avctx, pkt, &pic, got_packet);
 +}
 +
 +#if CONFIG_MJPEG_ENCODER
  AVCodec ff_mjpeg_encoder = {
      .name           = "mjpeg",
+     .long_name      = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_MJPEG,
      .priv_data_size = sizeof(MpegEncContext),
      .init           = ff_MPV_encode_init,
      .encode2        = ff_MPV_encode_picture,
      .close          = ff_MPV_encode_end,
-     .long_name      = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"),
 +    .capabilities   = CODEC_CAP_SLICE_THREADS | CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY,
 +    .pix_fmts       = (const enum AVPixelFormat[]){
 +        AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE
 +    },
 +};
 +#endif
 +#if CONFIG_AMV_ENCODER
 +AVCodec ff_amv_encoder = {
 +    .name           = "amv",
 +    .type           = AVMEDIA_TYPE_VIDEO,
 +    .id             = AV_CODEC_ID_AMV,
 +    .priv_data_size = sizeof(MpegEncContext),
 +    .init           = ff_MPV_encode_init,
 +    .encode2        = amv_encode_picture,
 +    .close          = ff_MPV_encode_end,
      .pix_fmts       = (const enum AVPixelFormat[]){
          AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_NONE
      },
@@@ -1249,18 -1224,17 +1249,18 @@@ error
      return AVERROR_INVALIDDATA;
  }
  
 +#if CONFIG_MLP_DECODER
  AVCodec ff_mlp_decoder = {
      .name           = "mlp",
+     .long_name      = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_MLP,
      .priv_data_size = sizeof(MLPDecodeContext),
      .init           = mlp_decode_init,
      .decode         = read_access_unit,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"),
  };
 -
 +#endif
  #if CONFIG_TRUEHD_DECODER
  AVCodec ff_truehd_decoder = {
      .name           = "truehd",
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -2554,8 -2413,6 +2555,7 @@@ AVCodec ff_mpeg1video_decoder = 
                               CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
                               CODEC_CAP_SLICE_THREADS,
      .flush                 = flush,
-     .long_name             = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
 +    .max_lowres            = 3,
      .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context)
  };
  
@@@ -2571,8 -2429,6 +2572,7 @@@ AVCodec ff_mpeg2video_decoder = 
                        CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
                        CODEC_CAP_SLICE_THREADS,
      .flush          = flush,
-     .long_name      = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
 +    .max_lowres     = 3,
      .profiles       = NULL_IF_CONFIG_SMALL(mpeg2_video_profiles),
  };
  
Simple merge
@@@ -2378,8 -2280,6 +2379,7 @@@ AVCodec ff_mpeg4_decoder = 
                               CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY |
                               CODEC_CAP_FRAME_THREADS,
      .flush                 = ff_mpeg_flush,
-     .long_name             = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
 +    .max_lowres            = 3,
      .pix_fmts              = ff_h263_hwaccel_pixfmt_list_420,
      .profiles              = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles),
      .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context),
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -916,8 -910,6 +917,7 @@@ AVCodec ff_msmpeg4v1_decoder = 
      .close          = ff_h263_decode_end,
      .decode         = ff_h263_decode_frame,
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
  
@@@ -930,8 -923,6 +931,7 @@@ AVCodec ff_msmpeg4v2_decoder = 
      .close          = ff_h263_decode_end,
      .decode         = ff_h263_decode_frame,
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
  
@@@ -944,8 -936,6 +945,7 @@@ AVCodec ff_msmpeg4v3_decoder = 
      .close          = ff_h263_decode_end,
      .decode         = ff_h263_decode_frame,
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
  
@@@ -958,7 -949,5 +959,6 @@@ AVCodec ff_wmv1_decoder = 
      .close          = ff_h263_decode_end,
      .decode         = ff_h263_decode_frame,
      .capabilities   = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -129,9 -120,10 +130,8 @@@ AVCodec ff_pam_encoder = 
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_PAM,
      .priv_data_size = sizeof(PNMContext),
 -    .init           = ff_pnm_init,
      .encode2        = pam_encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]){
 -        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB32, AV_PIX_FMT_GRAY8, AV_PIX_FMT_MONOWHITE,
 -        AV_PIX_FMT_NONE
 +        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
  };
Simple merge
Simple merge
Simple merge
@@@ -198,8 -204,11 +198,9 @@@ static int pcx_encode_frame(AVCodecCont
  
  AVCodec ff_pcx_encoder = {
      .name           = "pcx",
+     .long_name      = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_PCX,
 -    .priv_data_size = sizeof(PCXContext),
 -    .init           = pcx_encode_init,
      .encode2        = pcx_encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]){
          AV_PIX_FMT_RGB24,
@@@ -522,28 -479,13 +522,28 @@@ static int decode(AVCodecContext *avctx
      return buf_size;
  }
  
 +#define OFFSET(x) offsetof(PGSSubContext, x)
 +#define SD AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_DECODING_PARAM
 +static const AVOption options[] = {
 +    {"forced_subs_only", "Only show forced subtitles", OFFSET(forced_subs_only), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SD},
 +    { NULL },
 +};
 +
 +static const AVClass pgsdec_class = {
 +    .class_name = "PGS subtitle decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_pgssub_decoder = {
      .name           = "pgssub",
+     .long_name      = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"),
      .type           = AVMEDIA_TYPE_SUBTITLE,
      .id             = AV_CODEC_ID_HDMV_PGS_SUBTITLE,
      .priv_data_size = sizeof(PGSSubContext),
      .init           = init_decoder,
      .close          = close_decoder,
      .decode         = decode,
-     .long_name      = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"),
 +    .priv_class     = &pgsdec_class,
  };
Simple merge
@@@ -933,8 -656,5 +934,7 @@@ AVCodec ff_png_decoder = 
      .init           = png_dec_init,
      .close          = png_dec_end,
      .decode         = decode_frame,
 -    .capabilities   = CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(png_dec_init),
 +    .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
-     .long_name      = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
  };
@@@ -472,23 -455,9 +472,24 @@@ static av_cold int png_enc_init(AVCodec
      return 0;
  }
  
 +#define OFFSET(x) offsetof(PNGEncContext, x)
 +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 +static const AVOption options[] = {
 +    {"dpi", "Set image resolution (in dots per inch)",  OFFSET(dpi), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
 +    {"dpm", "Set image resolution (in dots per meter)", OFFSET(dpm), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 0x10000, VE},
 +    { NULL }
 +};
 +
 +static const AVClass pngenc_class = {
 +    .class_name = "PNG encoder",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_png_encoder = {
      .name           = "png",
+     .long_name      = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_PNG,
      .priv_data_size = sizeof(PNGEncContext),
          AV_PIX_FMT_GRAY16BE,
          AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"),
 +    .priv_class     = &pngenc_class,
  };
Simple merge
Simple merge
@@@ -753,8 -751,9 +753,9 @@@ static av_cold int decode_close(AVCodec
  }
  
  
 -AVCodec ff_prores_decoder = {
 -    .name           = "prores",
 +AVCodec ff_prores_lgpl_decoder = {
 +    .name           = "prores_lgpl",
+     .long_name      = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_PRORES,
      .priv_data_size = sizeof(ProresContext),
@@@ -1258,8 -1260,9 +1258,9 @@@ static const AVClass proresenc_class = 
      .version    = LIBAVUTIL_VERSION_INT,
  };
  
 -AVCodec ff_prores_encoder = {
 -    .name           = "prores",
 +AVCodec ff_prores_ks_encoder = {
 +    .name           = "prores_ks",
+     .long_name      = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_PRORES,
      .priv_data_size = sizeof(ProresContext),
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -346,7 -323,5 +347,6 @@@ AVCodec ff_qpeg_decoder = 
      .init           = decode_init,
      .close          = decode_end,
      .decode         = decode_frame,
 +    .flush          = decode_flush,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Q-team QPEG"),
  };
Simple merge
@@@ -396,7 -337,6 +397,6 @@@ AVCodec ff_qtrle_encoder = 
      .encode2        = qtrle_encode_frame,
      .close          = qtrle_encode_end,
      .pix_fmts       = (const enum AVPixelFormat[]){
 -        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_NONE
 +        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
  };
@@@ -106,17 -101,5 +107,16 @@@ AVCodec ff_r10k_decoder = 
      .init           = decode_init,
      .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"),
  };
  #endif
 +#if CONFIG_AVRP_DECODER
 +AVCodec ff_avrp_decoder = {
 +    .name           = "avrp",
 +    .type           = AVMEDIA_TYPE_VIDEO,
 +    .id             = AV_CODEC_ID_AVRP,
 +    .init           = decode_init,
 +    .decode         = decode_frame,
 +    .capabilities   = CODEC_CAP_DR1,
 +    .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"),
 +};
 +#endif
Simple merge
@@@ -553,7 -555,4 +554,6 @@@ AVCodec ff_ra_144_encoder = 
      .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_SMALL_LAST_FRAME,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"),
 +    .supported_samplerates = (const int[]){ 8000, 0 },
 +    .channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
  };
Simple merge
Simple merge
@@@ -355,6 -261,4 +356,5 @@@ AVCodec ff_rawvideo_decoder = 
      .init           = raw_init_decoder,
      .close          = raw_close_decoder,
      .decode         = raw_decode,
-     .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
 +    .priv_class     = &rawdec_class,
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -764,8 -743,6 +765,7 @@@ AVCodec ff_rv10_decoder = 
      .close          = rv10_decode_end,
      .decode         = rv10_decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
  
@@@ -779,7 -757,5 +780,6 @@@ AVCodec ff_rv20_decoder = 
      .decode         = rv10_decode_frame,
      .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
      .flush          = ff_mpeg_flush,
-     .long_name      = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
 +    .max_lowres     = 3,
      .pix_fmts       = ff_pixfmt_list_420,
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -201,16 -172,13 +201,16 @@@ static int encode_frame(AVCodecContext 
  
  AVCodec ff_sgi_encoder = {
      .name           = "sgi",
+     .long_name      = NULL_IF_CONFIG_SMALL("SGI image"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_SGI,
 -    .priv_data_size = sizeof(SgiContext),
      .init           = encode_init,
      .encode2        = encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]){
 -        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
 +        AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
 +        AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGB48BE,
 +        AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_RGBA64BE,
 +        AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE,
 +        AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
      },
-     .long_name      = NULL_IF_CONFIG_SMALL("SGI image"),
  };
@@@ -668,8 -658,6 +669,7 @@@ AVCodec ff_shorten_decoder = 
      .close          = shorten_decode_close,
      .decode         = shorten_decode_frame,
      .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Shorten"),
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
 +                                                      AV_SAMPLE_FMT_U8P,
                                                        AV_SAMPLE_FMT_NONE },
  };
Simple merge
Simple merge
Simple merge
@@@ -90,12 -90,12 +90,13 @@@ static int sp5x_decode_frame(AVCodecCon
  
      av_free(recoded);
  
 -    return i;
 +    return i < 0 ? i : avpkt->size;
  }
  
 +#if CONFIG_SP5X_DECODER
  AVCodec ff_sp5x_decoder = {
      .name           = "sp5x",
+     .long_name      = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_SP5X,
      .priv_data_size = sizeof(MJpegDecodeContext),
      .close          = ff_mjpeg_decode_end,
      .decode         = sp5x_decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"),
 +    .max_lowres     = 3,
  };
 -
 +#endif
 +#if CONFIG_AMV_DECODER
  AVCodec ff_amv_decoder = {
      .name           = "amv",
+     .long_name      = NULL_IF_CONFIG_SMALL("AMV Video"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_AMV,
      .priv_data_size = sizeof(MJpegDecodeContext),
      .init           = ff_mjpeg_decode_init,
      .close          = ff_mjpeg_decode_end,
      .decode         = sp5x_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("AMV Video"),
  };
 +#endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -935,12 -920,10 +936,11 @@@ AVCodec ff_tak_decoder = 
      .id               = AV_CODEC_ID_TAK,
      .priv_data_size   = sizeof(TAKDecContext),
      .init             = tak_decode_init,
 -    .init_static_data = tak_init_static_data,
      .close            = tak_decode_close,
      .decode           = tak_decode_frame,
 -    .capabilities     = CODEC_CAP_DR1,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
 +    .capabilities     = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name        = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"),
      .sample_fmts      = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
                                                          AV_SAMPLE_FMT_S16P,
                                                          AV_SAMPLE_FMT_S32P,
Simple merge
@@@ -170,14 -152,28 +170,14 @@@ static int targa_encode_frame(AVCodecCo
      return 0;
  }
  
 -static av_cold int targa_encode_init(AVCodecContext *avctx)
 -{
 -    TargaContext *s = avctx->priv_data;
 -
 -    avcodec_get_frame_defaults(&s->picture);
 -    s->picture.key_frame= 1;
 -    s->picture.pict_type = AV_PICTURE_TYPE_I;
 -    avctx->coded_frame= &s->picture;
 -
 -    return 0;
 -}
 -
  AVCodec ff_targa_encoder = {
      .name           = "targa",
+     .long_name      = NULL_IF_CONFIG_SMALL("Truevision Targa image"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_TARGA,
 -    .priv_data_size = sizeof(TargaContext),
 -    .init           = targa_encode_init,
      .encode2        = targa_encode_frame,
      .pix_fmts       = (const enum AVPixelFormat[]){
 -        AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_GRAY8,
 +        AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
          AV_PIX_FMT_NONE
      },
-     .long_name= NULL_IF_CONFIG_SMALL("Truevision Targa image"),
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -426,30 -466,14 +426,30 @@@ static av_cold int tta_decode_close(AVC
      return 0;
  }
  
 +#define OFFSET(x) offsetof(TTAContext, x)
 +#define DEC (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM)
 +static const AVOption options[] = {
 +    { "password", "Set decoding password", OFFSET(pass), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, DEC },
 +    { NULL },
 +};
 +
 +static const AVClass tta_decoder_class = {
 +    .class_name = "TTA Decoder",
 +    .item_name  = av_default_item_name,
 +    .option     = options,
 +    .version    = LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_tta_decoder = {
      .name           = "tta",
+     .long_name      = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_TTA,
      .priv_data_size = sizeof(TTAContext),
      .init           = tta_decode_init,
      .close          = tta_decode_close,
      .decode         = tta_decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
 +    .priv_class     = &tta_decoder_class,
  };
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -158,28 -106,12 +158,28 @@@ static int decode_frame(AVCodecContext 
      return avpkt->size;
  }
  
 +#define V210DEC_FLAGS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM
 +static const AVOption v210dec_options[] = {
 +    {"custom_stride", "Custom V210 stride", offsetof(V210DecContext, custom_stride), FF_OPT_TYPE_INT,
 +     {.i64 = 0}, INT_MIN, INT_MAX, V210DEC_FLAGS},
 +    {NULL}
 +};
 +
 +static const AVClass v210dec_class = {
 +    "V210 Decoder",
 +    av_default_item_name,
 +    v210dec_options,
 +    LIBAVUTIL_VERSION_INT,
 +};
 +
  AVCodec ff_v210_decoder = {
      .name           = "v210",
+     .long_name      = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_V210,
 +    .priv_data_size = sizeof(V210DecContext),
      .init           = decode_init,
      .decode         = decode_frame,
      .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
 +    .priv_class     = &v210dec_class,
  };
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc libavcodec/vb.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -690,6 -661,5 +691,5 @@@ AVCodec ff_vp6a_decoder = 
      .init           = vp6_decode_init,
      .close          = vp6_decode_free,
      .decode         = ff_vp56_decode_frame,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"),
  };
@@@ -2106,54 -2105,9 +2106,55 @@@ static int vp8_decode_update_thread_con
      return 0;
  }
  
 +static unsigned apply_padding(unsigned size) { return size + (size & 1); }
 +
 +static int webp_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
 +                             AVPacket *avpkt)
 +{
 +    const uint8_t *buf = avpkt->data;
 +    int buf_size       = avpkt->size;
 +    AVPacket pkt       = *avpkt;
 +
 +    if (buf_size >= 16
 +        && AV_RL32(buf   ) == AV_RL32("RIFF")
 +        && AV_RL32(buf+ 8) == AV_RL32("WEBP")) {
 +        unsigned riff_size = apply_padding(AV_RL32(buf+4)) + 8;
 +        buf += 12;   // Skip over main header
 +        buf_size -= 12;
 +        if (buf_size < 8 || riff_size < 8) {
 +            av_log(avctx, AV_LOG_ERROR, "Incomplete header.\n");
 +            return AVERROR_INVALIDDATA;
 +        }
 +        if (AV_RL32(buf) == AV_RL32("VP8L")) {
 +            av_log(avctx, AV_LOG_ERROR, "Unsupported WebP lossless format.\n");
 +            return AVERROR_PATCHWELCOME;
 +        }
 +        if (AV_RL32(buf) == AV_RL32("VP8X") && AV_RL32(buf+4) < (unsigned)buf_size) {
 +            unsigned size = apply_padding(AV_RL32(buf+4) + 8);
 +            buf      += size;
 +            buf_size -= size;
 +        }
 +        if (buf_size >= 8
 +            && AV_RL32(buf) == AV_RL32("ALPH") && AV_RL32(buf+4) < (unsigned)buf_size) {
 +            unsigned size = apply_padding(AV_RL32(buf+4) + 8);
 +            buf      += size;
 +            buf_size -= size;
 +            av_log(avctx, AV_LOG_WARNING, "Skipping alpha plane\n");
 +        }
 +        if (buf_size >= 8 && AV_RL32(buf) == AV_RL32("VP8 ")) {
 +            buf      += 8;
 +            buf_size -= 8;
 +        }
 +    }
 +    pkt.data = buf;
 +    pkt.size = buf_size;
 +
 +    return ff_vp8_decode_frame(avctx, data, data_size, &pkt);
 +}
 +
  AVCodec ff_vp8_decoder = {
      .name                  = "vp8",
+     .long_name             = NULL_IF_CONFIG_SMALL("On2 VP8"),
      .type                  = AVMEDIA_TYPE_VIDEO,
      .id                    = AV_CODEC_ID_VP8,
      .priv_data_size        = sizeof(VP8Context),
Simple merge
@@@ -1087,7 -1232,5 +1088,6 @@@ AVCodec ff_wavpack_decoder = 
      .close          = wavpack_decode_end,
      .decode         = wavpack_decode_frame,
      .flush          = wavpack_decode_flush,
 -    .capabilities   = CODEC_CAP_DR1,
 +    .init_thread_copy = ONLY_IF_THREADS_ENABLED(init_thread_copy),
 +    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
-     .long_name      = NULL_IF_CONFIG_SMALL("WavPack"),
  };
@@@ -945,9 -926,9 +945,10 @@@ static av_cold void flush(AVCodecContex
      s->last_superframe_len= 0;
  }
  
 +#if CONFIG_WMAV1_DECODER
  AVCodec ff_wmav1_decoder = {
      .name           = "wmav1",
+     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_WMAV1,
      .priv_data_size = sizeof(WMACodecContext),
      .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                        AV_SAMPLE_FMT_NONE },
  };
 -
 +#endif
 +#if CONFIG_WMAV2_DECODER
  AVCodec ff_wmav2_decoder = {
      .name           = "wmav2",
+     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_WMAV2,
      .priv_data_size = sizeof(WMACodecContext),
@@@ -398,9 -415,9 +398,10 @@@ static int encode_superframe(AVCodecCon
      return 0;
  }
  
 +#if CONFIG_WMAV1_ENCODER
  AVCodec ff_wmav1_encoder = {
      .name           = "wmav1",
+     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_WMAV1,
      .priv_data_size = sizeof(WMACodecContext),
      .close          = ff_wma_end,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"),
  };
 -
 +#endif
 +#if CONFIG_WMAV2_ENCODER
  AVCodec ff_wmav2_encoder = {
      .name           = "wmav2",
+     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
      .type           = AVMEDIA_TYPE_AUDIO,
      .id             = AV_CODEC_ID_WMAV2,
      .priv_data_size = sizeof(WMACodecContext),
      .close          = ff_wma_end,
      .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"),
  };
 +#endif
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -55,12 -67,21 +55,12 @@@ static int xbm_encode_frame(AVCodecCont
      return 0;
  }
  
 -static av_cold int xbm_encode_close(AVCodecContext *avctx)
 -{
 -    av_freep(&avctx->coded_frame);
 -
 -    return 0;
 -}
 -
  AVCodec ff_xbm_encoder = {
      .name         = "xbm",
+     .long_name    = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
      .type         = AVMEDIA_TYPE_VIDEO,
      .id           = AV_CODEC_ID_XBM,
 -    .init         = xbm_encode_init,
      .encode2      = xbm_encode_frame,
 -    .close        = xbm_encode_close,
      .pix_fmts     = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE,
 -                                                 AV_PIX_FMT_NONE },
 +                                                   AV_PIX_FMT_NONE },
-     .long_name    = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
  };
diff --cc libavcodec/xl.c
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -208,11 -213,21 +208,12 @@@ static int xwd_encode_frame(AVCodecCont
      return 0;
  }
  
 -static av_cold int xwd_encode_close(AVCodecContext *avctx)
 -{
 -    av_freep(&avctx->coded_frame);
 -
 -    return 0;
 -}
 -
  AVCodec ff_xwd_encoder = {
      .name         = "xwd",
+     .long_name    = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
      .type         = AVMEDIA_TYPE_VIDEO,
      .id           = AV_CODEC_ID_XWD,
 -    .init         = xwd_encode_init,
      .encode2      = xwd_encode_frame,
 -    .close        = xwd_encode_close,
      .pix_fmts     = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGRA,
                                                   AV_PIX_FMT_RGBA,
                                                   AV_PIX_FMT_ARGB,
                                                   AV_PIX_FMT_RGB4_BYTE,
                                                   AV_PIX_FMT_BGR4_BYTE,
                                                   AV_PIX_FMT_PAL8,
 +                                                 AV_PIX_FMT_GRAY8,
                                                   AV_PIX_FMT_MONOWHITE,
                                                   AV_PIX_FMT_NONE },
-     .long_name    = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"),
  };
Simple merge
@@@ -269,7 -250,6 +270,6 @@@ AVCodec ff_yop_decoder = 
      .id             = AV_CODEC_ID_YOP,
      .priv_data_size = sizeof(YopDecContext),
      .init           = yop_decode_init,
 +    .close          = yop_decode_close,
      .decode         = yop_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
 -    .capabilities   = CODEC_CAP_DR1,
  };
Simple merge
Simple merge
Simple merge