Re: [FFmpeg-devel] [PATCH] avcodec: add metadata to identify wrappers and hardware decoders

2017-12-14 Thread wm4
On Thu, 14 Dec 2017 16:02:59 +0100
wm4  wrote:

> Explicitly identify decoder/encoder wrappers with a common name. This
> saves API users from guessing by the name suffix. For example, they
> don't have to guess that "h264_qsv" is the h264 QSV implementation, and
> instead they can just check the AVCodec .codec and .wrapper_name fields.
> 
> Explicitly mark AVCodec entries that are hardware decoders or most
> likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
> API users listing hardware decoders in a more generic way. The proposed
> AVCodecHWConfig does not provide this information fully, because it's
> concerned with decoder configuration, not information about the fact
> whether the hardware is used or not.
> 
> AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
> implementations in case the hardware is not capable.
> 
> Based on a patch by Philip Langdale .
> ---

Pushed, with some fixes.

I apologize in advance should this break anything. (Lots of external
libraries.)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec: add metadata to identify wrappers and hardware decoders

2017-12-14 Thread Philip Langdale

On 2017-12-14 07:02, wm4 wrote:

Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name 
fields.


Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is 
allowing

API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have 
software

implementations in case the hardware is not capable.

Based on a patch by Philip Langdale .


Ship it.

--phil
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec: add metadata to identify wrappers and hardware decoders

2017-12-14 Thread wm4
On Thu, 14 Dec 2017 16:01:49 +
Aman Gupta  wrote:


> > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> > index 086beb41fc..c47e5c4045 100644
> > --- a/libavcodec/videotoolboxenc.c
> > +++ b/libavcodec/videotoolboxenc.c
> > @@ -2599,8 +2599,9 @@ AVCodec ff_hevc_videotoolbox_encoder = {
> >  .init = vtenc_init,
> >  .encode2  = vtenc_frame,
> >  .close= vtenc_close,
> > -.capabilities = AV_CODEC_CAP_DELAY,
> > +.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARSWARE,  
> 
> 
> Typo, s/HARS/HARD/

Thanks, fixed locally.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec: add metadata to identify wrappers and hardware decoders

2017-12-14 Thread Aman Gupta
On Thu, Dec 14, 2017 at 7:10 AM wm4  wrote:

> Explicitly identify decoder/encoder wrappers with a common name. This
> saves API users from guessing by the name suffix. For example, they
> don't have to guess that "h264_qsv" is the h264 QSV implementation, and
> instead they can just check the AVCodec .codec and .wrapper_name fields.
>
> Explicitly mark AVCodec entries that are hardware decoders or most
> likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
> API users listing hardware decoders in a more generic way. The proposed
> AVCodecHWConfig does not provide this information fully, because it's
> concerned with decoder configuration, not information about the fact
> whether the hardware is used or not.
>
> AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
> implementations in case the hardware is not capable.
>
> Based on a patch by Philip Langdale .
> ---
>  doc/APIchanges  |  4 
>  libavcodec/audiotoolboxdec.c|  1 +
>  libavcodec/audiotoolboxenc.c|  1 +
>  libavcodec/avcodec.h| 26 ++
>  libavcodec/cuviddec.c   |  3 ++-
>  libavcodec/libcelt_dec.c|  1 +
>  libavcodec/libfdk-aacdec.c  |  1 +
>  libavcodec/libfdk-aacenc.c  |  1 +
>  libavcodec/libgsmdec.c  |  2 ++
>  libavcodec/libgsmenc.c  |  2 ++
>  libavcodec/libilbc.c|  1 +
>  libavcodec/libkvazaar.c |  2 ++
>  libavcodec/libmp3lame.c |  1 +
>  libavcodec/libopencore-amr.c|  1 +
>  libavcodec/libopenh264dec.c |  1 +
>  libavcodec/libopenh264enc.c |  1 +
>  libavcodec/libopenjpegdec.c |  1 +
>  libavcodec/libopenjpegenc.c |  1 +
>  libavcodec/libopusdec.c |  1 +
>  libavcodec/libopusenc.c |  1 +
>  libavcodec/librsvgdec.c |  1 +
>  libavcodec/libshine.c   |  1 +
>  libavcodec/libspeexdec.c|  1 +
>  libavcodec/libspeexenc.c|  1 +
>  libavcodec/libtheoraenc.c   |  1 +
>  libavcodec/libtwolame.c |  1 +
>  libavcodec/libvo-amrwbenc.c |  1 +
>  libavcodec/libvorbisenc.c   |  1 +
>  libavcodec/libvpxdec.c  |  2 ++
>  libavcodec/libvpxenc.c  |  2 ++
>  libavcodec/libwavpackenc.c  |  1 +
>  libavcodec/libwebpenc.c |  1 +
>  libavcodec/libwebpenc_animencoder.c |  1 +
>  libavcodec/libx264.c|  3 +++
>  libavcodec/libx265.c|  1 +
>  libavcodec/libxavs.c|  1 +
>  libavcodec/libxvid.c|  1 +
>  libavcodec/libzvbi-teletextdec.c|  1 +
>  libavcodec/mediacodecdec.c  | 18 --
>  libavcodec/mmaldec.c|  3 ++-
>  libavcodec/nvenc_h264.c |  9 ++---
>  libavcodec/nvenc_hevc.c |  6 --
>  libavcodec/qsvdec_h2645.c   |  6 --
>  libavcodec/qsvdec_other.c   |  9 ++---
>  libavcodec/qsvenc_h264.c|  3 ++-
>  libavcodec/qsvenc_hevc.c|  3 ++-
>  libavcodec/qsvenc_jpeg.c|  3 ++-
>  libavcodec/qsvenc_mpeg2.c   |  3 ++-
>  libavcodec/v4l2_m2m_dec.c   |  2 ++
>  libavcodec/v4l2_m2m_enc.c   |  2 ++
>  libavcodec/vaapi_encode_h264.c  |  3 ++-
>  libavcodec/vaapi_encode_h265.c  |  3 ++-
>  libavcodec/vaapi_encode_mjpeg.c |  2 ++
>  libavcodec/vaapi_encode_mpeg2.c |  3 ++-
>  libavcodec/vaapi_encode_vp8.c   |  3 ++-
>  libavcodec/vaapi_encode_vp9.c   |  3 ++-
>  libavcodec/version.h|  4 ++--
>  libavcodec/videotoolboxenc.c|  3 ++-
>  58 files changed, 136 insertions(+), 30 deletions(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 4af69c64bd..b4451ab193 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,10 @@ libavutil: 2017-10-21
>
>  API changes, most recent first:
>
> +2017-xx-xx - xxc - lavc 58.7.100 - avcodec.h
> +  Add AV_CODEC_CAP_HARDWARE, AV_CODEC_CAP_HYBRID, and
> AVCodec.wrapper_name,
> +  and mark all AVCodecs accordingly.
> +
>  2017-xx-xx - xxx - lavu 56.4.100 / 56.7.0 - stereo3d.h
>Add view field to AVStereo3D structure and AVStereo3DView enum.
>
> diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
> index 3711665bbd..5c0a9de8f6 100644
> --- a/libavcodec/audiotoolboxdec.c
> +++ b/libavcodec/audiotoolboxdec.c
> @@ -597,6 +597,7 @@ static av_cold int ffat_close_decoder(AVCodecContext
> *avctx)
>  .bsfs   = bsf_name, \
>  .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, \
>  .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE |
> FF_CODEC_CAP_INIT_CLEANUP, \
> +.wrapper_name   = "at", \
>  };
>
>  FFAT_DEC(aac,  AV_CODEC_ID_AAC, "aac_adtstoasc")
> diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
> index c47fbd1b2d..71885d1530 100644
> --- a/libavcodec/audio