Re: [FFmpeg-devel] [PATCH] avformat/flvenc: fix ticket 5976 and use old commit

2016-11-25 Thread Steven Liu
2016-11-26 9:39 GMT+08:00 Lou Logan :

> On Sat, 26 Nov 2016 09:19:42 +0800, Steven Liu wrote:
>
> > 2016-11-24 11:49 GMT+08:00 Steven Liu :
> >
> > > mythtv have problem with non-seekable dont write duration and filesize
> > > and there have problem with some other server and player with 0 value
> > > duation and filesize.
> > > So add a flv flags to fix the ticket and make a choose for users.
> > >
> > > Signed-off-by: Steven Liu 
> > > ---
> > >  doc/muxers.texi  |4 
> > >  libavformat/flvenc.c |   11 +++
> > >  2 files changed, 11 insertions(+), 4 deletions(-)
> [...]
> > > pushed, Thanks !
>
> You can trim the "pushed" messages. Also, your quoting was messed up
> which made it hard to determine old text from new text.
>

ok, i have look at the old push messages, i see now.

Thanks for your suggestion!

> ___
> 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] avformat/flvenc: fix ticket 5976 and use old commit

2016-11-25 Thread Lou Logan
On Sat, 26 Nov 2016 09:19:42 +0800, Steven Liu wrote:

> 2016-11-24 11:49 GMT+08:00 Steven Liu :
> 
> > mythtv have problem with non-seekable dont write duration and filesize
> > and there have problem with some other server and player with 0 value
> > duation and filesize.
> > So add a flv flags to fix the ticket and make a choose for users.
> >
> > Signed-off-by: Steven Liu 
> > ---
> >  doc/muxers.texi  |4 
> >  libavformat/flvenc.c |   11 +++
> >  2 files changed, 11 insertions(+), 4 deletions(-)
[...]
> > pushed, Thanks !  

You can trim the "pushed" messages. Also, your quoting was messed up
which made it hard to determine old text from new text.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/flvenc: fix ticket 5976 and use old commit

2016-11-25 Thread Steven Liu
2016-11-24 11:49 GMT+08:00 Steven Liu :

