Re: [FFmpeg-devel] [PATCH] swscale/ppc: Move VSX-using code to its own file

2018-12-02 Thread Lauri Kasanen
On Fri, 30 Nov 2018 14:05:26 +0200
Lauri Kasanen  wrote:

> On Fri, 30 Nov 2018 12:30:58 +0300
> Michael Kostylev  wrote:
> > 
> > >> Passes fate on LE (with "lavc/jrevdct: Avoid an aliasing violation" 
> > >> applied). Can anyone test BE?
> > >
> > > Ping.
> > 
> > FATE becomes green as much as possible, I haven't performed any 
> > benchmarking though.
> 
> Thanks for testing. This patch is not expected to change performance,
> it's just moving functions around and putting them under proper VSX
> guards.

Could this patch be applied? Also ping on "swscale/output: VSX-optimize
nbps yuv2plane1".

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


Re: [FFmpeg-devel] [PATCH 1/3] libdavs2: update api version and enable avx option

2018-12-02 Thread Liu Steven


> 在 2018年11月20日,上午9:51,hwrenx  写道:
> 
> Signed-off-by: hwrenx 
> ---
> configure | 2 +-
> libavcodec/libdavs2.c | 3 +++
> 2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index b4f944c..1a9f874 100755
> --- a/configure
> +++ b/configure
> @@ -6076,7 +6076,7 @@ enabled libcelt   && require libcelt 
> celt/celt.h celt_decode -lcelt0 &&
> enabled libcaca   && require_pkg_config libcaca caca caca.h 
> caca_create_canvas
> enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
> -lcodec2
> enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.0.1" 
> "dav1d/dav1d.h" dav1d_version
> -enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.5.115" 
> davs2.h davs2_decoder_open
> +enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
> davs2.h davs2_decoder_open
> enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
> dc1394/dc1394.h dc1394_new
> enabled libdrm&& require_pkg_config libdrm libdrm xf86drm.h 
> drmGetVersion
> enabled libfdk_aac&& { check_pkg_config libfdk_aac fdk-aac 
> "fdk-aac/aacenc_lib.h" aacEncOpen ||
> diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c
> index 874f2f0..9a905b8 100644
> --- a/libavcodec/libdavs2.c
> +++ b/libavcodec/libdavs2.c
> @@ -40,11 +40,14 @@ typedef struct DAVS2Context {
> static av_cold int davs2_init(AVCodecContext *avctx)
> {
> DAVS2Context *cad = avctx->priv_data;
> +int cpu_flags = av_get_cpu_flags();
> 
> /* init the decoder */
> cad->param.threads  = avctx->thread_count;
> cad->param.info_level   = 0;
> cad->decoder= davs2_decoder_open(>param);
> +cad->param.disable_avx  = !(cpu_flags & AV_CPU_FLAG_AVX &&
> +cpu_flags & AV_CPU_FLAG_AVX2);
> 
> if (!cad->decoder) {
> av_log(avctx, AV_LOG_ERROR, "decoder created error.");
> -- 
> 2.7.4
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Patchset pushed


Thanks

Steven Liu



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


Re: [FFmpeg-devel] [PATCH v2] lavf/dashenc: Write media trailers when DASH trailer is written.

2018-12-02 Thread Jeyapal, Karthick

On 11/30/18 11:42 AM, Jeyapal, Karthick wrote:
>
> On 11/29/18 11:58 PM, Andrey Semashev wrote:
>> This commit ensures that all (potentially, long) filesystem activity is
>> performed when the user calls av_write_trailer on the DASH libavformat
>> context, not when freeing the context. Also, this defers media segment
>> deletion until after the media trailers are written.
>> ---
>>  libavformat/dashenc.c | 82 ++-
>>  1 file changed, 58 insertions(+), 24 deletions(-)
>>
>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
>> index 6ce70e0076..ecfd84a32c 100644
>> --- a/libavformat/dashenc.c
>> +++ b/libavformat/dashenc.c
>> @@ -424,8 +424,6 @@ static void dash_free(AVFormatContext *s)
>>  return;
>>  for (i = 0; i < s->nb_streams; i++) {
>>  OutputStream *os = >streams[i];
>> -if (os->ctx && os->ctx_inited)
>> -av_write_trailer(os->ctx);
>>  if (os->ctx && os->ctx->pb)
>>  ffio_free_dyn_buf(>ctx->pb);
>>  ff_format_io_close(s, >out);
>> @@ -1331,6 +1329,47 @@ static void dashenc_delete_file(AVFormatContext *s, 
>> char *filename) {
>>  }
>>  }
>>  
>> +static int dashenc_delete_segment_file(AVFormatContext *s, const char* file)
>> +{
>> +DASHContext *c = s->priv_data;
>> +size_t dirname_len, file_len;
>> +char filename[1024];
>> +
>> +dirname_len = strlen(c->dirname);
>> +if (dirname_len >= sizeof(filename)) {
>> +av_log(s, AV_LOG_WARNING, "Cannot delete segments as the directory 
>> path is too long: %"PRIu64" characters: %s\n",
>> +(uint64_t)dirname_len, c->dirname);
>> +return AVERROR(ENAMETOOLONG);
>> +}
>> +
>> +memcpy(filename, c->dirname, dirname_len);
>> +
>> +file_len = strlen(file);
>> +if ((dirname_len + file_len) >= sizeof(filename)) {
>> +av_log(s, AV_LOG_WARNING, "Cannot delete segments as the path is 
>> too long: %"PRIu64" characters: %s%s\n",
>> +(uint64_t)(dirname_len + file_len), c->dirname, file);
>> +return AVERROR(ENAMETOOLONG);
>> +}
>> +
>> +memcpy(filename + dirname_len, file, file_len + 1); // include the 
>> terminating zero
>> +dashenc_delete_file(s, filename);
>> +
>> +return 0;
>> +}
>> +
>> +static inline void dashenc_delete_media_segments(AVFormatContext *s, 
>> OutputStream *os, int remove_count)
>> +{
>> +for (int i = 0; i < remove_count; ++i) {
>> +dashenc_delete_segment_file(s, os->segments[i]->file);
>> +
>> +// Delete the segment regardless of whether the file was 
>> successfully deleted
>> +av_free(os->segments[i]);
>> +}
>> +
>> +os->nb_segments -= remove_count;
>> +memmove(os->segments, os->segments + remove_count, os->nb_segments * 
>> sizeof(*os->segments));
>> +}
>> +
>>  static int dash_flush(AVFormatContext *s, int final, int stream)
>>  {
>>  DASHContext *c = s->priv_data;
>> @@ -1420,23 +1459,12 @@ static int dash_flush(AVFormatContext *s, int final, 
>> int stream)
>>  os->pos += range_length;
>>  }
>>  
>> -if (c->window_size || (final && c->remove_at_exit)) {
>> +if (c->window_size) {
>>  for (i = 0; i < s->nb_streams; i++) {
>>  OutputStream *os = >streams[i];
>> -int j;
>> -int remove = os->nb_segments - c->window_size - 
>> c->extra_window_size;
>> -if (final && c->remove_at_exit)
>> -remove = os->nb_segments;
>> -if (remove > 0) {
>> -for (j = 0; j < remove; j++) {
>> -char filename[1024];
>> -snprintf(filename, sizeof(filename), "%s%s", 
>> c->dirname, os->segments[j]->file);
>> -dashenc_delete_file(s, filename);
>> -av_free(os->segments[j]);
>> -}
>> -os->nb_segments -= remove;
>> -memmove(os->segments, os->segments + remove, 
>> os->nb_segments * sizeof(*os->segments));
>> -}
>> +int remove_count = os->nb_segments - c->window_size - 
>> c->extra_window_size;
>> +if (remove_count > 0)
>> +dashenc_delete_media_segments(s, os, remove_count);
>>  }
>>  }
>>  
>> @@ -1584,6 +1612,7 @@ static int dash_write_packet(AVFormatContext *s, 
>> AVPacket *pkt)
>>  static int dash_write_trailer(AVFormatContext *s)
>>  {
>>  DASHContext *c = s->priv_data;
>> +int i;
>>  
>>  if (s->nb_streams > 0) {
>>  OutputStream *os = >streams[0];
>> @@ -1599,14 +1628,19 @@ static int dash_write_trailer(AVFormatContext *s)
>>  }
>>  dash_flush(s, 1, -1);
>>  
>> -if (c->remove_at_exit) {
>> -char filename[1024];
>> -int i;
>> -for (i = 0; i < s->nb_streams; i++) {
>> -OutputStream *os = >streams[i];
>> -snprintf(filename, sizeof(filename), "%s%s", c->dirname, 
>> os->initfile);
>> -dashenc_delete_file(s, 

Re: [FFmpeg-devel] [PATCH] avformat/dashenc: Added proper logging when io_open fails for write

2018-12-02 Thread Jeyapal, Karthick

On 11/30/18 10:55 AM, Karthick J wrote:
> ---
>  libavformat/dashenc.c | 19 +--
>  1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 04218af6a6..09207dcf44 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -209,6 +209,15 @@ static const char *get_format_str(SegmentType 
> segment_type) {
>  return NULL;
>  }
>  
> +static int handle_io_open_error(AVFormatContext *s, int err, char *url) {
> +DASHContext *c = s->priv_data;
> +char errbuf[AV_ERROR_MAX_STRING_SIZE];
> +av_strerror(err, errbuf, sizeof(errbuf));
> +av_log(s, c->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
> +   "Unable to open %s for writing: %s\n", url, errbuf);
> +return c->ignore_io_errors ? 0 : err;
> +}
> +
>  static inline SegmentType select_segment_type(SegmentType segment_type, enum 
> AVCodecID codec_id)
>  {
>  if (segment_type == SEGMENT_TYPE_AUTO) {
> @@ -531,7 +540,7 @@ static void output_segment_list(OutputStream *os, 
> AVIOContext *out, AVFormatCont
>  ret = dashenc_io_open(s, >m3u8_out, temp_filename_hls, 
> _opts);
>  av_dict_free(_opts);
>  if (ret < 0) {
> -av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
> temp_filename_hls);
> +handle_io_open_error(s, ret, temp_filename_hls);
>  return;
>  }
>  for (i = start_index; i < os->nb_segments; i++) {
> @@ -846,8 +855,7 @@ static int write_manifest(AVFormatContext *s, int final)
>  ret = dashenc_io_open(s, >mpd_out, temp_filename, );
>  av_dict_free();
>  if (ret < 0) {
> -av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
> temp_filename);
> -return c->ignore_io_errors ? 0 : ret;
> +return handle_io_open_error(s, ret, temp_filename);
>  }
>  out = c->mpd_out;
>  avio_printf(out, "\n");
> @@ -937,8 +945,7 @@ static int write_manifest(AVFormatContext *s, int final)
>  ret = dashenc_io_open(s, >m3u8_out, temp_filename, );
>  av_dict_free();
>  if (ret < 0) {
> -av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
> temp_filename);
> -return c->ignore_io_errors ? 0 : ret;
> +return handle_io_open_error(s, ret, temp_filename);
>  }
>  
>  ff_hls_write_playlist_version(c->m3u8_out, 7);
> @@ -1567,7 +1574,7 @@ static int dash_write_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  ret = dashenc_io_open(s, >out, os->temp_path, );
>  av_dict_free();
>  if (ret < 0) {
> -return c->ignore_io_errors ? 0 : ret;
> +return handle_io_open_error(s, ret, os->temp_path);
>  }
>  }
>  
Pushed

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


Re: [FFmpeg-devel] [PATCH v2] lavf/dashenc: Use avpriv_io_delete to delete files.

2018-12-02 Thread Jeyapal, Karthick

On 11/30/18 2:33 PM, Andrey Semashev wrote:
> This fixes incorrect handling of file pseudo-URIs (i.e. when the filename
> starts with "file:").
> ---
>  libavformat/dashenc.c | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 6ce70e0076..412d7c8a21 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -1326,8 +1326,13 @@ static void dashenc_delete_file(AVFormatContext *s, 
> char *filename) {
>  
>  av_dict_free(_opts);
>  ff_format_io_close(s, );
> -} else if (unlink(filename) < 0) {
> -av_log(s, AV_LOG_ERROR, "failed to delete %s: %s\n", filename, 
> strerror(errno));
> +} else {
> +int res = avpriv_io_delete(filename);
> +if (res < 0) {
> +char errbuf[AV_ERROR_MAX_STRING_SIZE];
> +av_strerror(res, errbuf, sizeof(errbuf));
> +av_log(s, (res == AVERROR(ENOENT) ? AV_LOG_WARNING : 
> AV_LOG_ERROR), "failed to delete %s: %s\n", filename, errbuf);
> +}
>  }
>  }
>  
Pushed.

Regards,
Karthick

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


Re: [FFmpeg-devel] MPEG DASH Profiles

2018-12-02 Thread Jeyapal, Karthick


>On 12/1/18, 5:27 AM, "Ronak"  wrote:
>
>Hey all,
>
>Is there a reason why ffmpeg only uses the MPEG DASH LIVE profile? Even if I 
>want to do VOD, it reports that profile in the manifest files.
>
>I'm thinking of adding support to provide the 4 profiles that MPEG DASH 
>supports, and use the same optimization we used to improve the fMP4 generation 
>for HLS.
>
>Here is the bug that I'm referring to: https://trac.ffmpeg.org/ticket/7281 
>
>
>Would the group here be okay with a change like this? For backwards 
>compatibility, we could let LIVE be the default profile.
>
>I've noticed that ffmpeg is coded primarily for video and LIVE streaming, and 
>other use cases are not as well supported. Why is this the case?
I am not aware of the history for supporting only LIVE. But please feel free to 
send the patches for supporting DASH VoD profiles as well. I will review the 
code and provide relevant comments to get those changes merged with the main 
trunk. Please go thru this documentation(if you haven't already) 
https://www.ffmpeg.org/developer.html before submitting any patches. 
>
>Ronak


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

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


Re: [FFmpeg-devel] [PATCH V1 0/2] Add libsvt HEVC encoder wrapper.

2018-12-02 Thread myp...@gmail.com
On Mon, Dec 3, 2018 at 9:32 AM Carl Eugen Hoyos  wrote:
>
> 2018-12-03 2:17 GMT+01:00, myp...@gmail.com :
> > On Sun, Dec 2, 2018 at 1:48 PM Gyan Doshi  wrote:
> >>
> >> On 02-12-2018 11:08 AM, Jun Zhao wrote:
> >> > The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is an
> >> > HEVC-compliant encoder library core that achieves excellent
> >> > density-quality
> >> > tradeoffs, and is highly optimized for Intel® Xeon™ Scalable
> >> > Processor and
> >> > Xeonâ„¢ D processors. Intel open source SVT-HEVC encoder in:
>
> Maybe it would be safer to simply call them "Intel Xeon" processors.
>
Ok, will simply the name to avoid the character display issue in mail
list or commit message.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread James Almer
On 12/2/2018 10:59 PM, myp...@gmail.com wrote:
> On Sun, Dec 2, 2018 at 10:19 PM James Almer  wrote:
>>
>> On 12/2/2018 2:38 AM, Jun Zhao wrote:
>>> base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
>>>
>>> Signed-off-by: Huang, Zhengxu 
>>> Signed-off-by: hassene 
>>> Signed-off-by: Jun Zhao 
>>> ---
>>>  configure|4 +
>>>  libavcodec/Makefile  |1 +
>>>  libavcodec/allcodecs.c   |1 +
>>>  libavcodec/libsvt_hevc.c |  370
> ++
>>>  4 files changed, 376 insertions(+), 0 deletions(-)
>>>  create mode 100644 libavcodec/libsvt_hevc.c
>>>
>>> diff --git a/configure b/configure
>>> index 54b7e11..c3dca73 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -263,6 +263,7 @@ External library support:
>>>--enable-libspeexenable Speex de/encoding via libspeex [no]
>>>--enable-libsrt  enable Haivision SRT protocol via libsrt
> [no]
>>>--enable-libssh   enable SFTP protocol via libssh [no]
>>> +  --enable-libsvt  enable HEVC encoding via svt [no]
>>>--enable-libtensorflow   enable TensorFlow as a DNN module backend
>>> for DNN based filters like sr [no]
>>>--enable-libtesseractenable Tesseract, needed for ocr filter [no]
>>> @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
>>>  libcdio
>>>  libdavs2
>>>  librubberband
>>> +libsvt
>>>  libvidstab
>>>  libx264
>>>  libx265
>>> @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
>>>  chromaprint_muxer_deps="chromaprint"
>>>  h264_videotoolbox_encoder_deps="pthreads"
>>>  h264_videotoolbox_encoder_select="videotoolbox_encoder"
>>> +hevc_svt_encoder_deps="libsvt"
>>
>> Since this is an external library based encoder, the correct name would
>> be libsvt_encoder.
>> You can also make it libsvt_hevc_encoder instead, which is what you used
>> as AVCodec.name.
>>
> I perfer  libsvt_hevc_encoder than libsvt_encoder, because maybe we will
> have libsvt_{av1/vp9/xxx}_encoder in the future.

Sounds good.

[...]

>>> +AVCodec ff_hevc_svt_encoder = {
>>> +.name   = "libsvt_hevc",
>>> +.long_name  = NULL_IF_CONFIG_SMALL("SVT-HEVC(Scalable Video
> Technology for HEVC) encoder"),
>>> +.priv_data_size = sizeof(SvtContext),
>>> +.type   = AVMEDIA_TYPE_VIDEO,
>>> +.id = AV_CODEC_ID_HEVC,
>>> +.init   = eb_enc_init,
>>> +.send_frame = eb_send_frame,
>>> +.receive_packet = eb_receive_packet,
>>
>> Keep in mind that, at least for now and unlike with the decoupled
>> input-output decode API, if you only provide a send/receive callback
>> then the encoder will not work with avcodec_encode_video2(), only with
>> avcodec_send_frame() and avcodec_receive_packet().
>>
> Because avcodec_encode_video2() flags with deprecated, so I think is Ok if
> we don't implement the encode2 callback.
> 
> BTW: What's the reason we don't use avcodec_send_frame() and
> avcodec_receive_packet() in avcodec_encode_video2() like use
> avcodec_send_packet() and avcodec_receive_frame() in avcodec_decode_video2()
> ?

Because nobody implemented it yet, simple as that. The encoder
equivalent of 061a0c14bb needs to be written.

> 
> 
>>> +.close  = eb_enc_close,
>>> +.capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
>>> +.pix_fmts   = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
>>> +
>  AV_PIX_FMT_YUV420P10,
>>> +AV_PIX_FMT_NONE },
>>> +.priv_class = ,
>>> +.defaults   = eb_enc_defaults,
>>> +.caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
>>> +.wrapper_name   = "libsvt_hevc",
>>> +};
>>>
>>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

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


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread myp...@gmail.com
On Sun, Dec 2, 2018 at 6:25 PM Steven Liu  wrote:
>
>
>
> > On Dec 2, 2018, at 13:38, Jun Zhao  wrote:
> >
> > base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
> >
> > Signed-off-by: Huang, Zhengxu 
> > Signed-off-by: hassene 
> > Signed-off-by: Jun Zhao 
> > ---
> > configure|4 +
> > libavcodec/Makefile  |1 +
> > libavcodec/allcodecs.c   |1 +
> > libavcodec/libsvt_hevc.c |  370 
> > ++
> > 4 files changed, 376 insertions(+), 0 deletions(-)
> > create mode 100644 libavcodec/libsvt_hevc.c
> >
> > diff --git a/configure b/configure
> > index 54b7e11..c3dca73 100755
> > --- a/configure
> > +++ b/configure
> > @@ -263,6 +263,7 @@ External library support:
> >   --enable-libspeexenable Speex de/encoding via libspeex [no]
> >   --enable-libsrt  enable Haivision SRT protocol via libsrt [no]
> >   --enable-libssh  enable SFTP protocol via libssh [no]
> > +  --enable-libsvt  enable HEVC encoding via svt [no]
> >   --enable-libtensorflow   enable TensorFlow as a DNN module backend
> >for DNN based filters like sr [no]
> >   --enable-libtesseractenable Tesseract, needed for ocr filter [no]
> > @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
> > libcdio
> > libdavs2
> > librubberband
> > +libsvt
> > libvidstab
> > libx264
> > libx265
> > @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
> > chromaprint_muxer_deps="chromaprint"
> > h264_videotoolbox_encoder_deps="pthreads"
> > h264_videotoolbox_encoder_select="videotoolbox_encoder"
> > +hevc_svt_encoder_deps="libsvt"
> > hevc_videotoolbox_encoder_deps="pthreads"
> > hevc_videotoolbox_encoder_select="videotoolbox_encoder"
> > libaom_av1_decoder_deps="libaom"
> > @@ -6147,6 +6150,7 @@ enabled libsoxr   && require libsoxr soxr.h 
> > soxr_create -lsoxr
> > enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h 
> > sftp_init
> > enabled libspeex  && require_pkg_config libspeex speex 
> > speex/speex.h speex_decoder_init
> > enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" 
> > srt/srt.h srt_socket
> > +enabled libsvt&& require_pkg_config libsvt  svt  EbApi.h 
> > EbInitHandle
> > enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h 
> > TF_Version -ltensorflow
> > enabled libtesseract  && require_pkg_config libtesseract tesseract 
> > tesseract/capi.h TessBaseAPICreate
> > enabled libtheora && require libtheora theora/theoraenc.h 
> > th_info_init -ltheoraenc -ltheoradec -logg
> > diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> > index 5feadac..1a8b547 100644
> > --- a/libavcodec/Makefile
> > +++ b/libavcodec/Makefile
> > @@ -374,6 +374,7 @@ OBJS-$(CONFIG_HEVC_QSV_DECODER)+= qsvdec_h2645.o
> > OBJS-$(CONFIG_HEVC_QSV_ENCODER)+= qsvenc_hevc.o hevc_ps_enc.o   
> > \
> >   hevc_data.o
> > OBJS-$(CONFIG_HEVC_RKMPP_DECODER)  += rkmppdec.o
> > +OBJS-$(CONFIG_HEVC_SVT_ENCODER)+= libsvt_hevc.o
> > OBJS-$(CONFIG_HEVC_VAAPI_ENCODER)  += vaapi_encode_h265.o 
> > h265_profile_level.o
> > OBJS-$(CONFIG_HEVC_V4L2M2M_DECODER)+= v4l2_m2m_dec.o
> > OBJS-$(CONFIG_HEVC_V4L2M2M_ENCODER)+= v4l2_m2m_enc.o
> > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> > index d70646e..ff8ea94 100644
> > --- a/libavcodec/allcodecs.c
> > +++ b/libavcodec/allcodecs.c
> > @@ -749,6 +749,7 @@ extern AVCodec ff_hevc_cuvid_decoder;
> > extern AVCodec ff_hevc_mediacodec_decoder;
> > extern AVCodec ff_hevc_nvenc_encoder;
> > extern AVCodec ff_hevc_qsv_encoder;
> > +extern AVCodec ff_hevc_svt_encoder;
> > extern AVCodec ff_hevc_v4l2m2m_encoder;
> > extern AVCodec ff_hevc_vaapi_encoder;
> > extern AVCodec ff_hevc_videotoolbox_encoder;
> > diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
> > new file mode 100644
> > index 000..1e10111
> > --- /dev/null
> > +++ b/libavcodec/libsvt_hevc.c
> > @@ -0,0 +1,370 @@
> > +/*
> > +* Scalable Video Technology for HEVC encoder library plugin
> > +*
> > +* Copyright (c) 2018 Intel Corporation
> > +*
> > +* This program is free software; you can redistribute it and/or
> > +* modify it under the terms of the GNU Lesser General Public
> > +* License as published by the Free Software Foundation; either
> > +* version 2.1 of the License, or (at your option) any later version.
> > +*
> > +* This program is distributed in the hope that it will be useful,
> > +* but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > +* Lesser General Public License for more details.
> > +*
> > +* You should have received a copy of the GNU Lesser General Public
> > +* License along with this program; if not, write to the Free Software
> > +* Foundation, Inc., 51 Franklin Street, Fifth 

Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread myp...@gmail.com
On Mon, Dec 3, 2018 at 1:58 AM Moritz Barsnick  wrote:

> On Sun, Dec 02, 2018 at 13:38:48 +0800, Jun Zhao wrote:
> > +{"intra_ref_type", "Intra Refresh Type 0: No intra refresh 1: CRA
> (Open GOP) 2: IDR", OFFSET(svt_param.intra_ref_type), AV_OPT_TYPE_INT, {
> .i64 = 1 }, 1, 2, VE },
> [...]
> > +{"profile", "Profile now support[1,2], Main Still Picture Profile
> not supported", OFFSET(svt_param.profile), AV_OPT_TYPE_INT, { .i64 = 2 },
> 1, 2, VE },
> > +{"rc", "RC mode 0: CQP 1: VBR", OFFSET(svt_param.rc_mode),
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> > +{"tune", "Tune mode: SQ/OQ[0,1]", OFFSET(svt_param.tune),
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> [...]
>
> Four these four, named parameters would be welcome.
>
>
> Will improve and follow the comments, Tks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread myp...@gmail.com
On Sun, Dec 2, 2018 at 10:19 PM James Almer  wrote:
>
> On 12/2/2018 2:38 AM, Jun Zhao wrote:
> > base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
> >
> > Signed-off-by: Huang, Zhengxu 
> > Signed-off-by: hassene 
> > Signed-off-by: Jun Zhao 
> > ---
> >  configure|4 +
> >  libavcodec/Makefile  |1 +
> >  libavcodec/allcodecs.c   |1 +
> >  libavcodec/libsvt_hevc.c |  370
++
> >  4 files changed, 376 insertions(+), 0 deletions(-)
> >  create mode 100644 libavcodec/libsvt_hevc.c
> >
> > diff --git a/configure b/configure
> > index 54b7e11..c3dca73 100755
> > --- a/configure
> > +++ b/configure
> > @@ -263,6 +263,7 @@ External library support:
> >--enable-libspeexenable Speex de/encoding via libspeex [no]
> >--enable-libsrt  enable Haivision SRT protocol via libsrt
[no]
> >--enable-libssh   enable SFTP protocol via libssh [no]
> > +  --enable-libsvt  enable HEVC encoding via svt [no]
> >--enable-libtensorflow   enable TensorFlow as a DNN module backend
> > for DNN based filters like sr [no]
> >--enable-libtesseractenable Tesseract, needed for ocr filter [no]
> > @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
> >  libcdio
> >  libdavs2
> >  librubberband
> > +libsvt
> >  libvidstab
> >  libx264
> >  libx265
> > @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
> >  chromaprint_muxer_deps="chromaprint"
> >  h264_videotoolbox_encoder_deps="pthreads"
> >  h264_videotoolbox_encoder_select="videotoolbox_encoder"
> > +hevc_svt_encoder_deps="libsvt"
>
> Since this is an external library based encoder, the correct name would
> be libsvt_encoder.
> You can also make it libsvt_hevc_encoder instead, which is what you used
> as AVCodec.name.
>
I perfer  libsvt_hevc_encoder than libsvt_encoder, because maybe we will
have libsvt_{av1/vp9/xxx}_encoder in the future.
> >  hevc_videotoolbox_encoder_deps="pthreads"
> >  hevc_videotoolbox_encoder_select="videotoolbox_encoder"
> >  libaom_av1_decoder_deps="libaom"
>
>
> [...]
>
> > +static av_cold int eb_enc_init(AVCodecContext *avctx)
> > +{
> > +SvtContext   *q = avctx->priv_data;
> > +SvtEncoder   *svt_enc = NULL;
> > +EB_ERRORTYPE ret = EB_ErrorNone;
> > +
> > +q->svt_enc  = av_mallocz(sizeof(*q->svt_enc));
> > +if (!q->svt_enc)
> > +return AVERROR(ENOMEM);
> > +svt_enc = q->svt_enc;
> > +
> > +q->eos_flag = 0;
> > +
> > +ret = EbInitHandle(_enc->svt_handle, q, _enc->enc_params);
> > +if (ret != EB_ErrorNone)
> > +goto failed_init;
> > +
> > +ret = config_enc_params(_enc->enc_params, avctx);
> > +if (ret != EB_ErrorNone)
> > +goto failed_init;
> > +
> > +ret = EbH265EncSetParameter(svt_enc->svt_handle,
_enc->enc_params);
> > +if (ret != EB_ErrorNone)
> > +goto failed_init;
> > +
> > +ret = EbInitEncoder(svt_enc->svt_handle);
> > +if (ret != EB_ErrorNone)
> > +goto failed_init;
> > +
> > +if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
> > +
> > +EB_BUFFERHEADERTYPE headerPtr;
> > +headerPtr.nSize   = sizeof(EB_BUFFERHEADERTYPE);
> > +headerPtr.nFilledLen  = 0;
> > +headerPtr.pBuffer = av_malloc(10 * 1024 * 1024);
> > +headerPtr.nAllocLen   = (10 * 1024 * 1024);
> > +
> > +if (!headerPtr.pBuffer)
> > +return AVERROR(ENOMEM);
> > +
> > +ret = EbH265EncStreamHeader(svt_enc->svt_handle, );
> > +if (ret != EB_ErrorNone) {
> > +av_freep();
> > +goto failed_init;
> > +}
> > +avctx->extradata_size = headerPtr.nFilledLen;
> > +avctx->extradata = av_malloc(avctx->extradata_size +
AV_INPUT_BUFFER_PADDING_SIZE);
> > +if (!avctx->extradata) {
> > +av_log(avctx, AV_LOG_ERROR,
> > +   "Cannot allocate HEVC header of size %d.\n",
avctx->extradata_size);
> > +return AVERROR(ENOMEM);
> > +}
> > +memcpy(avctx->extradata, headerPtr.pBuffer,
avctx->extradata_size);
> > +av_freep();
> > +}
> > +return 0;
> > +
> > +failed_init:
> > +return error_mapping(ret);
>
> If it's only this line, just use it directly where needed instead of a
goto.

Will double-check the fail handle, tks.
>
> [...]
>
> > +#define OFFSET(x) offsetof(SvtContext, x)
> > +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
> > +static const AVOption options[] = {
> > +{"vui", "Enable vui info", OFFSET(svt_param.vui_info),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> > +{"hielevel", "Hierarchical Prediction Levels [0,3]",
OFFSET(svt_param.hierarchical_level), AV_OPT_TYPE_INT, { .i64 = 3 }, 0, 3,
VE },
> > +{"la_depth", "Look Ahead Distance [0,256]",
OFFSET(svt_param.la_depth), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 256, VE },
> > +{"intra_ref_type", "Intra 

Re: [FFmpeg-devel] [PATCH V1 0/2] Add libsvt HEVC encoder wrapper.

2018-12-02 Thread Carl Eugen Hoyos
2018-12-03 2:17 GMT+01:00, myp...@gmail.com :
> On Sun, Dec 2, 2018 at 1:48 PM Gyan Doshi  wrote:
>>
>> On 02-12-2018 11:08 AM, Jun Zhao wrote:
>> > The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is an
>> > HEVC-compliant encoder library core that achieves excellent
>> > density-quality
>> > tradeoffs, and is highly optimized for Intel® Xeon™ Scalable
>> > Processor and
>> > Xeonâ„¢ D processors. Intel open source SVT-HEVC encoder in:

Maybe it would be safer to simply call them "Intel Xeon" processors.

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


[FFmpeg-devel] [PATCH 1/2 v3] lavf/isom: add Dolby Vision sample entry codes for HEVC and H.264

2018-12-02 Thread Jan Ekström
From: Rodger Combs 

These are registered identifiers at the MPEG-4 RA, which are
defined as to be utilized for Dolby Vision AVC/HEVC streams that
are not correctly presentable by standards-compliant AVC/HEVC players.

According to the Dolby Vision specification for ISOBMFF, these sample
entry codes are specified to have the standard AVC or HEVC decoder
configuration box in addition to the Dolby custom DOVIConfigurationBox.
This is what enables us to decode the streams without custom parsing.

For correct presentation information from the DOVIConfigurationBox
is required (YCbCr or modified ICtCP, SDR or HDR, base or enhancement
layer).
---
 libavformat/isom.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index ca9d22e4f7..f7e1654484 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -163,6 +163,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
 
 { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which 
indicates parameter sets may be in ES */
 { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which 
indicates parameter sets shall not be in ES */
+{ AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', 'e') }, /* HEVC-based Dolby 
Vision derived from hev1 */
+ /* dvh1 is handled within 
mov.c */
 
 { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
 { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '2') },
@@ -185,6 +187,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
 { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */
 { AV_CODEC_ID_H264, MKTAG('x', 'a', 'l', 'g') }, /* XAVC-L HD422 produced 
by FCP */
 { AV_CODEC_ID_H264, MKTAG('a', 'v', 'l', 'g') }, /* Panasonic P2 AVC-LongG 
*/
+{ AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', 'v') }, /* AVC-based Dolby Vision 
derived from avc1 */
+{ AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', '1') }, /* AVC-based Dolby Vision 
derived from avc3 */
 
 { AV_CODEC_ID_VP8,  MKTAG('v', 'p', '0', '8') }, /* VP8 */
 { AV_CODEC_ID_VP9,  MKTAG('v', 'p', '0', '9') }, /* VP9 */
-- 
2.19.2

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


Re: [FFmpeg-devel] [PATCH V1 2/2] Changelog: Add new entry for svt-hevc encoder

2018-12-02 Thread myp...@gmail.com
On Sun, Dec 2, 2018 at 4:00 PM Hendrik Leppkes  wrote:
>
> On Sun, Dec 2, 2018 at 6:44 AM Jun Zhao  wrote:
> >
> > Signed-off-by: Huang, Zhengxu 
> > Signed-off-by: hassene 
> > Signed-off-by: Jun Zhao 
> > ---
> >  Changelog |2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/Changelog b/Changelog
> > index 1f53ff4..eca6327 100644
> > --- a/Changelog
> > +++ b/Changelog
> > @@ -10,7 +10,7 @@ version :
> >  - truehd_core bitstream filter
> >  - dhav demuxer
> >  - PCM-DVD encoder
> > -
> > +- add SVT(Scalable Video Technology) HEVC encoder
> >
>
> Please don't remove the double newline, just add your new entry.
>
>
Thanks the comments, will follow it in next version patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH V1 0/2] Add libsvt HEVC encoder wrapper.

2018-12-02 Thread myp...@gmail.com
On Sun, Dec 2, 2018 at 1:48 PM Gyan Doshi  wrote:
>
> On 02-12-2018 11:08 AM, Jun Zhao wrote:
> > The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is an
> > HEVC-compliant encoder library core that achieves excellent density-quality
> > tradeoffs, and is highly optimized for Intel® Xeon™ Scalable Processor 
> > and
> > Xeonâ„¢ D processors. Intel open source SVT-HEVC encoder in:
> > https://github.com/intel/SVT-HEVC.
> >
> > This wrapper work with SVT-HEVC new_api branch, more information can get
> > from https://github.com/intel/SVT-HEVC/blob/new_api/ffmpeg_plugin/.
> >
> > For SVT-HEVC build, you can switch the branch to new_api, then run:
> > ./build.sh  in the directory Build/linux.
> >
> > If you want to enable the pkg-config for SVT-HEVC library, the file
> > install_libsvt_hevc_plugin_ffmpeg.sh give a sample for this.
> > (https://github.com/intel/SVT-HEVC/blob/new_api/ffmpeg_plugin/\
> > install_libsvt_hevc_ffmpeg.sh).
> >
> > This patches based on Zhengxu, huang/hassene's hard work.
> >
> > V1: - Add libsvt hevc encoder wrapper and a Changelog entry.
> >
> > Jun Zhao (2):
> >lavc, T/svt_hevc: add libsvt hevc encoder wrapper.
> >Changelog: Add new entry for svt-hevc encoder
> >
> >   Changelog|2 +-
> >   configure|4 +
> >   libavcodec/Makefile  |1 +
> >   libavcodec/allcodecs.c   |1 +
> >   libavcodec/libsvt_hevc.c |  370 
> > ++
> >   5 files changed, 377 insertions(+), 1 deletions(-)
> >   create mode 100644 libavcodec/libsvt_hevc.c
>
> Consider adding an entry in doc/encoders and doc/general.
>
> Thanks,
> Gyan
I will add an entry to doc/encoders and doc/general, Tks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] lavf/mov: document the dvh1 codec switch based on hvcC availability

2018-12-02 Thread Jan Ekström
---
 libavformat/mov.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index ec57a05803..497790522f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1903,6 +1903,11 @@ static int mov_read_glbl(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 if (ret < 0)
 return ret;
 if (atom.type == MKTAG('h','v','c','C') && st->codecpar->codec_tag == 
MKTAG('d','v','h','1'))
+/* HEVC-based Dolby Vision derived from hvc1.
+   Happens to match with an identifier
+   previously utilized for DV. Thus, if we have
+   the hvcC extradata box available as specified,
+   set codec to HEVC */
 st->codecpar->codec_id = AV_CODEC_ID_HEVC;
 
 return 0;
-- 
2.19.2

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


Re: [FFmpeg-devel] [PATCH] avcodec/r210: use correct pixel format

2018-12-02 Thread Michael Niedermayer
On Sun, Dec 02, 2018 at 06:06:56PM +0100, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol 
> ---
>  libavcodec/r210dec.c  | 38 ++-
>  libavcodec/r210enc.c  | 26 +++-
>  tests/ref/vsynth/vsynth1-r210 |  6 +++---
>  tests/ref/vsynth/vsynth2-r210 |  6 +++---
>  tests/ref/vsynth/vsynth3-r210 |  6 +++---
>  5 files changed, 45 insertions(+), 37 deletions(-)

breaks fate
make fate-vsynth_lena-r210 -j12
TESTvsynth_lena-r210
--- ./tests/ref/vsynth/vsynth_lena-r210 2018-12-01 01:58:25.524430036 +0100
+++ tests/data/fate/vsynth_lena-r2102018-12-03 01:37:11.312043615 +0100
@@ -1,4 +1,4 @@
-94874a48987fd401494f4d7ca8e1273b *tests/data/fate/vsynth_lena-r210.avi
+61fd53566d99b725e75212747b35893f *tests/data/fate/vsynth_lena-r210.avi
 22125252 tests/data/fate/vsynth_lena-r210.avi
-6ea4fcd93fc83defc8770e85b64b60bb *tests/data/fate/vsynth_lena-r210.out.rawvideo
-stddev:0.70 PSNR: 51.12 MAXDIFF:   12 bytes:  7603200/  7603200
+4b7425191bb6a7fc4ca0dc649d9ba202 *tests/data/fate/vsynth_lena-r210.out.rawvideo
+stddev:0.93 PSNR: 48.72 MAXDIFF:   11 bytes:  7603200/  7603200
Test vsynth_lena-r210 failed. Look at tests/data/fate/vsynth_lena-r210.err for 
details.
make: *** [fate-vsynth_lena-r210] Error 1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship: All citizens are under surveillance, all their steps and
actions recorded, for the politicians to enforce control.
Democracy: All politicians are under surveillance, all their steps and
actions recorded, for the citizens to enforce control.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]tests/api-flac-test: Rename NUMBER_OF_FRAMES as NUMBER_OF_AUDIO_FRAMES

2018-12-02 Thread Carl Eugen Hoyos
2018-12-03 1:17 GMT+01:00, Carl Eugen Hoyos :
> Hi!
>
> Both aix and sunos define NUMBER_OF_FRAMES in a system header (as
> _NUMBER_OF_FRAMES), attached patch fixes a warning when running fate.

Only aix...

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


[FFmpeg-devel] [PATCH]tests/api-flac-test: Rename NUMBER_OF_FRAMES as NUMBER_OF_AUDIO_FRAMES

2018-12-02 Thread Carl Eugen Hoyos
Hi!

Both aix and sunos define NUMBER_OF_FRAMES in a system header (as
_NUMBER_OF_FRAMES), attached patch fixes a warning when running fate.

Please comment, Carl Eugen
From 7360f2e9721b88bb58e55f05911b16222c249e59 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Mon, 3 Dec 2018 01:14:24 +0100
Subject: [PATCH] tests/api-flac-test: Rename NUMBER_OF_FRAMES as
 NUMBER_OF_AUDIO_FRAMES.

Both sunos and aix define NUMBER_OF_FRAMES in a system header,
causing redefinition warnings.
---
 tests/api/api-flac-test.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c
index 2e90812..e8e8cbf 100644
--- a/tests/api/api-flac-test.c
+++ b/tests/api/api-flac-test.c
@@ -31,7 +31,7 @@
 #include "libavutil/common.h"
 #include "libavutil/samplefmt.h"
 
-#define NUMBER_OF_FRAMES 200
+#define NUMBER_OF_AUDIO_FRAMES 200
 #define NAME_BUFF_SIZE 100
 
 /* generate i-th frame of test audio */
@@ -137,19 +137,19 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
 return AVERROR(ENOMEM);
 }
 
-raw_in = av_malloc(in_frame->linesize[0] * NUMBER_OF_FRAMES);
+raw_in = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
 if (!raw_in) {
 av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_in\n");
 return AVERROR(ENOMEM);
 }
 
-raw_out = av_malloc(in_frame->linesize[0] * NUMBER_OF_FRAMES);
+raw_out = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
 if (!raw_out) {
 av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_out\n");
 return AVERROR(ENOMEM);
 }
 
-for (i = 0; i < NUMBER_OF_FRAMES; i++) {
+for (i = 0; i < NUMBER_OF_AUDIO_FRAMES; i++) {
 av_init_packet(_pkt);
 enc_pkt.data = NULL;
 enc_pkt.size = 0;
@@ -209,7 +209,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
 av_packet_unref(_pkt);
 }
 
-if (memcmp(raw_in, raw_out, out_frame_bytes * NUMBER_OF_FRAMES) != 0) {
+if (memcmp(raw_in, raw_out, out_frame_bytes * NUMBER_OF_AUDIO_FRAMES) != 0) {
 av_log(NULL, AV_LOG_ERROR, "Output differs\n");
 return 1;
 }
-- 
1.7.10.4

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


Re: [FFmpeg-devel] [PATCH] hwcontext_opencl: Use correct function to enumerate devices

2018-12-02 Thread Mark Thompson
On 28/11/2018 00:50, Song, Ruiling wrote:
>> -Original Message-
>> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of
>> Mark Thompson
>> Sent: Wednesday, November 28, 2018 8:17 AM
>> To: ffmpeg-devel@ffmpeg.org
>> Subject: [FFmpeg-devel] [PATCH] hwcontext_opencl: Use correct function to
>> enumerate devices
>>
>> Also assert that all required functions are present.
>> ---
>> On 26/11/2018 08:57, Song, Ruiling wrote:
 -Original Message-
 From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
>> Of
 Mark Thompson
 Sent: Monday, November 26, 2018 6:08 AM
 To: FFmpeg development discussions and patches > de...@ffmpeg.org>
 Subject: [FFmpeg-devel] [PATCH] hwcontext_opencl: Use correct function to
 enumerate devices

 ---
  libavutil/hwcontext_opencl.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

 diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c
 index e6cef74269..6a26354c87 100644
 --- a/libavutil/hwcontext_opencl.c
 +++ b/libavutil/hwcontext_opencl.c
 @@ -542,9 +542,9 @@ static int
 opencl_device_create_internal(AVHWDeviceContext *hwdev,
  continue;
  }

 -err = opencl_enumerate_devices(hwdev, platforms[p], platform_name,
 -   _devices, ,
 -   selector->context);
 +err = selector->enumerate_devices(hwdev, platforms[p],
>> platform_name,
 +  _devices, ,
 +  selector->context);
>>> I think it is better to check enumerate_devices  against null pointer before
>> calling it, although it should works well currently.
>>
>> The two enumerate functions should always be set when entering the function,
>> since they are always required.  (Unlike the filter, where "do nothing" is a
>> reasonable case.)
>>
>> How about an assert at the start of the function to check that, like this?
> Yes, that's good. It is just helpful when somebody add new platform support 
> but happened to forget to give a meaningful function pointer.

Yep, exactly so :)

Applied.

Thanks,

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


Re: [FFmpeg-devel] [PATCH V2] lavf: add transpose_opencl filter

2018-12-02 Thread Mark Thompson
On 28/11/2018 02:27, Ruiling Song wrote:
> Signed-off-by: Ruiling Song 
> ---
>  configure |   1 +
>  libavfilter/Makefile  |   1 +
>  libavfilter/allfilters.c  |   1 +
>  libavfilter/opencl/transpose.cl   |  35 +
>  libavfilter/opencl_source.h   |   1 +
>  libavfilter/transpose.h   |  34 +
>  libavfilter/vf_transpose.c|  14 +-
>  libavfilter/vf_transpose_opencl.c | 288 
> ++
>  8 files changed, 362 insertions(+), 13 deletions(-)
>  create mode 100644 libavfilter/opencl/transpose.cl
>  create mode 100644 libavfilter/transpose.h
>  create mode 100644 libavfilter/vf_transpose_opencl.c

Testing the passthrough option here reveals a slightly unfortunate interaction 
with mapping - if this is the only filter in use, then not doing a redundant 
copy can fall over.

For example, on Rockchip (Mali) decoding with rkmpp then using:

-vf 
hwmap=derive_device=opencl,transpose_opencl=dir=clock:passthrough=landscape,hwdownload,format=nv12

fails at the download in the passthrough case because it doesn't allow the read 
(the extension does explicitly document this constraint - 
).

VAAPI has a similar problem with a decode followed by:

-vf 
hwmap=derive_device=opencl,transpose_opencl,hwmap=derive_device=vaapi:reverse=1

because the reverse mapping tries to replace the inlink hw_frames_ctx in a way 
which doesn't actually work.

All of these cases do of course work if anything else is in the way - any 
additional opencl filter on either side makes it work.  I think it's fine to 
ignore this (after all, the hwmap immediately followed by hwdownload case can 
already fail in the same way), but any thoughts you have on making that better 
are welcome.


>> Does the dependency on dir have any effect on speed here?  Any call is only 
>> ever
>> going to use one side of each of the dir cases, so it feels like it might be 
>> nicer to
>> hard-code that so they aren't included in the compiled code at all.
> For such memory bound OpenCL kernel, some little more arithmetic operation 
> would not affect the overall performance.
> I did some more testing, and see no obvious performance difference for 
> different 'dir' parameter. So I just keep it as now.

That makes sense, thank you for checking.


So, LGTM and applied.

Thanks,

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


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Mark Thompson
On 02/12/2018 21:58, Carl Eugen Hoyos wrote:
> 2018-12-02 22:35 GMT+01:00, Mark Thompson :
>> On 02/12/2018 21:12, Carl Eugen Hoyos wrote:
>>> 2018-12-02 20:46 GMT+01:00, Mark Thompson :
 On 02/12/2018 12:49, Carl Eugen Hoyos wrote:
> 2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
>> 2018-11-22 23:47 GMT+01:00, Mark Thompson :
>>> Standard sed does not support EREs.
>>
>> Please mention ticket #7310 in the commit message.
>
> Ping.

 I was waiting for:
>>>
>>> Sorry, thank you!
>>>
> The Darwin version script part was only tested by running it on the
> version scripts and looking at the output, not actually building on that
> platform - it would be helpful if someone could check that it actually
> works.

 Can someone check this?
>>>
>>> Why is this needed?
>>> What I mean is: Is there a Darwin platform with a too old sed where
>>> your change would help?
>>
>> I have no idea - I know nothing about tools on Apple platforms.  If all
>> versions of sed you might be able to run on Darwin have a nonstandard
>> extension supporting EREs via a -E option then it is indeed unnecessary, but
>> given the nature of the patch I thought it would be sensible to eliminate
>> all of the potentially-troublesome nonstandard use.  On the other hand it is
>> a change and could break things which currently work, so ensuring that it
>> has been tested on the actual target platform seemed like a good idea.
> 
> In the meantime, you could commit the tested part of the patch.

Sure; applied.

Thanks,

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


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Carl Eugen Hoyos
2018-12-02 22:35 GMT+01:00, Mark Thompson :
> On 02/12/2018 21:12, Carl Eugen Hoyos wrote:
>> 2018-12-02 20:46 GMT+01:00, Mark Thompson :
>>> On 02/12/2018 12:49, Carl Eugen Hoyos wrote:
 2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
> 2018-11-22 23:47 GMT+01:00, Mark Thompson :
>> Standard sed does not support EREs.
>
> Please mention ticket #7310 in the commit message.

 Ping.
>>>
>>> I was waiting for:
>>
>> Sorry, thank you!
>>
 The Darwin version script part was only tested by running it on the
 version scripts and looking at the output, not actually building on that
 platform - it would be helpful if someone could check that it actually
 works.
>>>
>>> Can someone check this?
>>
>> Why is this needed?
>> What I mean is: Is there a Darwin platform with a too old sed where
>> your change would help?
>
> I have no idea - I know nothing about tools on Apple platforms.  If all
> versions of sed you might be able to run on Darwin have a nonstandard
> extension supporting EREs via a -E option then it is indeed unnecessary, but
> given the nature of the patch I thought it would be sensible to eliminate
> all of the potentially-troublesome nonstandard use.  On the other hand it is
> a change and could break things which currently work, so ensuring that it
> has been tested on the actual target platform seemed like a good idea.

In the meantime, you could commit the tested part of the patch.

Thank you, Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Mark Thompson
On 02/12/2018 21:12, Carl Eugen Hoyos wrote:
> 2018-12-02 20:46 GMT+01:00, Mark Thompson :
>> On 02/12/2018 12:49, Carl Eugen Hoyos wrote:
>>> 2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
 2018-11-22 23:47 GMT+01:00, Mark Thompson :
> Standard sed does not support EREs.

 Please mention ticket #7310 in the commit message.
>>>
>>> Ping.
>>
>> I was waiting for:
> 
> Sorry, thank you!
> 
>>> The Darwin version script part was only tested by running it on the
>>> version scripts and looking at the output, not actually building on that
>>> platform - it would be helpful if someone could check that it actually
>>> works.
>>
>> Can someone check this?
> 
> Why is this needed?
> What I mean is: Is there a Darwin platform with a too old sed where
> your change would help?

I have no idea - I know nothing about tools on Apple platforms.  If all 
versions of sed you might be able to run on Darwin have a nonstandard extension 
supporting EREs via a -E option then it is indeed unnecessary, but given the 
nature of the patch I thought it would be sensible to eliminate all of the 
potentially-troublesome nonstandard use.  On the other hand it is a change and 
could break things which currently work, so ensuring that it has been tested on 
the actual target platform seemed like a good idea.

Thanks,

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


Re: [FFmpeg-devel] [PATCH 1/2] cbs_h265: Fix Time Code SEI syntax

2018-12-02 Thread Mark Thompson
On 02/12/2018 20:51, Andreas Rheinhardt wrote:
> Mark Thompson:
>> On 01/12/2018 07:52, Andreas Rheinhardt wrote:
>>> Signed-off-by: Andreas Rheinhardt 
>>> ---
>>> https://trac.ffmpeg.org/ticket/4141#comment:9 contains a sample
>>> containing Time Code SEI messages. Parsing it currently fails
>>> because counting_type is detected as out of range. Of course, it is not.
>>>
>>>  libavcodec/cbs_h265_syntax_template.c | 56 ++-
>>>  1 file changed, 30 insertions(+), 26 deletions(-)
>>
>> Oops.  Yep, applied.
>>
>> Do you happen to have a sample which could be included as a fate test?  Most 
>> of the other SEI messages are found in the standard conformance test suite 
>> and therefore get tested by it, but this one isn't.
>>
> As has already been said in the quoted section: Ticket 4141 contains
> such a sample. This is also the sample that made me investigate this.

Indeed, and I used it for testing.  However, it looks like a TV capture and it 
was uploaded by someone unknown, so I don't think I can infer anything about 
its copyright status for inclusion.  I've asked in the ticket.

Thanks,

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


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Carl Eugen Hoyos
2018-12-02 20:46 GMT+01:00, Mark Thompson :
> On 02/12/2018 12:49, Carl Eugen Hoyos wrote:
>> 2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
>>> 2018-11-22 23:47 GMT+01:00, Mark Thompson :
 Standard sed does not support EREs.
>>>
>>> Please mention ticket #7310 in the commit message.
>>
>> Ping.
>
> I was waiting for:

Sorry, thank you!

>> The Darwin version script part was only tested by running it on the
>> version scripts and looking at the output, not actually building on that
>> platform - it would be helpful if someone could check that it actually
>> works.
>
> Can someone check this?

Why is this needed?
What I mean is: Is there a Darwin platform with a too old sed where
your change would help?

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


Re: [FFmpeg-devel] [PATCH 1/2] cbs_h265: Fix Time Code SEI syntax

2018-12-02 Thread Andreas Rheinhardt
Mark Thompson:
> On 01/12/2018 07:52, Andreas Rheinhardt wrote:
>> Signed-off-by: Andreas Rheinhardt 
>> ---
>> https://trac.ffmpeg.org/ticket/4141#comment:9 contains a sample
>> containing Time Code SEI messages. Parsing it currently fails
>> because counting_type is detected as out of range. Of course, it is not.
>>
>>  libavcodec/cbs_h265_syntax_template.c | 56 ++-
>>  1 file changed, 30 insertions(+), 26 deletions(-)
> 
> Oops.  Yep, applied.
> 
> Do you happen to have a sample which could be included as a fate test?  Most 
> of the other SEI messages are found in the standard conformance test suite 
> and therefore get tested by it, but this one isn't.
> 
> Thanks,
> 
> - Mark
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
As has already been said in the quoted section: Ticket 4141 contains
such a sample. This is also the sample that made me investigate this.

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


Re: [FFmpeg-devel] avcodec/proresaw_enc : improvment (vendor and color properties, 4444Xq)

2018-12-02 Thread Martin Vignali
Hello,

No strong opinion about the func name, so change to
ff_int_from_list_or_default
Change int array to const int (in func and in prores_aw)

Martin


0003-avcodec-prores_aw-only-set-color-prim-trc-space.patch
Description: Binary data


0001-avcodec-utils-add-ff_int_from_list_or_default-func.patch
Description: Binary data


0004-avcodec-prores_aw-add--xq-support.patch
Description: Binary data


0002-avcodec-prores_aw-add-vendor-option.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] trace_headers: Update documentation

2018-12-02 Thread Mark Thompson
On 01/12/2018 07:52, Andreas Rheinhardt wrote:
> It also supports AV1 and (M)JPEG.
> 
> Signed-off-by: Andreas Rheinhardt 
> ---
>  doc/bitstream_filters.texi | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
> index 15c578aa8a..b779265f58 100644
> --- a/doc/bitstream_filters.texi
> +++ b/doc/bitstream_filters.texi
> @@ -632,7 +632,8 @@ Log trace output containing all syntax elements in the 
> coded stream
>  headers (everything above the level of individual coded blocks).
>  This can be useful for debugging low-level stream issues.
>  
> -Supports H.264, H.265, MPEG-2 and VP9.
> +Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending
> +on the build only a subset of these may be available.
>  
>  @section truehd_core

Sure; applied.

Thanks,

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


Re: [FFmpeg-devel] [PATCH 1/2] cbs_h265: Fix Time Code SEI syntax

2018-12-02 Thread Mark Thompson
On 01/12/2018 07:52, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt 
> ---
> https://trac.ffmpeg.org/ticket/4141#comment:9 contains a sample
> containing Time Code SEI messages. Parsing it currently fails
> because counting_type is detected as out of range. Of course, it is not.
> 
>  libavcodec/cbs_h265_syntax_template.c | 56 ++-
>  1 file changed, 30 insertions(+), 26 deletions(-)

Oops.  Yep, applied.

Do you happen to have a sample which could be included as a fate test?  Most of 
the other SEI messages are found in the standard conformance test suite and 
therefore get tested by it, but this one isn't.

Thanks,

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


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Mark Thompson
On 02/12/2018 12:49, Carl Eugen Hoyos wrote:
> 2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
>> 2018-11-22 23:47 GMT+01:00, Mark Thompson :
>>> Standard sed does not support EREs.
>>
>> Please mention ticket #7310 in the commit message.
> 
> Ping.

I was waiting for:

> The Darwin version script part was only tested by running it on the version 
> scripts and looking at the output, not actually building on that platform - 
> it would be helpful if someone could check that it actually works.

Can someone check this?

Thanks,

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


Re: [FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread James Almer
On 12/2/2018 4:07 PM, Paul B Mahol wrote:
> On 12/2/18, James Almer  wrote:
>> On 12/2/2018 3:53 PM, Paul B Mahol wrote:
>>> On 12/2/18, James Almer  wrote:
 On 12/2/2018 2:51 PM, Paul B Mahol wrote:
> Fixes #4517.
>
> Signed-off-by: Paul B Mahol 
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 2af6c0d797..7c55274efa 100755
> --- a/configure
> +++ b/configure
> @@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint
> chromaprint.h chromaprint_get_v
>  enabled decklink  && { require_headers DeckLinkAPI.h &&
> { test_cpp_condition
> DeckLinkAPIVersion.h
> "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink
> API version must be >= 10.9.5."; } }
>  enabled libndi_newtek && require_headers Processing.NDI.Lib.h
> -enabled frei0r&& require_headers frei0r.h
> +enabled frei0r&& require_headers frei0r.h &&
> require_headers
> dlfcn.h
>  enabled gmp   && require gmp gmp.h mpz_export -lgmp
>  enabled gnutls&& require_pkg_config gnutls gnutls
> gnutls/gnutls.h gnutls_global_init
>  enabled jni   && { [ $target_os = "android" ] &&
> check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
> -enabled ladspa&& require_headers ladspa.h
> +enabled ladspa&& require_headers ladspa.h &&
> require_headers
> dlfcn.h
>  enabled libaom&& require_pkg_config libaom "aom >= 1.0.0"
> aom/aom_codec.h aom_codec_version
>  enabled lv2   && require_pkg_config lv2 lilv-0
> "lilv/lilv.h"
> lilv_world_new
>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h
> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>

 Both filters already depend on libdl being present, which also implies
 dlfcn.h (The check for libdl uses it). How is that not enough?
>>>
>>> Filters != library support enabled
>>>
>>> Please read bug report I linked, it explains it.
>>>
>>> In short not having dflcn.h header would pass those options but would
>>> disable filters later.
>>> Proper way is to abort early.
>>
>> Do those libraries need dlfcn.h, or only the filters? If the former,
>> then the libraries are not meant to depend on the presence of libdl.
>> Hence the dep being for the filters.
>>
>> In any case, since both libraries are only used by one filter each, i
>> guess this is ok. But instead of adding a new require_headers check just
>> reuse the existing one to check both headers.
> 
> How do I do that?

require_headers "frei0r.h dlfcn.h"
require_headers "ladspa.h dlfcn.h"

Untested, but should work.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread Paul B Mahol
On 12/2/18, James Almer  wrote:
> On 12/2/2018 3:53 PM, Paul B Mahol wrote:
>> On 12/2/18, James Almer  wrote:
>>> On 12/2/2018 2:51 PM, Paul B Mahol wrote:
 Fixes #4517.

 Signed-off-by: Paul B Mahol 
 ---
  configure | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/configure b/configure
 index 2af6c0d797..7c55274efa 100755
 --- a/configure
 +++ b/configure
 @@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint
 chromaprint.h chromaprint_get_v
  enabled decklink  && { require_headers DeckLinkAPI.h &&
 { test_cpp_condition
 DeckLinkAPIVersion.h
 "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink
 API version must be >= 10.9.5."; } }
  enabled libndi_newtek && require_headers Processing.NDI.Lib.h
 -enabled frei0r&& require_headers frei0r.h
 +enabled frei0r&& require_headers frei0r.h &&
 require_headers
 dlfcn.h
  enabled gmp   && require gmp gmp.h mpz_export -lgmp
  enabled gnutls&& require_pkg_config gnutls gnutls
 gnutls/gnutls.h gnutls_global_init
  enabled jni   && { [ $target_os = "android" ] &&
 check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
 -enabled ladspa&& require_headers ladspa.h
 +enabled ladspa&& require_headers ladspa.h &&
 require_headers
 dlfcn.h
  enabled libaom&& require_pkg_config libaom "aom >= 1.0.0"
 aom/aom_codec.h aom_codec_version
  enabled lv2   && require_pkg_config lv2 lilv-0
 "lilv/lilv.h"
 lilv_world_new
  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h
 iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883

>>>
>>> Both filters already depend on libdl being present, which also implies
>>> dlfcn.h (The check for libdl uses it). How is that not enough?
>>
>> Filters != library support enabled
>>
>> Please read bug report I linked, it explains it.
>>
>> In short not having dflcn.h header would pass those options but would
>> disable filters later.
>> Proper way is to abort early.
>
> Do those libraries need dlfcn.h, or only the filters? If the former,
> then the libraries are not meant to depend on the presence of libdl.
> Hence the dep being for the filters.
>
> In any case, since both libraries are only used by one filter each, i
> guess this is ok. But instead of adding a new require_headers check just
> reuse the existing one to check both headers.

How do I do that?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread James Almer
On 12/2/2018 3:53 PM, Paul B Mahol wrote:
> On 12/2/18, James Almer  wrote:
>> On 12/2/2018 2:51 PM, Paul B Mahol wrote:
>>> Fixes #4517.
>>>
>>> Signed-off-by: Paul B Mahol 
>>> ---
>>>  configure | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 2af6c0d797..7c55274efa 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint
>>> chromaprint.h chromaprint_get_v
>>>  enabled decklink  && { require_headers DeckLinkAPI.h &&
>>> { test_cpp_condition DeckLinkAPIVersion.h
>>> "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink
>>> API version must be >= 10.9.5."; } }
>>>  enabled libndi_newtek && require_headers Processing.NDI.Lib.h
>>> -enabled frei0r&& require_headers frei0r.h
>>> +enabled frei0r&& require_headers frei0r.h && require_headers
>>> dlfcn.h
>>>  enabled gmp   && require gmp gmp.h mpz_export -lgmp
>>>  enabled gnutls&& require_pkg_config gnutls gnutls
>>> gnutls/gnutls.h gnutls_global_init
>>>  enabled jni   && { [ $target_os = "android" ] &&
>>> check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
>>> -enabled ladspa&& require_headers ladspa.h
>>> +enabled ladspa&& require_headers ladspa.h && require_headers
>>> dlfcn.h
>>>  enabled libaom&& require_pkg_config libaom "aom >= 1.0.0"
>>> aom/aom_codec.h aom_codec_version
>>>  enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h"
>>> lilv_world_new
>>>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h
>>> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>>>
>>
>> Both filters already depend on libdl being present, which also implies
>> dlfcn.h (The check for libdl uses it). How is that not enough?
> 
> Filters != library support enabled
> 
> Please read bug report I linked, it explains it.
> 
> In short not having dflcn.h header would pass those options but would
> disable filters later.
> Proper way is to abort early.

Do those libraries need dlfcn.h, or only the filters? If the former,
then the libraries are not meant to depend on the presence of libdl.
Hence the dep being for the filters.

In any case, since both libraries are only used by one filter each, i
guess this is ok. But instead of adding a new require_headers check just
reuse the existing one to check both headers.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread Paul B Mahol
On 12/2/18, James Almer  wrote:
> On 12/2/2018 2:51 PM, Paul B Mahol wrote:
>> Fixes #4517.
>>
>> Signed-off-by: Paul B Mahol 
>> ---
>>  configure | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 2af6c0d797..7c55274efa 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint
>> chromaprint.h chromaprint_get_v
>>  enabled decklink  && { require_headers DeckLinkAPI.h &&
>> { test_cpp_condition DeckLinkAPIVersion.h
>> "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink
>> API version must be >= 10.9.5."; } }
>>  enabled libndi_newtek && require_headers Processing.NDI.Lib.h
>> -enabled frei0r&& require_headers frei0r.h
>> +enabled frei0r&& require_headers frei0r.h && require_headers
>> dlfcn.h
>>  enabled gmp   && require gmp gmp.h mpz_export -lgmp
>>  enabled gnutls&& require_pkg_config gnutls gnutls
>> gnutls/gnutls.h gnutls_global_init
>>  enabled jni   && { [ $target_os = "android" ] &&
>> check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
>> -enabled ladspa&& require_headers ladspa.h
>> +enabled ladspa&& require_headers ladspa.h && require_headers
>> dlfcn.h
>>  enabled libaom&& require_pkg_config libaom "aom >= 1.0.0"
>> aom/aom_codec.h aom_codec_version
>>  enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h"
>> lilv_world_new
>>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h
>> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>>
>
> Both filters already depend on libdl being present, which also implies
> dlfcn.h (The check for libdl uses it). How is that not enough?

Filters != library support enabled

Please read bug report I linked, it explains it.

In short not having dflcn.h header would pass those options but would
disable filters later.
Proper way is to abort early.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread James Almer
On 12/2/2018 2:51 PM, Paul B Mahol wrote:
> Fixes #4517.
> 
> Signed-off-by: Paul B Mahol 
> ---
>  configure | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 2af6c0d797..7c55274efa 100755
> --- a/configure
> +++ b/configure
> @@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint 
> chromaprint.h chromaprint_get_v
>  enabled decklink  && { require_headers DeckLinkAPI.h &&
> { test_cpp_condition DeckLinkAPIVersion.h 
> "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink API 
> version must be >= 10.9.5."; } }
>  enabled libndi_newtek && require_headers Processing.NDI.Lib.h
> -enabled frei0r&& require_headers frei0r.h
> +enabled frei0r&& require_headers frei0r.h && require_headers 
> dlfcn.h
>  enabled gmp   && require gmp gmp.h mpz_export -lgmp
>  enabled gnutls&& require_pkg_config gnutls gnutls 
> gnutls/gnutls.h gnutls_global_init
>  enabled jni   && { [ $target_os = "android" ] && check_headers 
> jni.h && enabled pthreads || die "ERROR: jni not found"; }
> -enabled ladspa&& require_headers ladspa.h
> +enabled ladspa&& require_headers ladspa.h && require_headers 
> dlfcn.h
>  enabled libaom&& require_pkg_config libaom "aom >= 1.0.0" 
> aom/aom_codec.h aom_codec_version
>  enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h" 
> lilv_world_new
>  enabled libiec61883   && require libiec61883 libiec61883/iec61883.h 
> iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
> 

Both filters already depend on libdl being present, which also implies
dlfcn.h (The check for libdl uses it). How is that not enough?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: check if dlfcn.h is present for ladspa and frei0r, if not abort early

2018-12-02 Thread Paul B Mahol
Fixes #4517.

Signed-off-by: Paul B Mahol 
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 2af6c0d797..7c55274efa 100755
--- a/configure
+++ b/configure
@@ -6065,11 +6065,11 @@ enabled chromaprint   && require chromaprint 
chromaprint.h chromaprint_get_v
 enabled decklink  && { require_headers DeckLinkAPI.h &&
{ test_cpp_condition DeckLinkAPIVersion.h 
"BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink API 
version must be >= 10.9.5."; } }
 enabled libndi_newtek && require_headers Processing.NDI.Lib.h
-enabled frei0r&& require_headers frei0r.h
+enabled frei0r&& require_headers frei0r.h && require_headers 
dlfcn.h
 enabled gmp   && require gmp gmp.h mpz_export -lgmp
 enabled gnutls&& require_pkg_config gnutls gnutls gnutls/gnutls.h 
gnutls_global_init
 enabled jni   && { [ $target_os = "android" ] && check_headers 
jni.h && enabled pthreads || die "ERROR: jni not found"; }
-enabled ladspa&& require_headers ladspa.h
+enabled ladspa&& require_headers ladspa.h && require_headers 
dlfcn.h
 enabled libaom&& require_pkg_config libaom "aom >= 1.0.0" 
aom/aom_codec.h aom_codec_version
 enabled lv2   && require_pkg_config lv2 lilv-0 "lilv/lilv.h" 
lilv_world_new
 enabled libiec61883   && require libiec61883 libiec61883/iec61883.h 
iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
-- 
2.17.1

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


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread Moritz Barsnick
On Sun, Dec 02, 2018 at 13:38:48 +0800, Jun Zhao wrote:
> +{"intra_ref_type", "Intra Refresh Type 0: No intra refresh 1: CRA (Open 
> GOP) 2: IDR", OFFSET(svt_param.intra_ref_type), AV_OPT_TYPE_INT, { .i64 = 1 
> }, 1, 2, VE },
[...]
> +{"profile", "Profile now support[1,2], Main Still Picture Profile not 
> supported", OFFSET(svt_param.profile), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 2, 
> VE },
> +{"rc", "RC mode 0: CQP 1: VBR", OFFSET(svt_param.rc_mode), 
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> +{"tune", "Tune mode: SQ/OQ[0,1]", OFFSET(svt_param.tune), 
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
[...]

Four these four, named parameters would be welcome.

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


Re: [FFmpeg-devel] [PATCH V1 2/2] Changelog: Add new entry for svt-hevc encoder

2018-12-02 Thread Moritz Barsnick
On Sun, Dec 02, 2018 at 13:38:49 +0800, Jun Zhao wrote:
>  Changelog |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

This belongs merged into the commit which implements this.

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


Re: [FFmpeg-devel] [PATCH] avcodec/r210: use correct pixel format

2018-12-02 Thread Paul B Mahol
On 12/2/18, Carl Eugen Hoyos  wrote:
> 2018-12-02 18:06 GMT+01:00, Paul B Mahol :
>> Signed-off-by: Paul B Mahol 
>> ---
>>  libavcodec/r210dec.c  | 38 ++-
>>  libavcodec/r210enc.c  | 26 +++-
>>  tests/ref/vsynth/vsynth1-r210 |  6 +++---
>>  tests/ref/vsynth/vsynth2-r210 |  6 +++---
>>  tests/ref/vsynth/vsynth3-r210 |  6 +++---
>>  5 files changed, 45 insertions(+), 37 deletions(-)
>>
>> diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
>> index dbc94c76bd..22b95e9092 100644
>> --- a/libavcodec/r210dec.c
>> +++ b/libavcodec/r210dec.c
>> @@ -27,11 +27,7 @@
>>
>>  static av_cold int decode_init(AVCodecContext *avctx)
>>  {
>> -if ((avctx->codec_tag & 0xFF) == MKTAG('r', '1', '0', 0)) {
>> -avctx->pix_fmt = AV_PIX_FMT_BGR48;
>> -} else {
>> -avctx->pix_fmt = AV_PIX_FMT_RGB48;
>> -}
>> +avctx->pix_fmt = AV_PIX_FMT_GBRP10;
>
> Does this patch cause a change in performance?

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


Re: [FFmpeg-devel] [PATCH] avcodec/r210: use correct pixel format

2018-12-02 Thread Carl Eugen Hoyos
2018-12-02 18:06 GMT+01:00, Paul B Mahol :
> Signed-off-by: Paul B Mahol 
> ---
>  libavcodec/r210dec.c  | 38 ++-
>  libavcodec/r210enc.c  | 26 +++-
>  tests/ref/vsynth/vsynth1-r210 |  6 +++---
>  tests/ref/vsynth/vsynth2-r210 |  6 +++---
>  tests/ref/vsynth/vsynth3-r210 |  6 +++---
>  5 files changed, 45 insertions(+), 37 deletions(-)
>
> diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
> index dbc94c76bd..22b95e9092 100644
> --- a/libavcodec/r210dec.c
> +++ b/libavcodec/r210dec.c
> @@ -27,11 +27,7 @@
>
>  static av_cold int decode_init(AVCodecContext *avctx)
>  {
> -if ((avctx->codec_tag & 0xFF) == MKTAG('r', '1', '0', 0)) {
> -avctx->pix_fmt = AV_PIX_FMT_BGR48;
> -} else {
> -avctx->pix_fmt = AV_PIX_FMT_RGB48;
> -}
> +avctx->pix_fmt = AV_PIX_FMT_GBRP10;

Does this patch cause a change in performance?

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


[FFmpeg-devel] [PATCH] avcodec/r210: use correct pixel format

2018-12-02 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
 libavcodec/r210dec.c  | 38 ++-
 libavcodec/r210enc.c  | 26 +++-
 tests/ref/vsynth/vsynth1-r210 |  6 +++---
 tests/ref/vsynth/vsynth2-r210 |  6 +++---
 tests/ref/vsynth/vsynth3-r210 |  6 +++---
 5 files changed, 45 insertions(+), 37 deletions(-)

diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index dbc94c76bd..22b95e9092 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -27,11 +27,7 @@
 
 static av_cold int decode_init(AVCodecContext *avctx)
 {
-if ((avctx->codec_tag & 0xFF) == MKTAG('r', '1', '0', 0)) {
-avctx->pix_fmt = AV_PIX_FMT_BGR48;
-} else {
-avctx->pix_fmt = AV_PIX_FMT_RGB48;
-}
+avctx->pix_fmt = AV_PIX_FMT_GBRP10;
 avctx->bits_per_raw_sample = 10;
 
 return 0;
@@ -45,7 +41,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame,
 const uint32_t *src = (const uint32_t *)avpkt->data;
 int aligned_width = FFALIGN(avctx->width,
 avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
-uint8_t *dst_line;
+uint8_t *g_line, *b_line, *r_line;
 int r10 = (avctx->codec_tag & 0xFF) == MKTAG('r', '1', '0', 0);
 int le = avctx->codec_tag == MKTAG('R', '1', '0', 'k') &&
  avctx->extradata_size >= 12 && !memcmp(>extradata[4], 
"DpxE", 4) &&
@@ -61,10 +57,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame,
 
 pic->pict_type = AV_PICTURE_TYPE_I;
 pic->key_frame = 1;
-dst_line = pic->data[0];
+g_line = pic->data[0];
+b_line = pic->data[1];
+r_line = pic->data[2];
 
 for (h = 0; h < avctx->height; h++) {
-uint16_t *dst = (uint16_t *)dst_line;
+uint16_t *dstg = (uint16_t *)g_line;
+uint16_t *dstb = (uint16_t *)b_line;
+uint16_t *dstr = (uint16_t *)r_line;
 for (w = 0; w < avctx->width; w++) {
 uint32_t pixel;
 uint16_t r, g, b;
@@ -74,20 +74,22 @@ static int decode_frame(AVCodecContext *avctx, void *data, 
int *got_frame,
 pixel = av_be2ne32(*src++);
 }
 if (avctx->codec_id == AV_CODEC_ID_R210 || r10) {
-b =  pixel <<  6;
-g = (pixel >>  4) & 0xffc0;
-r = (pixel >> 14) & 0xffc0;
+b =  pixel & 0x3ff;
+g = (pixel >> 10) & 0x3ff;
+r = (pixel >> 20) & 0x3ff;
 } else {
-b = (pixel <<  4) & 0xffc0;
-g = (pixel >>  6) & 0xffc0;
-r = (pixel >> 16) & 0xffc0;
+b = (pixel >>  2) & 0x3ff;
+g = (pixel >> 12) & 0x3ff;
+r = (pixel >> 22) & 0x3ff;
 }
-*dst++ = r | (r >> 10);
-*dst++ = g | (g >> 10);
-*dst++ = b | (b >> 10);
+*dstr++ = r;
+*dstg++ = g;
+*dstb++ = b;
 }
 src += aligned_width - avctx->width;
-dst_line += pic->linesize[0];
+g_line += pic->linesize[0];
+b_line += pic->linesize[1];
+r_line += pic->linesize[2];
 }
 
 *got_frame  = 1;
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index a55e5434f3..02412f3684 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -43,22 +43,26 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 int aligned_width = FFALIGN(avctx->width,
 avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
 int pad = (aligned_width - avctx->width) * 4;
-uint8_t *src_line;
+uint8_t *srcr_line, *srcg_line, *srcb_line;
 uint8_t *dst;
 
 if ((ret = ff_alloc_packet2(avctx, pkt, 4 * aligned_width * avctx->height, 
0)) < 0)
 return ret;
 
-src_line = pic->data[0];
+srcg_line = pic->data[0];
+srcb_line = pic->data[1];
+srcr_line = pic->data[2];
 dst = pkt->data;
 
 for (i = 0; i < avctx->height; i++) {
-uint16_t *src = (uint16_t *)src_line;
+uint16_t *srcr = (uint16_t *)srcr_line;
+uint16_t *srcg = (uint16_t *)srcg_line;
+uint16_t *srcb = (uint16_t *)srcb_line;
 for (j = 0; j < avctx->width; j++) {
 uint32_t pixel;
-uint16_t r = *src++ >> 6;
-uint16_t g = *src++ >> 6;
-uint16_t b = *src++ >> 6;
+uint16_t r = *srcr++;
+uint16_t g = *srcg++;
+uint16_t b = *srcb++;
 if (avctx->codec_id == AV_CODEC_ID_R210)
 pixel = (r << 20) | (g << 10) | b;
 else
@@ -70,7 +74,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 }
 memset(dst, 0, pad);
 dst += pad;
-src_line += pic->linesize[0];
+srcr_line += pic->linesize[2];
+srcg_line += pic->linesize[0];
+srcb_line += pic->linesize[1];
 }
 
 pkt->flags |= AV_PKT_FLAG_KEY;
@@ 

Re: [FFmpeg-devel] avcodec/proresaw_enc : improvment (vendor and color properties, 4444Xq)

2018-12-02 Thread Michael Niedermayer
On Sun, Dec 02, 2018 at 01:52:49PM +0100, Martin Vignali wrote:
> Hello,
> 
> New patch in attach
> 
> 001 : add ff_int_is_in_list func to libavcodec/utils.c
> 002 : add vendor option (unchanged)
> 003 : only write color properties if supported (use new ff_int_is_in_list
> func)
> 004 : Add 444Xq (unchanged)
> 
> Martin

>  proresenc_anatoliy.c |   13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 8ba4720a3b18d2ee2f865463d5ad402ba7a04a4b  
> 0003-avcodec-prores_aw-only-set-color-prim-trc-space.patch
> From 219d1a49472712d601dc722a2719abf547321c32 Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sun, 2 Dec 2018 13:40:02 +0100
> Subject: [PATCH 3/4] avcodec/prores_aw : only set color prim, trc, space 
>  values if supported
> 
> set to unspecified if frame have another value
> ---
>  libavcodec/proresenc_anatoliy.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
> index 8047f1c242..6263d2b83b 100644
> --- a/libavcodec/proresenc_anatoliy.c
> +++ b/libavcodec/proresenc_anatoliy.c
> @@ -52,6 +52,12 @@ static const int qp_start_table[5] = {  8, 3, 2, 1, 1};
>  static const int qp_end_table[5]   = { 13, 9, 6, 6, 5};
>  static const int bitrate_table[5]  = { 1000, 2100, 3500, 5400, 7000};
>  
> +static int valid_primaries[9]  = { AVCOL_PRI_RESERVED0, AVCOL_PRI_BT709, 
> AVCOL_PRI_UNSPECIFIED, AVCOL_PRI_BT470BG,
> +   AVCOL_PRI_SMPTE170M, AVCOL_PRI_BT2020, 
> AVCOL_PRI_SMPTE431, AVCOL_PRI_SMPTE432,INT_MAX };
> +static int valid_trc[4]= { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, 
> AVCOL_TRC_UNSPECIFIED, INT_MAX };
> +static int valid_colorspace[5] = { AVCOL_SPC_BT709, AVCOL_SPC_UNSPECIFIED, 
> AVCOL_SPC_SMPTE170M,
> +   AVCOL_SPC_BT2020_NCL, INT_MAX };

these should be const static

[...]
>  internal.h |   12 
>  utils.c|   19 +++
>  2 files changed, 31 insertions(+)
> 1d57ba15526595e41879dc1b4aa65444941e4d68  
> 0001-avcodec-utils-add-ff_int_is_in_list-func.patch
> From 3489b650f90c62ecf621f4f930239bb639515aca Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sun, 2 Dec 2018 13:28:33 +0100
> Subject: [PATCH 1/4] avcodec/utils : add ff_int_is_in_list func
> 
> to check valid value, or return default_value
> ---
>  libavcodec/internal.h | 12 
>  libavcodec/utils.c| 19 +++
>  2 files changed, 31 insertions(+)
> 
> diff --git a/libavcodec/internal.h b/libavcodec/internal.h
> index 0c2133f092..03f1d29bc2 100644
> --- a/libavcodec/internal.h
> +++ b/libavcodec/internal.h
> @@ -404,6 +404,18 @@ int ff_alloc_a53_sei(const AVFrame *frame, size_t 
> prefix_len,
>   */
>  int64_t ff_guess_coded_bitrate(AVCodecContext *avctx);
>  
> +/**
> + * Check if a value is in the list. If not, return the default value
> + *
> + * @param ctxContext for the log msg
> + * @param val_name   Name of the checked value, for log msg
> + * @param array_valid_values Array of valid int, ended with INT_MAX
> + * @param default_value  Value return if checked value is not in the 
> array
> + * @return   Value or default_value.
> + */
> +int ff_int_is_in_list(void *ctx, const char * val_name, int val,
> +  int * array_valid_values, int default_value);

maybe
ff_int_from_list_or_default()
is a clearer name, what do you think ?

but iam fine with either, just wondering 

thx

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread James Almer
On 12/2/2018 7:24 AM, Steven Liu wrote:
> 
> 
>> On Dec 2, 2018, at 13:38, Jun Zhao  wrote:
>>
>> base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
>>
>> Signed-off-by: Huang, Zhengxu 
>> Signed-off-by: hassene 
>> Signed-off-by: Jun Zhao 
>> ---
>> configure|4 +
>> libavcodec/Makefile  |1 +
>> libavcodec/allcodecs.c   |1 +
>> libavcodec/libsvt_hevc.c |  370 
>> ++
>> 4 files changed, 376 insertions(+), 0 deletions(-)
>> create mode 100644 libavcodec/libsvt_hevc.c
>>
>> diff --git a/configure b/configure
>> index 54b7e11..c3dca73 100755
>> --- a/configure
>> +++ b/configure
>> @@ -263,6 +263,7 @@ External library support:
>>   --enable-libspeexenable Speex de/encoding via libspeex [no]
>>   --enable-libsrt  enable Haivision SRT protocol via libsrt [no]
>>   --enable-libssh  enable SFTP protocol via libssh [no]
>> +  --enable-libsvt  enable HEVC encoding via svt [no]
>>   --enable-libtensorflow   enable TensorFlow as a DNN module backend
>>for DNN based filters like sr [no]
>>   --enable-libtesseractenable Tesseract, needed for ocr filter [no]
>> @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
>> libcdio
>> libdavs2
>> librubberband
>> +libsvt
>> libvidstab
>> libx264
>> libx265
>> @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
>> chromaprint_muxer_deps="chromaprint"
>> h264_videotoolbox_encoder_deps="pthreads"
>> h264_videotoolbox_encoder_select="videotoolbox_encoder"
>> +hevc_svt_encoder_deps="libsvt"
>> hevc_videotoolbox_encoder_deps="pthreads"
>> hevc_videotoolbox_encoder_select="videotoolbox_encoder"
>> libaom_av1_decoder_deps="libaom"
>> @@ -6147,6 +6150,7 @@ enabled libsoxr   && require libsoxr soxr.h 
>> soxr_create -lsoxr
>> enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h 
>> sftp_init
>> enabled libspeex  && require_pkg_config libspeex speex speex/speex.h 
>> speex_decoder_init
>> enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" 
>> srt/srt.h srt_socket
>> +enabled libsvt&& require_pkg_config libsvt  svt  EbApi.h 
>> EbInitHandle
>> enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h 
>> TF_Version -ltensorflow
>> enabled libtesseract  && require_pkg_config libtesseract tesseract 
>> tesseract/capi.h TessBaseAPICreate
>> enabled libtheora && require libtheora theora/theoraenc.h 
>> th_info_init -ltheoraenc -ltheoradec -logg
>> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
>> index 5feadac..1a8b547 100644
>> --- a/libavcodec/Makefile
>> +++ b/libavcodec/Makefile
>> @@ -374,6 +374,7 @@ OBJS-$(CONFIG_HEVC_QSV_DECODER)+= qsvdec_h2645.o
>> OBJS-$(CONFIG_HEVC_QSV_ENCODER)+= qsvenc_hevc.o hevc_ps_enc.o   \
>>   hevc_data.o
>> OBJS-$(CONFIG_HEVC_RKMPP_DECODER)  += rkmppdec.o
>> +OBJS-$(CONFIG_HEVC_SVT_ENCODER)+= libsvt_hevc.o
>> OBJS-$(CONFIG_HEVC_VAAPI_ENCODER)  += vaapi_encode_h265.o 
>> h265_profile_level.o
>> OBJS-$(CONFIG_HEVC_V4L2M2M_DECODER)+= v4l2_m2m_dec.o
>> OBJS-$(CONFIG_HEVC_V4L2M2M_ENCODER)+= v4l2_m2m_enc.o
>> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
>> index d70646e..ff8ea94 100644
>> --- a/libavcodec/allcodecs.c
>> +++ b/libavcodec/allcodecs.c
>> @@ -749,6 +749,7 @@ extern AVCodec ff_hevc_cuvid_decoder;
>> extern AVCodec ff_hevc_mediacodec_decoder;
>> extern AVCodec ff_hevc_nvenc_encoder;
>> extern AVCodec ff_hevc_qsv_encoder;
>> +extern AVCodec ff_hevc_svt_encoder;
>> extern AVCodec ff_hevc_v4l2m2m_encoder;
>> extern AVCodec ff_hevc_vaapi_encoder;
>> extern AVCodec ff_hevc_videotoolbox_encoder;
>> diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
>> new file mode 100644
>> index 000..1e10111
>> --- /dev/null
>> +++ b/libavcodec/libsvt_hevc.c
>> @@ -0,0 +1,370 @@
>> +/*
>> +* Scalable Video Technology for HEVC encoder library plugin
>> +*
>> +* Copyright (c) 2018 Intel Corporation
>> +*
>> +* This program is free software; you can redistribute it and/or
>> +* modify it under the terms of the GNU Lesser General Public
>> +* License as published by the Free Software Foundation; either
>> +* version 2.1 of the License, or (at your option) any later version.
>> +*
>> +* This program is distributed in the hope that it will be useful,
>> +* but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> +* Lesser General Public License for more details.
>> +*
>> +* You should have received a copy of the GNU Lesser General Public
>> +* License along with this program; if not, write to the Free Software
>> +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
>> USA
>> +*/
>> +
>> +#include "EbErrorCodes.h"
>> +#include "EbTime.h"
>> +#include "EbApi.h"
>> 

Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread James Almer
On 12/2/2018 2:38 AM, Jun Zhao wrote:
> base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
> 
> Signed-off-by: Huang, Zhengxu 
> Signed-off-by: hassene 
> Signed-off-by: Jun Zhao 
> ---
>  configure|4 +
>  libavcodec/Makefile  |1 +
>  libavcodec/allcodecs.c   |1 +
>  libavcodec/libsvt_hevc.c |  370 
> ++
>  4 files changed, 376 insertions(+), 0 deletions(-)
>  create mode 100644 libavcodec/libsvt_hevc.c
> 
> diff --git a/configure b/configure
> index 54b7e11..c3dca73 100755
> --- a/configure
> +++ b/configure
> @@ -263,6 +263,7 @@ External library support:
>--enable-libspeexenable Speex de/encoding via libspeex [no]
>--enable-libsrt  enable Haivision SRT protocol via libsrt [no]
>--enable-libssh  enable SFTP protocol via libssh [no]
> +  --enable-libsvt  enable HEVC encoding via svt [no]
>--enable-libtensorflow   enable TensorFlow as a DNN module backend
> for DNN based filters like sr [no]
>--enable-libtesseractenable Tesseract, needed for ocr filter [no]
> @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
>  libcdio
>  libdavs2
>  librubberband
> +libsvt
>  libvidstab
>  libx264
>  libx265
> @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
>  chromaprint_muxer_deps="chromaprint"
>  h264_videotoolbox_encoder_deps="pthreads"
>  h264_videotoolbox_encoder_select="videotoolbox_encoder"
> +hevc_svt_encoder_deps="libsvt"

Since this is an external library based encoder, the correct name would
be libsvt_encoder.
You can also make it libsvt_hevc_encoder instead, which is what you used
as AVCodec.name.

>  hevc_videotoolbox_encoder_deps="pthreads"
>  hevc_videotoolbox_encoder_select="videotoolbox_encoder"
>  libaom_av1_decoder_deps="libaom"


[...]

> +static av_cold int eb_enc_init(AVCodecContext *avctx)
> +{
> +SvtContext   *q = avctx->priv_data;
> +SvtEncoder   *svt_enc = NULL;
> +EB_ERRORTYPE ret = EB_ErrorNone;
> +
> +q->svt_enc  = av_mallocz(sizeof(*q->svt_enc));
> +if (!q->svt_enc)
> +return AVERROR(ENOMEM);
> +svt_enc = q->svt_enc;
> +
> +q->eos_flag = 0;
> +
> +ret = EbInitHandle(_enc->svt_handle, q, _enc->enc_params);
> +if (ret != EB_ErrorNone)
> +goto failed_init;
> +
> +ret = config_enc_params(_enc->enc_params, avctx);
> +if (ret != EB_ErrorNone)
> +goto failed_init;
> +
> +ret = EbH265EncSetParameter(svt_enc->svt_handle, _enc->enc_params);
> +if (ret != EB_ErrorNone)
> +goto failed_init;
> +
> +ret = EbInitEncoder(svt_enc->svt_handle);
> +if (ret != EB_ErrorNone)
> +goto failed_init;
> +
> +if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
> +
> +EB_BUFFERHEADERTYPE headerPtr;
> +headerPtr.nSize   = sizeof(EB_BUFFERHEADERTYPE);
> +headerPtr.nFilledLen  = 0;
> +headerPtr.pBuffer = av_malloc(10 * 1024 * 1024);
> +headerPtr.nAllocLen   = (10 * 1024 * 1024);
> +
> +if (!headerPtr.pBuffer)
> +return AVERROR(ENOMEM);
> +
> +ret = EbH265EncStreamHeader(svt_enc->svt_handle, );
> +if (ret != EB_ErrorNone) {
> +av_freep();
> +goto failed_init;
> +}
> +avctx->extradata_size = headerPtr.nFilledLen;
> +avctx->extradata = av_malloc(avctx->extradata_size + 
> AV_INPUT_BUFFER_PADDING_SIZE);
> +if (!avctx->extradata) {
> +av_log(avctx, AV_LOG_ERROR,
> +   "Cannot allocate HEVC header of size %d.\n", 
> avctx->extradata_size);
> +return AVERROR(ENOMEM);
> +}
> +memcpy(avctx->extradata, headerPtr.pBuffer, avctx->extradata_size);
> +av_freep();
> +}
> +return 0;
> +
> +failed_init:
> +return error_mapping(ret);

If it's only this line, just use it directly where needed instead of a goto.

[...]

> +#define OFFSET(x) offsetof(SvtContext, x)
> +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
> +static const AVOption options[] = {
> +{"vui", "Enable vui info", OFFSET(svt_param.vui_info), AV_OPT_TYPE_BOOL, 
> { .i64 = 0 }, 0, 1, VE },
> +{"hielevel", "Hierarchical Prediction Levels [0,3]", 
> OFFSET(svt_param.hierarchical_level), AV_OPT_TYPE_INT, { .i64 = 3 }, 0, 3, VE 
> },
> +{"la_depth", "Look Ahead Distance [0,256]", OFFSET(svt_param.la_depth), 
> AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 256, VE },
> +{"intra_ref_type", "Intra Refresh Type 0: No intra refresh 1: CRA (Open 
> GOP) 2: IDR", OFFSET(svt_param.intra_ref_type), AV_OPT_TYPE_INT, { .i64 = 1 
> }, 1, 2, VE },
> +{"enc_p", "Encoding preset [0,12] (for tune 0 and >=4k resolution), 
> [0,10] (for >= 1080p resolution), [0,9] (for all resolution and modes)", 
> OFFSET(svt_param.enc_mode), AV_OPT_TYPE_INT, { .i64 = 9 }, 0, 12, VE },

Use preset instead, which is more in line with similar encoders.


Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/dashenc: Added an option to ignore io errors

2018-12-02 Thread Jeyapal, Karthick

On 11/28/18 10:36 PM, Karthick J wrote:
> When dashenc has to run for long duration(say 24x7 live stream), one can 
> enable this option to ignore the io failure of few segment's upload due to an 
> intermittent network issues.
> When the network connection recovers dashenc will continue with the upload of 
> the current segments, leading to the recovery of the stream.
> ---
>  doc/muxers.texi   |  3 +++
>  libavformat/dashenc.c | 17 +++--
>  2 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index a02ac01b55..f1cc6f5fee 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -300,6 +300,9 @@ If this flag is set, the dash segment files will be in in 
> ISOBMFF format.
>  @item webm
>  If this flag is set, the dash segment files will be in in WebM format.
>  
> +@item -ignore_io_errors @var{ignore_io_errors}
> +Ignore IO errors during open and write. Useful for long-duration runs with 
> network output.
> +
>  @end table
>  
>  @anchor{framecrc}
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 2f403257c0..04218af6a6 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -138,6 +138,7 @@ typedef struct DASHContext {
>  int index_correction;
>  char *format_options_str;
>  SegmentType segment_type_option;  /* segment type as specified in 
> options */
> +int ignore_io_errors;
>  } DASHContext;
>  
>  static struct codec_string {
> @@ -846,7 +847,7 @@ static int write_manifest(AVFormatContext *s, int final)
>  av_dict_free();
>  if (ret < 0) {
>  av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
> temp_filename);
> -return ret;
> +return c->ignore_io_errors ? 0 : ret;
>  }
>  out = c->mpd_out;
>  avio_printf(out, "\n");
> @@ -937,7 +938,7 @@ static int write_manifest(AVFormatContext *s, int final)
>  av_dict_free();
>  if (ret < 0) {
>  av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", 
> temp_filename);
> -return ret;
> +return c->ignore_io_errors ? 0 : ret;
>  }
>  
>  ff_hls_write_playlist_version(c->m3u8_out, 7);
> @@ -1565,8 +1566,9 @@ static int dash_write_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  set_http_options(, c);
>  ret = dashenc_io_open(s, >out, os->temp_path, );
>  av_dict_free();
> -if (ret < 0)
> -return ret;
> +if (ret < 0) {
> +return c->ignore_io_errors ? 0 : ret;
> +}
>  }
>  
>  //write out the data immediately in streaming mode
> @@ -1577,9 +1579,11 @@ static int dash_write_packet(AVFormatContext *s, 
> AVPacket *pkt)
>  write_styp(os->ctx->pb);
>  avio_flush(os->ctx->pb);
>  len = avio_get_dyn_buf (os->ctx->pb, );
> -avio_write(os->out, buf + os->written_len, len - os->written_len);
> +if (os->out) {
> +avio_write(os->out, buf + os->written_len, len - 
> os->written_len);
> +avio_flush(os->out);
> +}
>  os->written_len = len;
> -avio_flush(os->out);
>  }
>  
>  return ret;
> @@ -1670,6 +1674,7 @@ static const AVOption options[] = {
>  { "auto", "select segment file format based on codec", 0, 
> AV_OPT_TYPE_CONST, {.i64 = SEGMENT_TYPE_AUTO }, 0, UINT_MAX,   E, 
> "segment_type"},
>  { "mp4", "make segment file in ISOBMFF format", 0, AV_OPT_TYPE_CONST, 
> {.i64 = SEGMENT_TYPE_MP4 }, 0, UINT_MAX,   E, "segment_type"},
>  { "webm", "make segment file in WebM format", 0, AV_OPT_TYPE_CONST, 
> {.i64 = SEGMENT_TYPE_WEBM }, 0, UINT_MAX,   E, "segment_type"},
> +{ "ignore_io_errors", "Ignore IO errors during open and write. Useful 
> for long-duration runs with network output", OFFSET(ignore_io_errors), 
> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E },
>  { NULL },
>  };
>  
Pushed Patchset

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf/dashenc: Delete HLS manifests on trailer writing if remove_at_exit is set.

2018-12-02 Thread Jeyapal, Karthick

On 11/28/18 10:28 PM, Jeyapal, Karthick wrote:
>
> On 11/28/18 5:06 PM, Andrey Semashev wrote:
>> This fixes HLS manifests being left behind if remove_at_exit is set.
>> ---
>>  libavformat/dashenc.c | 12 
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
>> index a7d8c4e237..af3f0ee167 100644
>> --- a/libavformat/dashenc.c
>> +++ b/libavformat/dashenc.c
>> @@ -1619,6 +1619,18 @@ static int dash_write_trailer(AVFormatContext *s)
>>  dashenc_delete_file(s, filename);
>>  }
>>  dashenc_delete_file(s, s->url);
>> +
>> +if (c->hls_playlist && c->master_playlist_created) {
>> +for (i = 0; i < s->nb_streams; i++) {
>> +OutputStream *os = >streams[i];
>> +if (os->segment_type == SEGMENT_TYPE_MP4) {
>> +get_hls_playlist_name(filename, sizeof(filename), 
>> c->dirname, i);
>> +dashenc_delete_file(s, filename);
>> +}
>> +}
>> +snprintf(filename, sizeof(filename), "%smaster.m3u8", 
>> c->dirname);
>> +dashenc_delete_file(s, filename);
>> +}
>>  }
>>  
>>  return 0;
> LGTM
Pushed
>
> Regards,
> Karthick
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] configure: Avoid use of nonstandard features of sed

2018-12-02 Thread Carl Eugen Hoyos
2018-11-23 1:48 GMT+01:00, Carl Eugen Hoyos :
> 2018-11-22 23:47 GMT+01:00, Mark Thompson :
>> Standard sed does not support EREs.
>
> Please mention ticket #7310 in the commit message.

Ping.

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


Re: [FFmpeg-devel] avcodec/proresaw_enc : improvment (vendor and color properties, 4444Xq)

2018-12-02 Thread Martin Vignali
Hello,

New patch in attach

001 : add ff_int_is_in_list func to libavcodec/utils.c
002 : add vendor option (unchanged)
003 : only write color properties if supported (use new ff_int_is_in_list
func)
004 : Add 444Xq (unchanged)

Martin


0003-avcodec-prores_aw-only-set-color-prim-trc-space.patch
Description: Binary data


0004-avcodec-prores_aw-add--xq-support.patch
Description: Binary data


0002-avcodec-prores_aw-add-vendor-option.patch
Description: Binary data


0001-avcodec-utils-add-ff_int_is_in_list-func.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] avcodec/proresdec : add 12b decoding support

2018-12-02 Thread Martin Vignali
Pushed, thanks.

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


Re: [FFmpeg-devel] [PATCH V1 1/2] lavc/svt_hevc: add libsvt hevc encoder wrapper.

2018-12-02 Thread Steven Liu


> On Dec 2, 2018, at 13:38, Jun Zhao  wrote:
> 
> base on patch by Huang, Zhengxu from https://github.com/intel/SVT-HEVC
> 
> Signed-off-by: Huang, Zhengxu 
> Signed-off-by: hassene 
> Signed-off-by: Jun Zhao 
> ---
> configure|4 +
> libavcodec/Makefile  |1 +
> libavcodec/allcodecs.c   |1 +
> libavcodec/libsvt_hevc.c |  370 ++
> 4 files changed, 376 insertions(+), 0 deletions(-)
> create mode 100644 libavcodec/libsvt_hevc.c
> 
> diff --git a/configure b/configure
> index 54b7e11..c3dca73 100755
> --- a/configure
> +++ b/configure
> @@ -263,6 +263,7 @@ External library support:
>   --enable-libspeexenable Speex de/encoding via libspeex [no]
>   --enable-libsrt  enable Haivision SRT protocol via libsrt [no]
>   --enable-libssh  enable SFTP protocol via libssh [no]
> +  --enable-libsvt  enable HEVC encoding via svt [no]
>   --enable-libtensorflow   enable TensorFlow as a DNN module backend
>for DNN based filters like sr [no]
>   --enable-libtesseractenable Tesseract, needed for ocr filter [no]
> @@ -1665,6 +1666,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
> libcdio
> libdavs2
> librubberband
> +libsvt
> libvidstab
> libx264
> libx265
> @@ -3087,6 +3089,7 @@ pcm_mulaw_at_encoder_select="audio_frame_queue"
> chromaprint_muxer_deps="chromaprint"
> h264_videotoolbox_encoder_deps="pthreads"
> h264_videotoolbox_encoder_select="videotoolbox_encoder"
> +hevc_svt_encoder_deps="libsvt"
> hevc_videotoolbox_encoder_deps="pthreads"
> hevc_videotoolbox_encoder_select="videotoolbox_encoder"
> libaom_av1_decoder_deps="libaom"
> @@ -6147,6 +6150,7 @@ enabled libsoxr   && require libsoxr soxr.h 
> soxr_create -lsoxr
> enabled libssh&& require_pkg_config libssh libssh libssh/sftp.h 
> sftp_init
> enabled libspeex  && require_pkg_config libspeex speex speex/speex.h 
> speex_decoder_init
> enabled libsrt&& require_pkg_config libsrt "srt >= 1.3.0" 
> srt/srt.h srt_socket
> +enabled libsvt&& require_pkg_config libsvt  svt  EbApi.h 
> EbInitHandle
> enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h 
> TF_Version -ltensorflow
> enabled libtesseract  && require_pkg_config libtesseract tesseract 
> tesseract/capi.h TessBaseAPICreate
> enabled libtheora && require libtheora theora/theoraenc.h 
> th_info_init -ltheoraenc -ltheoradec -logg
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 5feadac..1a8b547 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -374,6 +374,7 @@ OBJS-$(CONFIG_HEVC_QSV_DECODER)+= qsvdec_h2645.o
> OBJS-$(CONFIG_HEVC_QSV_ENCODER)+= qsvenc_hevc.o hevc_ps_enc.o   \
>   hevc_data.o
> OBJS-$(CONFIG_HEVC_RKMPP_DECODER)  += rkmppdec.o
> +OBJS-$(CONFIG_HEVC_SVT_ENCODER)+= libsvt_hevc.o
> OBJS-$(CONFIG_HEVC_VAAPI_ENCODER)  += vaapi_encode_h265.o 
> h265_profile_level.o
> OBJS-$(CONFIG_HEVC_V4L2M2M_DECODER)+= v4l2_m2m_dec.o
> OBJS-$(CONFIG_HEVC_V4L2M2M_ENCODER)+= v4l2_m2m_enc.o
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index d70646e..ff8ea94 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -749,6 +749,7 @@ extern AVCodec ff_hevc_cuvid_decoder;
> extern AVCodec ff_hevc_mediacodec_decoder;
> extern AVCodec ff_hevc_nvenc_encoder;
> extern AVCodec ff_hevc_qsv_encoder;
> +extern AVCodec ff_hevc_svt_encoder;
> extern AVCodec ff_hevc_v4l2m2m_encoder;
> extern AVCodec ff_hevc_vaapi_encoder;
> extern AVCodec ff_hevc_videotoolbox_encoder;
> diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c
> new file mode 100644
> index 000..1e10111
> --- /dev/null
> +++ b/libavcodec/libsvt_hevc.c
> @@ -0,0 +1,370 @@
> +/*
> +* Scalable Video Technology for HEVC encoder library plugin
> +*
> +* Copyright (c) 2018 Intel Corporation
> +*
> +* This program is free software; you can redistribute it and/or
> +* modify it under the terms of the GNU Lesser General Public
> +* License as published by the Free Software Foundation; either
> +* version 2.1 of the License, or (at your option) any later version.
> +*
> +* This program is distributed in the hope that it will be useful,
> +* but WITHOUT ANY WARRANTY; without even the implied warranty of
> +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +* Lesser General Public License for more details.
> +*
> +* You should have received a copy of the GNU Lesser General Public
> +* License along with this program; if not, write to the Free Software
> +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> +*/
> +
> +#include "EbErrorCodes.h"
> +#include "EbTime.h"
> +#include "EbApi.h"
> +
> +#include "libavutil/common.h"
> +#include "libavutil/frame.h"
> +#include "libavutil/opt.h"
> +
> +#include "internal.h"
> +#include "avcodec.h"
> +
> 

Re: [FFmpeg-devel] [PATCH V1 2/2] Changelog: Add new entry for svt-hevc encoder

2018-12-02 Thread Hendrik Leppkes
On Sun, Dec 2, 2018 at 6:44 AM Jun Zhao  wrote:
>
> Signed-off-by: Huang, Zhengxu 
> Signed-off-by: hassene 
> Signed-off-by: Jun Zhao 
> ---
>  Changelog |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/Changelog b/Changelog
> index 1f53ff4..eca6327 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -10,7 +10,7 @@ version :
>  - truehd_core bitstream filter
>  - dhav demuxer
>  - PCM-DVD encoder
> -
> +- add SVT(Scalable Video Technology) HEVC encoder
>

Please don't remove the double newline, just add your new entry.

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