> mythtv have problem with non-seekable dont write duration and filesize
> and there have problem with some other server and player with 0 value
> duation and filesize.
> So add a flv flags to fix the ticket and make a choose for users.
>
> Signed-off-by: Steven Liu 
> ---
>  doc/muxers.texi  |4 
>  libavformat/flvenc.c |   11 +++
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 8689341..1c14adf 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -151,6 +151,10 @@ Disable sequence end tag.
>  @item no_metadata
>  Disable metadata tag.
>
> +@item no_duration_filesize
> +Disable duration and filesize in metadata when they are equal to zero
> +at the end of stream. (Be used to non-seekable living stream).
> +
>  @item add_keyframe_index
>  Used to facilitate seeking; particularly for HTTP pseudo streaming.
>  @end table
> diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
> index 177052a..62d406a 100644
> --- a/libavformat/flvenc.c
> +++ b/libavformat/flvenc.c
> @@ -68,6 +68,7 @@ typedef enum {
>  FLV_NO_SEQUENCE_END = (1 << 1),
>  FLV_ADD_KEYFRAME_INDEX = (1 << 2),
>  FLV_NO_METADATA = (1 << 3),
> +FLV_NO_DURATION_FILESIZE = (1 << 4),
>  } FLVFlags;
>
>  typedef struct FLVFileposition {
> @@ -269,6 +270,7 @@ static void write_metadata(AVFormatContext *s,
> unsigned int ts)
>  {
>  AVIOContext *pb = s->pb;
>  FLVContext *flv = s->priv_data;
> +int write_duration_filesize = !(flv->flags &
> FLV_NO_DURATION_FILESIZE);
>  int metadata_count = 0;
>  int64_t metadata_count_pos;
>  AVDictionaryEntry *tag = NULL;
> @@ -292,12 +294,12 @@ static void write_metadata(AVFormatContext *s,
> unsigned int ts)
>  metadata_count = 4 * !!flv->video_par +
>   5 * !!flv->audio_par +
>   1 * !!flv->data_par;
> -if (pb->seekable) {
> +if (write_duration_filesize) {
>  metadata_count += 2; // +2 for duration and file size
>  }
>  avio_wb32(pb, metadata_count);
>
> -if (pb->seekable) {
> +if (write_duration_filesize) {
>  put_amf_string(pb, "duration");
>  flv->duration_offset = avio_tell(pb);
>  // fill in the guessed duration, it'll be corrected later if
> incorrect
> @@ -378,7 +380,7 @@ static void write_metadata(AVFormatContext *s,
> unsigned int ts)
>  metadata_count++;
>  }
>
> -if (pb->seekable) {
> +if (write_duration_filesize) {
>  put_amf_string(pb, "filesize");
>  flv->filesize_offset = avio_tell(pb);
>  put_amf_double(pb, 0); // delayed write
> @@ -844,7 +846,7 @@ end:
>  avio_seek(pb, flv->datasize_offset, SEEK_SET);
>  put_amf_double(pb, flv->datasize);
>  }
> -if (pb->seekable) {
> +if (!(flv->flags & FLV_NO_DURATION_FILESIZE)) {
>  /* update information */
>  if (avio_seek(pb, flv->duration_offset, SEEK_SET) < 0) {
>  av_log(s, AV_LOG_WARNING, "Failed to update header with
> correct duration.\n");
> @@ -1061,6 +1063,7 @@ static const AVOption options[] = {
>  { "aac_seq_header_detect", "Put AAC sequence header based on stream
> data", 0, AV_OPT_TYPE_CONST, {.i64 = FLV_AAC_SEQ_HEADER_DETECT}, INT_MIN,
> INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
>  { "no_sequence_end", "disable sequence end for FLV", 0,
> AV_OPT_TYPE_CONST, {.i64 = FLV_NO_SEQUENCE_END}, INT_MIN, INT_MAX,
> AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
>  { "no_metadata", "disable metadata for FLV", 0, AV_OPT_TYPE_CONST,
> {.i64 = FLV_NO_METADATA}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM,
> "flvflags" },
> +{ "no_duration_filesize", "disable duration and filesize zero value
> metadata for FLV", 0, AV_OPT_TYPE_CONST, {.i64 = FLV_NO_DURATION_FILESIZE},
> INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
>  { "add_keyframe_index", "Add keyframe index metadata", 0,
> AV_OPT_TYPE_CONST, {.i64 = FLV_ADD_KEYFRAME_INDEX}, INT_MIN, INT_MAX,
> AV_OPT_FLAG_ENCODING_PARAM, "flvflags" },
>  { NULL },
>  };
> --
> 1.7.1
>
> pushed, Thanks !

>
>
> ___
> 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] avformat/flvdec: move set bit_rate from parse AMF OBJECT to create_stream

2016-11-25 Thread Steven Liu
2016-11-26 2:49 GMT+08:00 Michael Niedermayer :

> On Fri, Nov 25, 2016 at 05:18:43PM +0800, Steven Liu wrote:
> > before patch:
> > Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1
> DAR 640:357], 25 fps, 25 tbr, 1k tbn, 50 tbc
> >
> > after patch:
> > Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1
> DAR 640:357], 2576 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
> >
> > Signed-off-by: Steven Liu 
> > ---
> >  libavformat/flvdec.c | 19 ---
> >  1 file changed, 12 insertions(+), 7 deletions(-)
>
> probably ok
>
> pushed, Thanks!

> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The real ebay dictionary, page 1
> "Used only once"- "Some unspecified defect prevented a second use"
> "In good condition" - "Can be repaird by experienced expert"
> "As is" - "You wouldnt want it even if you were payed for it, if you knew
> ..."
>
> ___
> 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] lavf: always forward codec_whitelist in avformat_find_stream_info

2016-11-25 Thread Michael Niedermayer
On Fri, Nov 25, 2016 at 09:57:57PM +0100, Andreas Cadhalpun wrote:
> Signed-off-by: Andreas Cadhalpun 
> ---
>  libavformat/utils.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)

LGTM

thx

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

The real ebay dictionary, page 1
"Used only once"- "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."


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


Re: [FFmpeg-devel] [PATCH] pngdec: check if previous frame exists instead of trusting sequence_number

2016-11-25 Thread Michael Niedermayer
On Fri, Nov 25, 2016 at 10:13:06PM +0100, Andreas Cadhalpun wrote:
> This fixes a segmentation fault caused by calling memcpy with NULL as
> second argument in handle_p_frame_apng.
> 
> Signed-off-by: Andreas Cadhalpun 
> ---
>  libavcodec/pngdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
> index 36275ae..a7b330b 100644
> --- a/libavcodec/pngdec.c
> +++ b/libavcodec/pngdec.c
> @@ -922,7 +922,7 @@ static int decode_fctl_chunk(AVCodecContext *avctx, 
> PNGDecContext *s,
>  return AVERROR_INVALIDDATA;
>  }
>  
> -if (sequence_number == 0 && dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
> +if (!s->previous_picture.f->data[0] && dispose_op == 
> APNG_DISPOSE_OP_PREVIOUS) {
>  // No previous frame to revert to for the first frame
>  // Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
>  dispose_op = APNG_DISPOSE_OP_BACKGROUND;

wont this be different when seeking back to the
first frame ?
is that intended ?

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates


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


Re: [FFmpeg-devel] [PATCH 1/2] swresample/soxr: fix invalid use of linear_interp

2016-11-25 Thread Muhammad Faiz
On 11/25/16, Michael Niedermayer  wrote:
> On Fri, Nov 25, 2016 at 04:55:34PM +0700, Muhammad Faiz wrote:
>> give very bad quality for soxr resampler.
>> linear_interp is intended for  using linear interpolation
>> between filter bank so quality will be better.
>>
>> i guess this is misunderstood as 'do not use filter bank,
>> but directly interpolate linearly between samples'.
>>
>> Signed-off-by: Muhammad Faiz 
>> ---
>>  libswresample/soxr_resample.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> probably ok

applied

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


Re: [FFmpeg-devel] [PATCH] avcodec/aac_adtstoasc: validate and forward extradata if the stream is already ASC

2016-11-25 Thread James Almer
On 11/24/2016 9:18 PM, James Almer wrote:
> Fixes ticket #5973
> 
> Signed-off-by: James Almer 
> ---
>  libavcodec/aac_adtstoasc_bsf.c | 12 ++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
> index 48889fc..1067160 100644
> --- a/libavcodec/aac_adtstoasc_bsf.c
> +++ b/libavcodec/aac_adtstoasc_bsf.c
> @@ -136,8 +136,16 @@ fail:
>  
>  static int aac_adtstoasc_init(AVBSFContext *ctx)
>  {
> -av_freep(>par_out->extradata);
> -ctx->par_out->extradata_size = 0;
> +/* Validate the extradata if the stream is already MPEG-4 
> AudioSpecificConfig */
> +if (ctx->par_in->extradata) {
> +MPEG4AudioConfig mp4ac;
> +int ret = avpriv_mpeg4audio_get_config(, 
> ctx->par_in->extradata,
> +   ctx->par_in->extradata_size * 
> 8, 1);
> +if (ret < 0) {
> +av_log(ctx, AV_LOG_ERROR, "Error parsing AudioSpecificConfig 
> extradata!\n");
> +return ret;
> +}
> +}
>  
>  return 0;
>  }

Approved by Hendrik on IRC, pushed and backported to release/3.2

Thanks.

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


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-11-25 Thread Andreas Cadhalpun
On 25.11.2016 22:22, wm4 wrote:
> On Fri, 25 Nov 2016 21:13:54 +0100
> Andreas Cadhalpun  wrote:
> 
>> On 25.11.2016 10:36, wm4 wrote:
>>> I'd like to add that removing the ffserver support from the libs, and
>>> all deprecated stuff it depends on, will make it actually easier to
>>> readd ffserver in a cleaner way. It reduces the risk that the new
>>> ffserver accidentally depends on mechanisms that were supposed to go
>>> away.  
>>
>> However, that can't be done before the next major bump.
> 
> I contest this too. The ffm muxer/demuxer does not affect ABI and has
> no use outside of ffserver.

Removing it would break ffserver completely, so it shouldn't be done
without a major bump, in particular if ffserver gets removed.
Also you don't know if it has uses outside of ffserver.

>>> Also, the promise was that developers would pick up ffserver again and
>>> update it. This hasn't really happened - instead it weirdly looks like
>>> the ffserver faction is stalling for time. Maybe the interest to keep
>>> it alive isn't that high after all.  
>>
>> To me it looks more like they simply lack the time to work on it.
> 
> Plenty of time was granted. Several years more than Libav did.

As far as I recall ffserver wasn't proposed for removal at the last
major bump.

Best regards,
Andreas

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


Re: [FFmpeg-devel] [PATCH 1/2] vc1dec: support multiple slices in frame coded images with hwaccel

2016-11-25 Thread Hendrik Leppkes
On Sun, Nov 20, 2016 at 7:14 PM, Carl Eugen Hoyos  wrote:
> 2016-11-20 17:50 GMT+01:00 Mark Thompson :
>> On 20/11/16 16:16, Carl Eugen Hoyos wrote:
>
>>> There is no API to read the version of the mesa driver?
>>
>> The one useful call is vaQueryVendorString(), which indeed returns useful 
>> results for i965.  Unfortunately, all mesa returns here is a fixed string:
>>
>> https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/va/context.c#n176
>
> Thank you both for explaining!
>
> Please consider to make sure mesa knows about the issue...
>

Unless there are more comments I'll apply this tomorrow with changelog
and micro version bump.

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


Re: [FFmpeg-devel] [PATCH] matroska read_seek: make max diff for last known subtitle configurable

2016-11-25 Thread wm4
On Fri, 25 Nov 2016 07:48:40 +0100
Rainer Hochecker  wrote:

> I was tempted to submit a patch with this feature deleted. Unfortunately I
> was not able to find the original reason
> why this was implemented. I am sure there was a good reason and this reason
> may still be a good one.

It's commit c16582579b1c6f66a86615c5808cd5b2bf17be73:

matroskadec: demux relevant subtitle packets after a seek
only works for subtitle tracks which were properly indexed up to the seek 
point

Originally committed as revision 15284 to svn://svn.ffmpeg.org/ffmpeg/trunk
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-11-25 Thread wm4
On Fri, 25 Nov 2016 21:13:54 +0100
Andreas Cadhalpun  wrote:

> On 25.11.2016 10:36, wm4 wrote:
> > I'd like to add that removing the ffserver support from the libs, and
> > all deprecated stuff it depends on, will make it actually easier to
> > readd ffserver in a cleaner way. It reduces the risk that the new
> > ffserver accidentally depends on mechanisms that were supposed to go
> > away.  
> 
> However, that can't be done before the next major bump.

I contest this too. The ffm muxer/demuxer does not affect ABI and has
no use outside of ffserver.

> > Also, the promise was that developers would pick up ffserver again and
> > update it. This hasn't really happened - instead it weirdly looks like
> > the ffserver faction is stalling for time. Maybe the interest to keep
> > it alive isn't that high after all.  
> 
> To me it looks more like they simply lack the time to work on it.

Plenty of time was granted. Several years more than Libav did.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] pngdec: check if previous frame exists instead of trusting sequence_number

2016-11-25 Thread Andreas Cadhalpun
This fixes a segmentation fault caused by calling memcpy with NULL as
second argument in handle_p_frame_apng.

Signed-off-by: Andreas Cadhalpun 
---
 libavcodec/pngdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 36275ae..a7b330b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -922,7 +922,7 @@ static int decode_fctl_chunk(AVCodecContext *avctx, 
PNGDecContext *s,
 return AVERROR_INVALIDDATA;
 }
 
-if (sequence_number == 0 && dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
+if (!s->previous_picture.f->data[0] && dispose_op == 
APNG_DISPOSE_OP_PREVIOUS) {
 // No previous frame to revert to for the first frame
 // Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
 dispose_op = APNG_DISPOSE_OP_BACKGROUND;
-- 
2.10.2
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavf: always forward codec_whitelist in avformat_find_stream_info

2016-11-25 Thread Andreas Cadhalpun
Signed-off-by: Andreas Cadhalpun 
---
 libavformat/utils.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2634317..b1d0a0a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3695,9 +3695,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
 if (!has_codec_parameters(st, NULL)) {
 const AVCodec *codec = find_probe_decoder(ic, st, 
st->codecpar->codec_id);
 if (codec && !avctx->codec) {
-if (avcodec_open2(avctx, codec, (options && stream_index < 
orig_nb_streams) ? [stream_index] : NULL) < 0)
+AVDictionary *opts = NULL;
+if (ic->codec_whitelist)
+av_dict_set(, "codec_whitelist", 
ic->codec_whitelist, 0);
+if (avcodec_open2(avctx, codec, (options && stream_index < 
orig_nb_streams) ? [stream_index] : ) < 0)
 av_log(ic, AV_LOG_WARNING,
 "Failed to open codec in av_find_stream_info\n");
+av_dict_free();
 }
 }
 
-- 
2.10.2
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent access of elements after freeing by set nb_elem to zero.

2016-11-25 Thread Andreas Cadhalpun
On 25.11.2016 11:04, Schenk, Michael wrote:
> From 9d2d5127a3113b6581b0a562776c3ec92c547bdb Mon Sep 17 00:00:00 2001
> From: Michael Schenk 
> Date: Fri, 25 Nov 2016 09:36:20 +0100
> Subject: [PATCH] set nb_elem to 0 after freeing to avoid further access which
>  may causing SEGV due to access to the element somewhere after

Please split this into a short subject starting with 'matroskadec:' followed
by a more detailed explanation in the body.

> ---
>  libavformat/matroskadec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index f79511e..d96e861 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -1237,6 +1237,7 @@ static void ebml_free(EbmlSyntax *syntax, void *data)
>   j++, ptr += syntax[i].list_elem_size)
>  ebml_free(syntax[i].def.n, ptr);
>  av_freep(>elem);
> +list->nb_elem = 0;
>  } else
>  ebml_free(syntax[i].def.n, data_off);
>  default:
> -- 2.7.4

The change itself looks good.

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


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-11-25 Thread Andreas Cadhalpun
On 25.11.2016 10:36, wm4 wrote:
> I'd like to add that removing the ffserver support from the libs, and
> all deprecated stuff it depends on, will make it actually easier to
> readd ffserver in a cleaner way. It reduces the risk that the new
> ffserver accidentally depends on mechanisms that were supposed to go
> away.

However, that can't be done before the next major bump.

> Also, the promise was that developers would pick up ffserver again and
> update it. This hasn't really happened - instead it weirdly looks like
> the ffserver faction is stalling for time. Maybe the interest to keep
> it alive isn't that high after all.

To me it looks more like they simply lack the time to work on it.

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


Re: [FFmpeg-devel] [PATCH] mpegpicture: use coded_width/coded_height to allocate frame

2016-11-25 Thread Andreas Cadhalpun
On 25.11.2016 02:59, Michael Niedermayer wrote:
> On Fri, Nov 25, 2016 at 02:26:24AM +0100, Andreas Cadhalpun wrote:
>>  mss2.c |8 +++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>> 958ee0811485404a0662a1540fcb8b131423947b  
>> 0001-mss2-only-use-error-correction-for-matching-block-co.patch
>> From 6d8b5136c67f3a8cb3f4a4c818f311d748bbab5d Mon Sep 17 00:00:00 2001
>> From: Andreas Cadhalpun 
>> Date: Thu, 24 Nov 2016 23:57:46 +0100
>> Subject: [PATCH] mss2: only use error correction for matching block counts
>>
>> This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2
>> with coded_width/coded_height larger than width/height.
>>
>> Signed-off-by: Andreas Cadhalpun 
>> ---
>>  libavcodec/mss2.c | 8 +++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> LGTM

Pushed.

Best regards,
Andreas

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


[FFmpeg-devel] [PATCH] avcodec/nvenc: Delay identification of underlying format of cuda frames

2016-11-25 Thread Philip Langdale
When input surfaces are cuda frames, we will not know what the actual
underlying format (nv12, p010, etc) is at surface allocation time.

On the other hand, we will know when the input frames are actually
registered and associated with a surface.

So, let's delay format discovery until registration time, which is
actually how we handle other frame properties, such as dimensions.

By itself, this change doesn't allow for transcoding of 10bit
content from cuvid, but it reduces the problem to the hardcoding of
the sw format in ffmpeg_cuvid.c

Signed-off-by: Philip Langdale 
---
 libavcodec/nvenc.c | 71 --
 1 file changed, 37 insertions(+), 34 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d24d278..2353161 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -28,6 +28,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/avassert.h"
 #include "libavutil/mem.h"
+#include "libavutil/pixdesc.h"
 #include "internal.h"
 
 #define NVENC_CAP 0x30
@@ -1009,49 +1010,37 @@ static av_cold int nvenc_setup_encoder(AVCodecContext 
*avctx)
 return 0;
 }
 
-static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
+static NV_ENC_BUFFER_FORMAT nvenc_map_buffer_format(enum AVPixelFormat pix_fmt)
 {
-NvencContext *ctx = avctx->priv_data;
-NvencDynLoadFunctions *dl_fn = >nvenc_dload_funcs;
-NV_ENCODE_API_FUNCTION_LIST *p_nvenc = _fn->nvenc_funcs;
-
-NVENCSTATUS nv_status;
-NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = { 0 };
-allocOut.version = NV_ENC_CREATE_BITSTREAM_BUFFER_VER;
-
-switch (ctx->data_pix_fmt) {
+switch (pix_fmt) {
 case AV_PIX_FMT_YUV420P:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_YV12_PL;
-break;
-
+return NV_ENC_BUFFER_FORMAT_YV12_PL;
 case AV_PIX_FMT_NV12:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_NV12_PL;
-break;
-
+return NV_ENC_BUFFER_FORMAT_NV12_PL;
 case AV_PIX_FMT_P010:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_YUV420_10BIT;
-break;
-
+return NV_ENC_BUFFER_FORMAT_YUV420_10BIT;
 case AV_PIX_FMT_YUV444P:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_YUV444_PL;
-break;
-
+return NV_ENC_BUFFER_FORMAT_YUV444_PL;
 case AV_PIX_FMT_YUV444P16:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_YUV444_10BIT;
-break;
-
+return NV_ENC_BUFFER_FORMAT_YUV444_10BIT;
 case AV_PIX_FMT_0RGB32:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_ARGB;
-break;
-
+return NV_ENC_BUFFER_FORMAT_ARGB;
 case AV_PIX_FMT_0BGR32:
-ctx->surfaces[idx].format = NV_ENC_BUFFER_FORMAT_ABGR;
-break;
-
+return NV_ENC_BUFFER_FORMAT_ABGR;
 default:
-av_log(avctx, AV_LOG_FATAL, "Invalid input pixel format\n");
-return AVERROR(EINVAL);
+return NV_ENC_BUFFER_FORMAT_UNDEFINED;
 }
+}
+
+static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
+{
+NvencContext *ctx = avctx->priv_data;
+NvencDynLoadFunctions *dl_fn = >nvenc_dload_funcs;
+NV_ENCODE_API_FUNCTION_LIST *p_nvenc = _fn->nvenc_funcs;
+
+NVENCSTATUS nv_status;
+NV_ENC_CREATE_BITSTREAM_BUFFER allocOut = { 0 };
+allocOut.version = NV_ENC_CREATE_BITSTREAM_BUFFER_VER;
 
 if (avctx->pix_fmt == AV_PIX_FMT_CUDA) {
 ctx->surfaces[idx].in_ref = av_frame_alloc();
@@ -1059,6 +1048,14 @@ static av_cold int nvenc_alloc_surface(AVCodecContext 
*avctx, int idx)
 return AVERROR(ENOMEM);
 } else {
 NV_ENC_CREATE_INPUT_BUFFER allocSurf = { 0 };
+
+ctx->surfaces[idx].format = nvenc_map_buffer_format(ctx->data_pix_fmt);
+if (ctx->surfaces[idx].format == NV_ENC_BUFFER_FORMAT_UNDEFINED) {
+av_log(avctx, AV_LOG_FATAL, "Invalid input pixel format: %s\n",
+   av_get_pix_fmt_name(ctx->data_pix_fmt));
+return AVERROR(EINVAL);
+}
+
 allocSurf.version = NV_ENC_CREATE_INPUT_BUFFER_VER;
 allocSurf.width = (avctx->width + 31) & ~31;
 allocSurf.height = (avctx->height + 31) & ~31;
@@ -1351,10 +1348,16 @@ static int nvenc_register_frame(AVCodecContext *avctx, 
const AVFrame *frame)
 reg.resourceType   = NV_ENC_INPUT_RESOURCE_TYPE_CUDADEVICEPTR;
 reg.width  = frames_ctx->width;
 reg.height = frames_ctx->height;
-reg.bufferFormat   = ctx->surfaces[0].format;
 reg.pitch  = frame->linesize[0];
 reg.resourceToRegister = frame->data[0];
 
+reg.bufferFormat   = nvenc_map_buffer_format(frames_ctx->sw_format);
+if (reg.bufferFormat == NV_ENC_BUFFER_FORMAT_UNDEFINED) {
+av_log(avctx, AV_LOG_FATAL, "Invalid input pixel format: %s\n",
+   av_get_pix_fmt_name(frames_ctx->sw_format));
+return AVERROR(EINVAL);
+}
+
 ret = 

Re: [FFmpeg-devel] [PATCH 1/2] img2: added support for %t output pattern

2016-11-25 Thread Roger Pack
On 11/18/16, Roger Pack  wrote:
> On 11/15/16, James Almer  wrote:
>> On 11/10/2016 4:26 PM, Roger Pack wrote:
>>> On 11/1/16, James Almer  wrote:
 > On 11/1/2016 6:43 PM, James Almer wrote:
> >> On 10/25/2016 9:38 PM, Roger Pack wrote:
>> >>> From e8cac5c7de18766ce0f8f286f7dc140b82129df2 Mon Sep 17 00:00:00
>> >>> 2001
>> >>> From: rogerdpack 
>> >>> Date: Tue, 25 Oct 2016 18:33:12 -0600
>> >>> Subject: [PATCH 1/2] img2 encoder: allow %t in filename, based on
>> >>> patch
>> >>> from
>> >>>  Yuval Adam
>> >>>
>> >>> Signed-off-by: rogerdpack 
>> >>> ---
>> >>>  doc/muxers.texi| 13 +
>> >>>  libavformat/avformat.h |  3 ++-
>> >>>  libavformat/hlsenc.c   |  6 +++---
>> >>>  libavformat/img2enc.c  |  6 --
>> >>>  libavformat/utils.c| 42
>> >>> ++
>> >>>  5 files changed, 60 insertions(+), 10 deletions(-)
>> >>>
>> >>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>> >>> index 0d856db..0c3a198 100644
>> >>> --- a/doc/muxers.texi
>> >>> +++ b/doc/muxers.texi
>> >>> @@ -619,6 +619,12 @@ If the pattern contains "%d" or
>> >>> "%0@var{N}d",
>> >>> the
>> >>> first filename of
>> >>>  the file list specified will contain the number 1, all the
>> >>> following
>> >>>  numbers will be sequential.
>> >>>
>> >>> +If the pattern contains "%t", the frame's timestamps will be
>> >>> inserted
>> >>> +in the filename like "00.00.00.000" for hours, minutes, seconds,
>> >>> +and milliseconds.
>> >>> +
>> >>> +The "%t" and "%d" patterns may be used simultaneously.
>> >>> +
>> >>>  The pattern may contain a suffix which is used to automatically
>> >>>  determine the format of the image files to write.
>> >>>
>> >>> @@ -664,6 +670,13 @@ can be used:
>> >>>  ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1
>> >>> "%Y-%m-%d_%H-%M-%S.jpg"
>> >>>  @end example
>> >>>
>> >>> +The following example uses the timestamp parameter to generate
>> >>> one
>> >>> +image file per video frame from the input, and name it including
>> >>> its
>> >>> original
>> >>> +timestamp.
>> >>> +@example
>> >>> +ffmpeg -i in.avi -vsync vfr -copyts img-%t.jpg
>> >>> +@end example
>> >>> +
>> >>>  @subsection Options
>> >>>
>> >>>  @table @option
>> >>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
>> >>> index f9f4d72..7f39698 100644
>> >>> --- a/libavformat/avformat.h
>> >>> +++ b/libavformat/avformat.h
>> >>> @@ -2780,10 +2780,11 @@ void av_dump_format(AVFormatContext *ic,
>> >>>   * @param path numbered sequence string
>> >>>   * @param number frame number
>> >>>   * @param flags AV_FRAME_FILENAME_FLAGS_*
>> >>> + * @param ts frame timestamp in AV_TIME_BASE fractional seconds.
>> >>>   * @return 0 if OK, -1 on format error
>> >>>   */
>> >>>  int av_get_frame_filename2(char *buf, int buf_size,
>> >>> -  const char *path, int number, int
>> >>> flags);
>> >>> +  const char *path, int number, int
>> >>> flags,
>> >>> int64_t ts);
> >>
> >> Uhh, what? did you just break API modifying a public function?
> >>
 >
 > For the record, this was reverted.
 >
 > Shouldn't be hard to solve, i think. Just add a new
 > ff_get_frame_filename()
 > function to internal.h with this new signature, at least for now and
 > for
 > this
 > feature, to avoid adding a third public function doing the same thing
 > unless
 > absolutely necessary.
>>> OK see attached.  Wasn't sure if I should duplicate docs or not, feel
>>> free to modify.
>>> Cheers!
>>> -roger-
>>>
>>>
>>> 0001-img2-encoder-allow-t-in-filepattern-based-on-patch-f.patch
>>>
>>>
>>> From 8287f1ca543f764e9e88659ee5a07873860d607d Mon Sep 17 00:00:00 2001
>>> From: rogerdpack 
>>> Date: Thu, 10 Nov 2016 12:24:49 -0700
>>> Subject: [PATCH] img2 encoder: allow %t in filepattern, based on patch
>>> from
>>>  Yuval Adam
>>>
>>> Signed-off-by: rogerdpack 
>>> ---
>>>  doc/muxers.texi| 13 +
>>>  libavformat/img2enc.c  |  8 +---
>>>  libavformat/internal.h | 18 ++
>>>  libavformat/utils.c| 45
>>> ++---
>>>  4 files changed, 78 insertions(+), 6 deletions(-)
>>
>> No hlsenc.c?
>
> Yeah, good idea, moved them all to use the ff_get_frame_filename3 now
> just so people would realize the extra parameter is available.
>
>>>
>>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>>> index 806182a..670fcca 100644
>>> --- a/doc/muxers.texi
>>> +++ b/doc/muxers.texi
>>> @@ -622,6 +622,12 @@ If the 

Re: [FFmpeg-devel] [PATCH] avformat/flvdec: move set bit_rate from parse AMF OBJECT to create_stream

2016-11-25 Thread Michael Niedermayer
On Fri, Nov 25, 2016 at 05:18:43PM +0800, Steven Liu wrote:
> before patch:
> Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 
> 640:357], 25 fps, 25 tbr, 1k tbn, 50 tbc
> 
> after patch:
> Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 
> 640:357], 2576 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
> 
> Signed-off-by: Steven Liu 
> ---
>  libavformat/flvdec.c | 19 ---
>  1 file changed, 12 insertions(+), 7 deletions(-)

probably ok

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

The real ebay dictionary, page 1
"Used only once"- "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."


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


Re: [FFmpeg-devel] [PATCH] matroska read_seek: make max diff for last known subtitle configurable

2016-11-25 Thread Rainer Hochecker
I was tempted to submit a patch with this feature deleted. Unfortunately I
was not able to find the original reason
why this was implemented. I am sure there was a good reason and this reason
may still be a good one.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] [RFC]MAINTAINERS: Add developers who have git write access but are otherwise not listed

2016-11-25 Thread Marton Balint


On Fri, 25 Nov 2016, James Almer wrote:


On 11/25/2016 9:15 AM, Michael Niedermayer wrote:

On Fri, Nov 25, 2016 at 11:11:23AM +0100, Marton Balint wrote:


On Mon, 21 Nov 2016, Michael Niedermayer wrote:


I omitted developers who do not use their account and i felt would prefer not
to be listed.


I think everyone with access should be listed. If somebody does not
use his account for a year or so, his/her access should be revoked.


i think 1 year is too short


Same. We have developers that participate in discussions, reviews and even
IRC chats that while committing stuff, they do it rarely.

The basis for removing access should not be how long it's been since the
last time they pushed something but how long it's been since they gave sings
of being alive and around.


If you are worried about this, a revoking patch can be sent to the mailing 
list, so active people who care can respond and keep their rights.


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


Re: [FFmpeg-devel] [PATCH] [RFC]MAINTAINERS: Add developers who have git write access but are otherwise not listed

2016-11-25 Thread wm4
On Fri, 25 Nov 2016 10:31:58 -0300
James Almer  wrote:

> On 11/25/2016 9:15 AM, Michael Niedermayer wrote:
> > On Fri, Nov 25, 2016 at 11:11:23AM +0100, Marton Balint wrote:  
> >>
> >> On Mon, 21 Nov 2016, Michael Niedermayer wrote:
> >>  
> >>> I omitted developers who do not use their account and i felt would prefer 
> >>> not
> >>> to be listed.  
> >>
> >> I think everyone with access should be listed. If somebody does not
> >> use his account for a year or so, his/her access should be revoked.  
> > 
> > i think 1 year is too short  
> 
> Same. We have developers that participate in discussions, reviews and even
> IRC chats that while committing stuff, they do it rarely.
> 
> The basis for removing access should not be how long it's been since the
> last time they pushed something but how long it's been since they gave sings
> of being alive and around.

If they use it that rarely, someone else can push for them.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] [RFC]MAINTAINERS: Add developers who have git write access but are otherwise not listed

2016-11-25 Thread James Almer
On 11/25/2016 9:15 AM, Michael Niedermayer wrote:
> On Fri, Nov 25, 2016 at 11:11:23AM +0100, Marton Balint wrote:
>>
>> On Mon, 21 Nov 2016, Michael Niedermayer wrote:
>>
>>> I omitted developers who do not use their account and i felt would prefer 
>>> not
>>> to be listed.
>>
>> I think everyone with access should be listed. If somebody does not
>> use his account for a year or so, his/her access should be revoked.
> 
> i think 1 year is too short

Same. We have developers that participate in discussions, reviews and even
IRC chats that while committing stuff, they do it rarely.

The basis for removing access should not be how long it's been since the
last time they pushed something but how long it's been since they gave sings
of being alive and around.

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


Re: [FFmpeg-devel] [PATCH 1/2] swresample/soxr: fix invalid use of linear_interp

2016-11-25 Thread Michael Niedermayer
On Fri, Nov 25, 2016 at 04:55:34PM +0700, Muhammad Faiz wrote:
> give very bad quality for soxr resampler.
> linear_interp is intended for  using linear interpolation
> between filter bank so quality will be better.
> 
> i guess this is misunderstood as 'do not use filter bank,
> but directly interpolate linearly between samples'.
> 
> Signed-off-by: Muhammad Faiz 
> ---
>  libswresample/soxr_resample.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

probably ok

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

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle


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


Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Remove aspect-ratio decompensation logic

2016-11-25 Thread Timo Rothenpieler
This LGTM, the compensation is indeed gone on all current Nvidia Drivers
I tested.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] [RFC]MAINTAINERS: Add developers who have git write access but are otherwise not listed

2016-11-25 Thread Michael Niedermayer
On Fri, Nov 25, 2016 at 11:11:23AM +0100, Marton Balint wrote:
> 
> On Mon, 21 Nov 2016, Michael Niedermayer wrote:
> 
> >I omitted developers who do not use their account and i felt would prefer not
> >to be listed.
> 
> I think everyone with access should be listed. If somebody does not
> use his account for a year or so, his/her access should be revoked.

i think 1 year is too short

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

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad


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


Re: [FFmpeg-devel] libavcodec : add psd image file decoder

2016-11-25 Thread Martin Vignali
Hello

>
> If you want to maintain this code, then please add yourself to the
> MAINTAINER file too
>

I'm not very familiar with git. So it's probably not a good idea to be a
maintainer.
But i can take a look for patch on psd (and exr) if need.

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


Re: [FFmpeg-devel] [PATCH v2] avformat/rtsp: introduce get_sa_len() function

2016-11-25 Thread Nicolas George
> >Since the Linux implementation of sockaddr doesn't have sa_len as a member,
> >but the FreeBSD version does, introduce a get_sa_len() function that
> >determines the size based on the address family.
> >
> >Signed-off-by: Kevin Lo 

For some reason I do not have the original mail in my archives. I reply
to this one instead.

> >---
> >
> >diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> >index c6292c5..4c543ed 100644
> >--- a/libavformat/rtsp.c
> >+++ b/libavformat/rtsp.c
> >@@ -202,6 +202,19 @@ static int get_sockaddr(AVFormatContext *s,
> >  return 0;
> >  }
> >
> >+static socklen_t
> >+get_sa_len(struct sockaddr *addr)
> >+{
> >+switch (addr->sa_family) {
> >+case AF_INET:
> >+return (sizeof(struct sockaddr_in));
> >+case AF_INET6:
> >+return (sizeof(struct sockaddr_in6));
> >+default:
> >+return (sizeof(struct sockaddr));
> >+}

I think this is misdesigned. It will not work if new address families
are added, while the whole point of the modern socket API is to
transparently handle that.

The system always gives us the correct size of the sockaddr structure
(ai_addrlen in struct addrinfo, the third argument of getpeername(),
etc.), we only have to keep it instead of discarding it.

Regards,

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


Re: [FFmpeg-devel] [PATCH] lavf: add ffprobe demuxer

2016-11-25 Thread Nicolas George
Le quintidi 5 frimaire, an CCXXV, Andreas Cadhalpun a écrit :
> I think a better idea would be to require '-strict experimental',
> as code disabled by default does neither get build- nor FATE-tested
> much.

That is an excellent idea!

Regards,

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


[FFmpeg-devel] [PATCH 2/2] swresample: enable exact_rational and linear_interp by default

2016-11-25 Thread Muhammad Faiz
have problem with git send-email, so I attach the patch
From 4b77fcc028b080ccf7887f6b3fb5830960acf8c1 Mon Sep 17 00:00:00 2001
From: Muhammad Faiz 
Date: Fri, 25 Nov 2016 16:48:22 +0700
Subject: [PATCH 2/2] swresample: enable exact_rational and linear_interp by
 default

exact_rational gives better quality without sacrifice speed.
linear_interp gives better quality with slower speed.

when both are enabled, resampler will automatically disable
linear_interp when it is not required (from commit 06f94149c6)

there are two conditions that makes resampler cannot disable linear_interp:
first, when exact_rational requires phase_count larger than 1 << phase_shit.
in this case, exact_rational is silently ignored.
second, when soft compensation happens. in this case, resampler modify
c->dst_incr that may be indivisible by c->src_incr.
at that both cases, the quality is preserved but speed is slower.

modify resampler fate command line option, also add more sample rates
for the default.
also modify fate refs that depend on swresample.

Signed-off-by: Muhammad Faiz 
---
 doc/resampler.texi   |   4 +-
 libswresample/options.c  |   4 +-
 libswresample/version.h  |   2 +-
 tests/fate/libswresample.mak | 191 ---
 tests/ref/acodec/s302m   |   6 +-
 tests/ref/lavf/dv_fmt|   8 +-
 tests/ref/lavf/gxf   |   8 +-
 tests/ref/lavf/mxf   |  12 +--
 8 files changed, 203 insertions(+), 32 deletions(-)

diff --git a/doc/resampler.texi b/doc/resampler.texi
index d72677c..23530f8 100644
--- a/doc/resampler.texi
+++ b/doc/resampler.texi
@@ -132,12 +132,12 @@ For swr only, set resampling phase shift, default value is 10, and must be in
 the interval [0,30].
 
 @item linear_interp
-Use linear interpolation if set to 1, default value is 0.
+Use linear interpolation if set to 1 (the default).
 
 @item exact_rational
 For swr only, when enabled, try to use exact phase_count based on input and
 output sample rate. However, if it is larger than @code{1 << phase_shift},
-the phase_count will be @code{1 << phase_shift} as fallback. Default is disabled.
+the phase_count will be @code{1 << phase_shift} as fallback. Default is enabled.
 
 @item cutoff
 Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
diff --git a/libswresample/options.c b/libswresample/options.c
index 4abf5e0..00d4f7c 100644
--- a/libswresample/options.c
+++ b/libswresample/options.c
@@ -84,8 +84,8 @@ static const AVOption options[]={
 
 {"filter_size"  , "set swr resampling filter size", OFFSET(filter_size)  , AV_OPT_TYPE_INT  , {.i64=32}, 0  , INT_MAX   , PARAM },
 {"phase_shift"  , "set swr resampling phase shift", OFFSET(phase_shift)  , AV_OPT_TYPE_INT  , {.i64=10}, 0  , 24, PARAM },
-{"linear_interp", "enable linear interpolation" , OFFSET(linear_interp)  , AV_OPT_TYPE_BOOL , {.i64=0 }, 0  , 1 , PARAM },
-{"exact_rational"   , "enable exact rational"   , OFFSET(exact_rational) , AV_OPT_TYPE_BOOL , {.i64=0 }, 0  , 1 , PARAM },
+{"linear_interp", "enable linear interpolation" , OFFSET(linear_interp)  , AV_OPT_TYPE_BOOL , {.i64=1 }, 0  , 1 , PARAM },
+{"exact_rational"   , "enable exact rational"   , OFFSET(exact_rational) , AV_OPT_TYPE_BOOL , {.i64=1 }, 0  , 1 , PARAM },
 {"cutoff"   , "set cutoff frequency ratio"  , OFFSET(cutoff) , AV_OPT_TYPE_DOUBLE,{.dbl=0.}, 0  , 1 , PARAM },
 
 /* duplicate option in order to work with avconv */
diff --git a/libswresample/version.h b/libswresample/version.h
index 37d44dd..3a5c771 100644
--- a/libswresample/version.h
+++ b/libswresample/version.h
@@ -30,7 +30,7 @@
 
 #define LIBSWRESAMPLE_VERSION_MAJOR   2
 #define LIBSWRESAMPLE_VERSION_MINOR   4
-#define LIBSWRESAMPLE_VERSION_MICRO 100
+#define LIBSWRESAMPLE_VERSION_MICRO 101
 
 #define LIBSWRESAMPLE_VERSION_INT  AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
   LIBSWRESAMPLE_VERSION_MINOR, \
diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak
index cc50693..b875767 100644
--- a/tests/fate/libswresample.mak
+++ b/tests/fate/libswresample.mak
@@ -11,10 +11,12 @@ SAMPLERATES_LITE = 8000 44100 48000
 
 SAMPLERATES_NN = 8000 44100
 
+#note that without EXACT suffix means exact_rational=off, without LIN suffix means linear_interp=off
+#now this ARESAMPLE is not default behavior, the default is exact_rational=on:linear_interp=on
 define ARESAMPLE
 FATE_SWR_RESAMPLE += fate-swr-resample-$(3)-$(1)-$(2)
 fate-swr-resample-$(3)-$(1)-$(2): tests/data/asynth-$(1)-1.wav
-fate-swr-resample-$(3)-$(1)-$(2): CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-$(1)-1.wav -af 

[FFmpeg-devel] [PATCH 1/2] swresample/soxr: fix invalid use of linear_interp

2016-11-25 Thread Muhammad Faiz
give very bad quality for soxr resampler.
linear_interp is intended for  using linear interpolation
between filter bank so quality will be better.

i guess this is misunderstood as 'do not use filter bank,
but directly interpolate linearly between samples'.

Signed-off-by: Muhammad Faiz 
---
 libswresample/soxr_resample.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c
index b9c6735..8181c74 100644
--- a/libswresample/soxr_resample.c
+++ b/libswresample/soxr_resample.c
@@ -46,7 +46,7 @@ static struct ResampleContext *create(struct ResampleContext 
*c, int out_rate, i
 soxr_io_spec_t io_spec = soxr_io_spec(type, type);
 
 soxr_quality_spec_t q_spec = soxr_quality_spec((int)((precision-2)/4), 
(SOXR_HI_PREC_CLOCK|SOXR_ROLLOFF_NONE)*!!cheby);
-q_spec.precision = linear? 0 : precision;
+q_spec.precision = precision;
 #if !defined SOXR_VERSION /* Deprecated @ March 2013: */
 q_spec.bw_pc = cutoff? FFMAX(FFMIN(cutoff,.995),.8)*100 : q_spec.bw_pc;
 #else
-- 
2.5.0

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


Re: [FFmpeg-devel] [PATCH] [RFC]MAINTAINERS: Add developers who have git write access but are otherwise not listed

2016-11-25 Thread Marton Balint


On Mon, 21 Nov 2016, Michael Niedermayer wrote:


I omitted developers who do not use their account and i felt would prefer not
to be listed.


I think everyone with access should be listed. If somebody does not use 
his account for a year or so, his/her access should be revoked.


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


[FFmpeg-devel] [PATCH] avformat/matroskadec: Prevent access of elements after freeing by set nb_elem to zero.

2016-11-25 Thread Schenk, Michael
Hi folks,

retry, because my eMail address was changed.

I’m using the decode interrupt feature of ffmpeg for getting a fast user 
reaction. It looks like this may causing some nasty
crashes by accessing previous freed pointers in matroska_read_close. The 
attached patch will reset nb_elem to zero after freeing the elements
because ffmpeg normally tests for nb_element.

Feedback for sure is warmly welcome.

Regards

Michael


---
Albis Technologies AG, Albisriederstrasse 199, CH-8047 Zürich, SWITZERLAND

Sitz der Gesellschaft / Domicile: Zürich
MWSt.-Nr. / VAT ID no.: CHE-114.433.653 MWST


ELCON Systemtechnik GmbH, Obere Hauptstrasse 10, D-09232 Hartmannsdorf, GERMANY

Sitz der Gesellschaft / Head office: Hartmannsdorf
Amtsgericht / County court: Chemnitz HRB 1 34 74
USt-ID-Nr. / VAT ID no.: DE 137 182 638
WEEE-Reg.-Nr. / WEEE Reg. no.: DE 35 781 658
Geschäftsführer / Managing director: Werner Neubauer, Markus Königshofer




Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das 
unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



0001-set-nb_elem-to-0-after-freeing-to-avoid-further-acce.patch
Description: 0001-set-nb_elem-to-0-after-freeing-to-avoid-further-acce.patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Remove the ffserver program and the ffm muxer/demuxer

2016-11-25 Thread wm4
On Thu, 24 Nov 2016 21:40:14 -0300
James Almer  wrote:

> On 11/24/2016 8:48 PM, Andreas Cadhalpun wrote:
> > On 24.11.2016 10:53, Josh de Kock wrote:  
> >> There's no benefit in waiting for this to occur before ffserver is
> >> removed as it will always be in git history. Removing ffserver from
> >> master may even speed up the "resurrection of ffserver". I think this
> >> shouldn't be delayed any further.  
> > 
> > Similarly there is no benefit in removing ffserver before the next major
> > bump, because the libraries have to stay backwards compatible until then,
> > anyway.
> > However, at least Reynaldo and Michael seem to be still working on ffserver,
> > so gratuitously removing it now would be rather unfriendly.  
> 
> A sudden surge in interest product of the decision to kill it and *long after*
> calls for developers to prevent it from bitrotting in the first place that
> pretends to be blocking is not proper and far from nice.
> Reynaldo agreed to move ffserver to a separate repo in time for the next
> release as he stated in an email, and then work on making it not depend on
> the ffm de/muxers since those have to go with the next major bump, or with
> AVStream->codec at the latest. Pretending to turn that effort into an
> argument against the removal is a crappy thing to do.
> 
> The choice and the announcement were made months ago, and those who cared
> participated in the discussions and the relevant patches. Backing out at
> the very last second is extremely unprofessional and will kill any future
> trust people will have in decisions made and announced in public channels.
> 
> It's already embarrassing that ffserver made it to 3.2. Lets try to keep
> the image that this is a serious project.

I'd like to add that removing the ffserver support from the libs, and
all deprecated stuff it depends on, will make it actually easier to
readd ffserver in a cleaner way. It reduces the risk that the new
ffserver accidentally depends on mechanisms that were supposed to go
away.

Also, the promise was that developers would pick up ffserver again and
update it. This hasn't really happened - instead it weirdly looks like
the ffserver faction is stalling for time. Maybe the interest to keep
it alive isn't that high after all.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/flvdec: move set bit_rate from parse AMF OBJECT to create_stream

2016-11-25 Thread Steven Liu
before patch:
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 
640:357], 25 fps, 25 tbr, 1k tbn, 50 tbc

after patch:
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x714 [SAR 1:1 DAR 
640:357], 2576 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc

Signed-off-by: Steven Liu 
---
 libavformat/flvdec.c | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 3812994..a04280d 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -64,6 +64,8 @@ typedef struct FLVContext {
 
 int last_keyframe_stream_index;
 int keyframe_count;
+int64_t video_bit_rate;
+int64_t audio_bit_rate;
 int64_t *keyframe_times;
 int64_t *keyframe_filepositions;
 int missing_streams;
@@ -140,11 +142,14 @@ static AVStream *create_stream(AVFormatContext *s, int 
codec_type)
&& s->streams[0]->codecpar->codec_type != 
AVMEDIA_TYPE_SUBTITLE
&& s->streams[1]->codecpar->codec_type != 
AVMEDIA_TYPE_SUBTITLE))
 s->ctx_flags &= ~AVFMTCTX_NOHEADER;
-if (codec_type == AVMEDIA_TYPE_AUDIO)
+if (codec_type == AVMEDIA_TYPE_AUDIO) {
+st->codecpar->bit_rate = flv->audio_bit_rate;
 flv->missing_streams &= ~FLV_HEADER_FLAG_HASAUDIO;
-if (codec_type == AVMEDIA_TYPE_VIDEO)
+}
+if (codec_type == AVMEDIA_TYPE_VIDEO) {
+st->codecpar->bit_rate = flv->video_bit_rate;
 flv->missing_streams &= ~FLV_HEADER_FLAG_HASVIDEO;
-
+}
 
 avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
 flv->last_keyframe_stream_index = s->nb_streams - 1;
@@ -534,12 +539,12 @@ static int amf_parse_object(AVFormatContext *s, AVStream 
*astream,
 amf_type == AMF_DATA_TYPE_BOOL) {
 if (!strcmp(key, "duration"))
 s->duration = num_val * AV_TIME_BASE;
-else if (!strcmp(key, "videodatarate") && vpar &&
+else if (!strcmp(key, "videodatarate") &&
  0 <= (int)(num_val * 1024.0))
-vpar->bit_rate = num_val * 1024.0;
-else if (!strcmp(key, "audiodatarate") && apar &&
+flv->video_bit_rate = num_val * 1024.0;
+else if (!strcmp(key, "audiodatarate") &&
  0 <= (int)(num_val * 1024.0))
-apar->bit_rate = num_val * 1024.0;
+flv->audio_bit_rate = num_val * 1024.0;
 else if (!strcmp(key, "datastream")) {
 AVStream *st = create_stream(s, AVMEDIA_TYPE_SUBTITLE);
 if (!st)
-- 
2.9.3 (Apple Git-75)



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