Re: [FFmpeg-devel] [patch 1/3]Fix bug for POWER LE:/libavcodec/ppc/me_cmp.c

2014-11-04 Thread Michael Niedermayer
On Tue, Nov 04, 2014 at 03:05:24PM +0800, rongyan wrote:
 Hi,
 There are 3 patches to fix bugs for POWER8 little endian. I will send 3 
 patches in 3 different email. This is the first, functions 
 hadamard8_diff8x8_altivec()hadamard8_diff16x8_altivec()
 sad16_x2_altivec()
 sad16_y2_altivec()
 sad16_xy2_altivec()
 sad16_altivec()
 sad8_altivec()
 sse16_altivec()
 sse8_altivec()
 ‍ are fixed.
  The fate test result after merge these 3 patches can be found on website by 
 searching ibmcrl, also attached in the below to facilitate the review. The 
 passed test cases change from  1679/2182 to 2202/2235.
  ‍
  Thanks for review and any comments please feel free to let me know.
   
  Rong Yan
   --
   The world has enough for everyone's need, but not enough for everyone's 
 greed.


  me_cmp.c |  497 
 ---
  1 file changed, 196 insertions(+), 301 deletions(-)
 d18753b0bc6ac53409a3070a61795e079282b6ee  
 0001-libavcodec-ppc-me_cmp.c-fix-hadamard8_diff8x8_altive.patch
 From 40e4b6d2871772e17c86986cfeca16dcdb24ded8 Mon Sep 17 00:00:00 2001
 From: Rong Yan rongyan...@gmail.com
 Date: Tue, 4 Nov 2014 06:23:11 +
 Subject: [PATCH 1/3] libavcodec/ppc/me_cmp.c : fix hadamard8_diff8x8_altivec()
  hadamard8_diff16x8_altivec() sad16_x2_altivec() sad16_y2_altivec()
  sad16_xy2_altivec() sad16_altivec() sad8_altivec() sse16_altivec()
  sse8_altivec() for POWER LE
 
 ---
  libavcodec/ppc/me_cmp.c | 497 
 +++-
  1 file changed, 196 insertions(+), 301 deletions(-)
 
 diff --git a/libavcodec/ppc/me_cmp.c b/libavcodec/ppc/me_cmp.c
 index 8ff8193..133c3bb 100644
 --- a/libavcodec/ppc/me_cmp.c
 +++ b/libavcodec/ppc/me_cmp.c
 @@ -35,64 +35,39 @@
  #include libavcodec/me_cmp.h
  
  #if HAVE_ALTIVEC
 -#if HAVE_VSX
 -static int sad16_x2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2,
 -int line_size, int h)
 -{
 -int i, s = 0;
 -const vector unsigned char zero =
 -(const vector unsigned char) vec_splat_u8(0);
 -vector unsigned int sad = (vector unsigned int) vec_splat_u32(0);
 -vector signed int sumdiffs;
 -
 -for (i = 0; i  h; i++) {
 -/* Read unaligned pixels into our vectors. The vectors are as 
 follows:
 - * pix1v: pix1[0] - pix1[15]
 - * pix2v: pix2[0] - pix2[15]  pix2iv: pix2[1] - pix2[16] */
 -vector unsigned char pix1v  = vec_vsx_ld(0,  pix1);
 -vector unsigned char pix2v  = vec_vsx_ld(0,  pix2);
 -vector unsigned char pix2iv = vec_vsx_ld(1,  pix2);
 -
 -/* Calculate the average vector. */
 -vector unsigned char avgv = vec_avg(pix2v, pix2iv);
 -
 -/* Calculate a sum of abs differences vector. */
 -vector unsigned char t5 = vec_sub(vec_max(pix1v, avgv),
 -  vec_min(pix1v, avgv));
 -
 -/* Add each 4 pixel group together and put 4 results into sad. */
 -sad = vec_sum4s(t5, sad);
 -
 -pix1 += line_size;
 -pix2 += line_size;
 -}
 -/* Sum up the four partial sums, and put the result into s. */
 -sumdiffs = vec_sums((vector signed int) sad, (vector signed int) zero);
 -sumdiffs = vec_splat(sumdiffs, 3);
 -vec_vsx_st(sumdiffs, 0, s);
 -return s;
 -}
 -#else
  static int sad16_x2_altivec(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2,
  int line_size, int h)
  {
  int i, s = 0;
 +#if HAVE_BIGENDIAN
  const vector unsigned char zero =
  (const vector unsigned char) vec_splat_u8(0);
  vector unsigned char perm1 = vec_lvsl(0, pix2);
  vector unsigned char perm2 = vec_add(perm1, vec_splat_u8(1));
  vector unsigned int sad = (vector unsigned int) vec_splat_u32(0);
  vector signed int sumdiffs;
 +#else /* HAVE_BIGENDIAN */
 +const vector unsigned char __attribute__((aligned(16))) zero =
 +(const vector unsigned char) vec_splat_u8(0);
 +vector unsigned int __attribute__((aligned(16))) sad = (vector unsigned 
 int) vec_splat_u32(0);
 +vector signed int __attribute__((aligned(16))) sumdiffs;
 +#endif /* HAVE_BIGENDIAN */

this is much better!

but please use

#if HAVE_BIGENDIAN
#define DECLARE_ALIGNED_LE(n,t,v) t v
#else
#define DECLARE_ALIGNED_LE(n,t,v) DECLARE_ALIGNED(n,t,v)
#endif

...

DECLARE_ALIGNED_LE(16, const vector unsigned char, zero) =
(const vector unsigned char) vec_splat_u8(0);
#if HAVE_BIGENDIAN
vector unsigned char perm1 = vec_lvsl(0, pix2);
vector unsigned char perm2 = vec_add(perm1, vec_splat_u8(1));
#endif /* HAVE_BIGENDIAN */
DECLARE_ALIGNED_LE(16, vector unsigned int, sad) = (vector unsigned int) 
vec_splat_u32(0);
DECLARE_ALIGNED_LE(16, vector signed int, sumdiffs);


  
  for (i = 0; i  h; i++) {
  /* Read unaligned pixels into our vectors. The vectors are as 
 follows:

Re: [FFmpeg-devel] [patch 1/3]Fix bug for POWER LE: /libavcodec/ppc/me_cmp.c

2014-11-04 Thread Michael Niedermayer
On Sat, Nov 01, 2014 at 09:37:20PM -0700, Timothy Gu wrote:
 你好:
 Hi,
 
 On Friday, October 31, 2014, Michael Niedermayer michae...@gmx.at wrote:
 
 
  Why do you keep sending patches which duplicate code?
 
  Maybe someone can translate this to a language you understand
  better then english:
 
 
 This is an Chinese translation. Hope this helps.

yes, thanks!

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

The real ebay dictionary, page 3
Rare item - Common item with rare defect or maybe just a lie
Professional - 'Toy' made in china, not functional except as doorstop
Experts will know - The seller hopes you are not an expert


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/3]Fix bug for POWER LE:/libavcodec/ppc/me_cmp.c

2014-11-04 Thread Michael Niedermayer
On Sun, Nov 02, 2014 at 06:13:16PM +0800, rongyan wrote:
 Timothy and Michael,
   
  I will modify the code according to your comments, then re-submit it. 
  Thanks.

Thanks!

[...]

-- 
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] [RFC] avformat: use genpts option for output file.

2014-11-04 Thread Benoit Fouet
Hi,

- Mail original -
 On Mon, Nov 03, 2014 at 03:21:33PM +0100, Benoit Fouet wrote:
  When -fflags +genpts is used for output file, use dts as pts.
  
  Signed-off-by: Benoit Fouet benoit.fo...@free.fr
  ---
   libavformat/mux.c | 3 +++
   1 file changed, 3 insertions(+)
  
  diff --git a/libavformat/mux.c b/libavformat/mux.c
  index 5e45bd8..1d42451 100644
  --- a/libavformat/mux.c
  +++ b/libavformat/mux.c
  @@ -884,6 +884,9 @@ int av_interleaved_write_frame(AVFormatContext
  *s, AVPacket *pkt)
   ret = AVERROR(EINVAL);
   goto fail;
   }
  +
  +if (pkt-pts == AV_NOPTS_VALUE  s-flags 
  AVFMT_FLAG_GENPTS)
  +pkt-pts = pkt-dts;
 
 does this set pts to invalid value for h264 with b frames or
 b pyramid ?
 

No. The only thing I wanted to do was to provide a way for users to remux h264 
elementary streams to .ts or .mkv
Maybe I could add a new option, like +copy_dts_to_pts instead of using the 
existing +genpts option?

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


[FFmpeg-devel] [PATCH] id3v2: prefer TDRC for date over TDRL.

2014-11-04 Thread Benoit Fouet
TDRL is what we used as a replacement of TYER, and, according to
http://id3.org/id3v2.4.0-changes :
TYER - Year
This frame is replaced by the TDRC frame, 'Recording time'
[F:4.2.5].
So change TDRL usages to TDRC.

Fixes ticket #3694
---
 libavformat/id3v2.c  | 2 +-
 libavformat/mp3enc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 3e54620..cbf4375 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -60,8 +60,8 @@ const AVMetadataConv ff_id3v2_34_metadata_conv[] = {
 
 const AVMetadataConv ff_id3v2_4_metadata_conv[] = {
 { TCMP, compilation   },
-{ TDRL, date  },
 { TDRC, date  },
+{ TDRL, date  },
 { TDEN, creation_time },
 { TSOA, album-sort},
 { TSOP, artist-sort   },
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index a691f75..d4b6af0 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -58,7 +58,7 @@ static int id3v1_create_tag(AVFormatContext *s, uint8_t *buf)
 count += id3v1_set_string(s, TIT2,buf +  3, 30 + 1);   //title
 count += id3v1_set_string(s, TPE1,buf + 33, 30 + 1);   
//author|artist
 count += id3v1_set_string(s, TALB,buf + 63, 30 + 1);   //album
-count += id3v1_set_string(s, TDRL,buf + 93,  4 + 1);   //date
+count += id3v1_set_string(s, TDRC,buf + 93,  4 + 1);   //date
 count += id3v1_set_string(s, comment, buf + 97, 30 + 1);
 if ((tag = av_dict_get(s-metadata, TRCK, NULL, 0))) { //track
 buf[125] = 0;
-- 
2.1.2.532.g19b5d50

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


Re: [FFmpeg-devel] [PATCH] [RFC] avformat: use genpts option for output file.

2014-11-04 Thread Michael Niedermayer
On Tue, Nov 04, 2014 at 01:15:02PM +0100, Benoit Fouet wrote:
 Hi,
 
 - Mail original -
  On Mon, Nov 03, 2014 at 03:21:33PM +0100, Benoit Fouet wrote:
   When -fflags +genpts is used for output file, use dts as pts.
   
   Signed-off-by: Benoit Fouet benoit.fo...@free.fr
   ---
libavformat/mux.c | 3 +++
1 file changed, 3 insertions(+)
   
   diff --git a/libavformat/mux.c b/libavformat/mux.c
   index 5e45bd8..1d42451 100644
   --- a/libavformat/mux.c
   +++ b/libavformat/mux.c
   @@ -884,6 +884,9 @@ int av_interleaved_write_frame(AVFormatContext
   *s, AVPacket *pkt)
ret = AVERROR(EINVAL);
goto fail;
}
   +
   +if (pkt-pts == AV_NOPTS_VALUE  s-flags 
   AVFMT_FLAG_GENPTS)
   +pkt-pts = pkt-dts;
  
  does this set pts to invalid value for h264 with b frames or
  b pyramid ?
  
 
 No.

how did you test this ?
can you show an example of b pyramid and the filled in PTS values


 The only thing I wanted to do was to provide a way for users to remux h264 
 elementary streams to .ts or .mkv
 Maybe I could add a new option, like +copy_dts_to_pts instead of using the 
 existing +genpts option?

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


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


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


Re: [FFmpeg-devel] [PATCH] id3v2: prefer TDRC for date over TDRL.

2014-11-04 Thread Michael Niedermayer
On Tue, Nov 04, 2014 at 01:54:43PM +0100, Benoit Fouet wrote:
 TDRL is what we used as a replacement of TYER, and, according to
 http://id3.org/id3v2.4.0-changes :
 TYER - Year
 This frame is replaced by the TDRC frame, 'Recording time'
 [F:4.2.5].
 So change TDRL usages to TDRC.
 
 Fixes ticket #3694
 ---
  libavformat/id3v2.c  | 2 +-
  libavformat/mp3enc.c | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

applied

thx

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

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus


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


Re: [FFmpeg-devel] [PATCH] [RFC] avformat: use genpts option for output file.

2014-11-04 Thread Benoit Fouet
Hi,

- Mail original -
 On Tue, Nov 04, 2014 at 01:15:02PM +0100, Benoit Fouet wrote:
  Hi,
  
  - Mail original -
   On Mon, Nov 03, 2014 at 03:21:33PM +0100, Benoit Fouet wrote:
When -fflags +genpts is used for output file, use dts as pts.

Signed-off-by: Benoit Fouet benoit.fo...@free.fr
---
 libavformat/mux.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 5e45bd8..1d42451 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -884,6 +884,9 @@ int
av_interleaved_write_frame(AVFormatContext
*s, AVPacket *pkt)
 ret = AVERROR(EINVAL);
 goto fail;
 }
+
+if (pkt-pts == AV_NOPTS_VALUE  s-flags 
AVFMT_FLAG_GENPTS)
+pkt-pts = pkt-dts;
   
   does this set pts to invalid value for h264 with b frames or
   b pyramid ?
   
  
  No.
 
 how did you test this ?
 can you show an example of b pyramid and the filled in PTS values
 

Oh... I only tested stream copy. And this is the only thing I want to fix. I 
should ensure this is only used for this case, right?
I think this can mess things up if used with real transcoding...

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


Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection

2014-11-04 Thread Michael Niedermayer
On Mon, Nov 03, 2014 at 03:34:16PM -0800, Kevin Mitchell wrote:
 rebase and update to use av_rescale. oops didn't know that was there.

[...]


 +idet-total_repeats [ repeat] ++;
 +idet-repeats   [ repeat] += PRECISION;
 +
  idet-total_prestat [   type] ++;
  idet-prestat   [   type] += PRECISION;
  
  idet-total_poststat[idet-last_type] ++;
  idet-poststat  [idet-last_type] += PRECISION;
  
 +av_log(ctx, AV_LOG_DEBUG, Repeated Field:%12s, Single frame:%12s, Multi 
 frame:%12s\n,
 +   rep2str(repeat), type2str(type), type2str(idet-last_type));
  av_log(ctx, AV_LOG_DEBUG, Single frame:%12s, Multi frame:%12s\n, 
 type2str(type), type2str(idet-last_type));

This prints the interlace information twice

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data


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


Re: [FFmpeg-devel] [PATCH] [RFC] avformat: use genpts option for output file.

2014-11-04 Thread Michael Niedermayer
On Tue, Nov 04, 2014 at 02:32:55PM +0100, Benoit Fouet wrote:
 Hi,
 
 - Mail original -
  On Tue, Nov 04, 2014 at 01:15:02PM +0100, Benoit Fouet wrote:
   Hi,
   
   - Mail original -
On Mon, Nov 03, 2014 at 03:21:33PM +0100, Benoit Fouet wrote:
 When -fflags +genpts is used for output file, use dts as pts.
 
 Signed-off-by: Benoit Fouet benoit.fo...@free.fr
 ---
  libavformat/mux.c | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/libavformat/mux.c b/libavformat/mux.c
 index 5e45bd8..1d42451 100644
 --- a/libavformat/mux.c
 +++ b/libavformat/mux.c
 @@ -884,6 +884,9 @@ int
 av_interleaved_write_frame(AVFormatContext
 *s, AVPacket *pkt)
  ret = AVERROR(EINVAL);
  goto fail;
  }
 +
 +if (pkt-pts == AV_NOPTS_VALUE  s-flags 
 AVFMT_FLAG_GENPTS)
 +pkt-pts = pkt-dts;

does this set pts to invalid value for h264 with b frames or
b pyramid ?

   
   No.
  
  how did you test this ?
  can you show an example of b pyramid and the filled in PTS values
  
 
 Oh... I only tested stream copy. And this is the only thing I want to fix. I 
 should ensure this is only used for this case, right?
 I think this can mess things up if used with real transcoding...

no, you misunderstand i think


consider
raw.h264 originally encoded with B pyramid
IPBBBPBBB
PTS ? -- these are actually stored in the h264 one way
  or another but not read
DTS 012345678

Correct (stream copy into file.ts, file.mkv and others)
IPBBBPBBB
PTS 26435A879
DTS 012345678

what i suspect this patch creates:
PTS 012345678
DTS 012345678

[...]
-- 
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] [RFC] avformat: use genpts option for output file.

2014-11-04 Thread Benoit Fouet
Hi,

- Mail original -
 On Tue, Nov 04, 2014 at 02:32:55PM +0100, Benoit Fouet wrote:
  Hi,
  
  - Mail original -
   On Tue, Nov 04, 2014 at 01:15:02PM +0100, Benoit Fouet wrote:
Hi,

- Mail original -
 On Mon, Nov 03, 2014 at 03:21:33PM +0100, Benoit Fouet wrote:
  When -fflags +genpts is used for output file, use dts as
  pts.
  
  Signed-off-by: Benoit Fouet benoit.fo...@free.fr
  ---
   libavformat/mux.c | 3 +++
   1 file changed, 3 insertions(+)
  
  diff --git a/libavformat/mux.c b/libavformat/mux.c
  index 5e45bd8..1d42451 100644
  --- a/libavformat/mux.c
  +++ b/libavformat/mux.c
  @@ -884,6 +884,9 @@ int
  av_interleaved_write_frame(AVFormatContext
  *s, AVPacket *pkt)
   ret = AVERROR(EINVAL);
   goto fail;
   }
  +
  +if (pkt-pts == AV_NOPTS_VALUE  s-flags 
  AVFMT_FLAG_GENPTS)
  +pkt-pts = pkt-dts;
 
 does this set pts to invalid value for h264 with b frames or
 b pyramid ?
 

No.
   
   how did you test this ?
   can you show an example of b pyramid and the filled in PTS values
   
  
  Oh... I only tested stream copy. And this is the only thing I want
  to fix. I should ensure this is only used for this case, right?
  I think this can mess things up if used with real transcoding...
 
 no, you misunderstand i think
 
 

indeed.

 consider
 raw.h264 originally encoded with B pyramid
 IPBBBPBBB
 PTS ? -- these are actually stored in the h264 one way
   or another but not read
 DTS 012345678
 
 Correct (stream copy into file.ts, file.mkv and others)
 IPBBBPBBB
 PTS 26435A879
 DTS 012345678
 

 what i suspect this patch creates:
 PTS 012345678
 DTS 012345678
 

This seems to be what this patch creates, yes.
So I get a lot of Application provided invalid, non monotonically increasing 
dts to muxer in stream 0:  =  error messages when processing the 
output generated by the genpts with this patch applied...

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


[FFmpeg-devel] [PATCH] doc: clarify -frames options behavior

2014-11-04 Thread Lou Logan
Replace frames to record with frames to output. The to record
makes it seem like an input option, or that it would capture the frames
insead of outputting them.

Signed-off-by: Lou Logan l...@lrcd.com
---
 doc/ffmpeg.texi | 6 +++---
 ffmpeg_opt.c| 8 
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 38dca86..d774aba 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -360,7 +360,7 @@ ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
 @end example
 
 @item -dframes @var{number} (@emph{output})
-Set the number of data frames to record. This is an alias for @code{-frames:d}.
+Set the number of data frames to output. This is an alias for @code{-frames:d}.
 
 @item -frames[:@var{stream_specifier}] @var{framecount} 
(@emph{output,per-stream})
 Stop writing to the stream after @var{framecount} frames.
@@ -467,7 +467,7 @@ attachments.
 
 @table @option
 @item -vframes @var{number} (@emph{output})
-Set the number of video frames to record. This is an alias for 
@code{-frames:v}.
+Set the number of video frames to output. This is an alias for 
@code{-frames:v}.
 @item -r[:@var{stream_specifier}] @var{fps} (@emph{input/output,per-stream})
 Set frame rate (Hz value, fraction or abbreviation).
 
@@ -692,7 +692,7 @@ If this option is not specified, the default adapter is 
used.
 
 @table @option
 @item -aframes @var{number} (@emph{output})
-Set the number of audio frames to record. This is an alias for 
@code{-frames:a}.
+Set the number of audio frames to output. This is an alias for 
@code{-frames:a}.
 @item -ar[:@var{stream_specifier}] @var{freq} (@emph{input/output,per-stream})
 Set the audio sampling frequency. For output streams it is set by
 default to the frequency of the corresponding input stream. For input
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 27e0890..781df65 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2815,7 +2815,7 @@ const OptionDef options[] = {
 add metadata, string=string },
 { dframes,HAS_ARG | OPT_PERFILE | OPT_EXPERT |
 OPT_OUTPUT,  { 
.func_arg = opt_data_frames },
-set the number of data frames to record, number },
+set the number of data frames to output, number },
 { benchmark,  OPT_BOOL | OPT_EXPERT,   { 
do_benchmark },
 add timings for benchmarking },
 { benchmark_all,  OPT_BOOL | OPT_EXPERT,   { 
do_benchmark_all },
@@ -2866,7 +2866,7 @@ const OptionDef options[] = {
 { copypriorss,OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | 
OPT_OUTPUT,   { .off = OFFSET(copy_prior_start) },
 copy or discard frames before start time },
 { frames, OPT_INT64 | HAS_ARG | OPT_SPEC | OPT_OUTPUT, { .off = 
OFFSET(max_frames) },
-set the number of frames to record, number },
+set the number of frames to output, number },
 { tag,OPT_STRING | HAS_ARG | OPT_SPEC |
 OPT_EXPERT | OPT_OUTPUT | OPT_INPUT, { .off = 
OFFSET(codec_tags) },
 force codec tag/fourcc, fourcc/tag },
@@ -2908,7 +2908,7 @@ const OptionDef options[] = {
 
 /* video options */
 { vframes,  OPT_VIDEO | HAS_ARG  | OPT_PERFILE | OPT_OUTPUT, 
  { .func_arg = opt_video_frames },
-set the number of video frames to record, number },
+set the number of video frames to output, number },
 { r,OPT_VIDEO | HAS_ARG  | OPT_STRING | OPT_SPEC |
   OPT_INPUT | OPT_OUTPUT,  
  { .off = OFFSET(frame_rates) },
 set frame rate (Hz value, fraction or abbreviation), rate },
@@ -2996,7 +2996,7 @@ const OptionDef options[] = {
 
 /* audio options */
 { aframes,OPT_AUDIO | HAS_ARG  | OPT_PERFILE | OPT_OUTPUT,   
{ .func_arg = opt_audio_frames },
-set the number of audio frames to record, number },
+set the number of audio frames to output, number },
 { aq, OPT_AUDIO | HAS_ARG  | OPT_PERFILE | OPT_OUTPUT,   
{ .func_arg = opt_audio_qscale },
 set audio quality (codec-specific), quality, },
 { ar, OPT_AUDIO | HAS_ARG  | OPT_INT | OPT_SPEC |
-- 
2.1.2

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


Re: [FFmpeg-devel] [PATCH] doc: clarify -frames options behavior

2014-11-04 Thread Timothy Gu
On Tue, Nov 4, 2014 at 11:29 AM, Lou Logan l...@lrcd.com wrote:
 Replace frames to record with frames to output. The to record
 makes it seem like an input option, or that it would capture the frames
 insead of outputting them.

 Signed-off-by: Lou Logan l...@lrcd.com
 ---
  doc/ffmpeg.texi | 6 +++---
  ffmpeg_opt.c| 8 
  2 files changed, 7 insertions(+), 7 deletions(-)

LGTM

[...]

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


[FFmpeg-devel] [PATCH] x86/swr: replace sse4 instructions in pack_6ch with sse ones

2014-11-04 Thread James Almer
There's no benefit from using blendps here except on CPUs with AVX, where
it's faster than shufps according to Intel's documentation.
As such, rename the sse4 functions to sse/sse2 and use shufps instead.

Signed-off-by: James Almer jamr...@gmail.com
---
 libswresample/x86/audio_convert.asm| 31 +--
 libswresample/x86/audio_convert_init.c | 23 ---
 2 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/libswresample/x86/audio_convert.asm 
b/libswresample/x86/audio_convert.asm
index b6e9e5d..d77e934 100644
--- a/libswresample/x86/audio_convert.asm
+++ b/libswresample/x86/audio_convert.asm
@@ -245,15 +245,27 @@ pack_6ch_%2_to_%1_u_int %+ SUFFIX
 mov%3 m4, [srcq+src4q]
 mov%3 m5, [srcq+src5q]
 %7 x,x,x,x,m7,x
-%if cpuflag(sse4)
+%if cpuflag(sse)
 SBUTTERFLYPS 0, 1, 6
 SBUTTERFLYPS 2, 3, 6
 SBUTTERFLYPS 4, 5, 6
 
+%if cpuflag(avx)
 blendps   m6, m4, m0, 1100b
+%else
+movapsm6, m4
+shufpsm4, m0, q3210
+SWAP 4,6
+%endif
 movlhps   m0, m2
 movhlps   m4, m2
+%if cpuflag(avx)
 blendps   m2, m5, m1, 1100b
+%else
+movapsm2, m5
+shufpsm5, m1, q3210
+SWAP 2,5
+%endif
 movlhps   m1, m3
 movhlps   m5, m3
 
@@ -380,6 +392,10 @@ CONV int16, int32, a, 1, 2, INT32_TO_INT16_N, NOP_N
 PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
 PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
 
+INIT_XMM sse
+PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
+PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
+
 INIT_XMM sse2
 CONV int32, int16, u, 2, 1, INT16_TO_INT32_N, NOP_N
 CONV int32, int16, a, 2, 1, INT16_TO_INT32_N, NOP_N
@@ -431,6 +447,10 @@ UNPACK_2CH float, int16, a, 2, 1, INT16_TO_FLOAT_N, 
INT16_TO_FLOAT_INIT
 UNPACK_2CH int16, float, u, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
 UNPACK_2CH int16, float, a, 1, 2, FLOAT_TO_INT16_N, FLOAT_TO_INT16_INIT
 
+PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
+PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
+PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
+PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
 
 INIT_XMM ssse3
 UNPACK_2CH int16, int16, u, 1, 1, NOP_N, NOP_N
@@ -440,15 +460,6 @@ UNPACK_2CH int32, int16, a, 2, 1, INT16_TO_INT32_N, NOP_N
 UNPACK_2CH float, int16, u, 2, 1, INT16_TO_FLOAT_N, INT16_TO_FLOAT_INIT
 UNPACK_2CH float, int16, a, 2, 1, INT16_TO_FLOAT_N, INT16_TO_FLOAT_INIT
 
-INIT_XMM sse4
-PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
-PACK_6CH float, float, a, 2, 2, NOP_N, NOP_N
-
-PACK_6CH float, int32, u, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
-PACK_6CH float, int32, a, 2, 2, INT32_TO_FLOAT_N, INT32_TO_FLOAT_INIT
-PACK_6CH int32, float, u, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
-PACK_6CH int32, float, a, 2, 2, FLOAT_TO_INT32_N, FLOAT_TO_INT32_INIT
-
 %if HAVE_AVX_EXTERNAL
 INIT_XMM avx
 PACK_6CH float, float, u, 2, 2, NOP_N, NOP_N
diff --git a/libswresample/x86/audio_convert_init.c 
b/libswresample/x86/audio_convert_init.c
index a26cdf6..769575d 100644
--- a/libswresample/x86/audio_convert_init.c
+++ b/libswresample/x86/audio_convert_init.c
@@ -58,7 +58,12 @@ MULTI_CAPS_FUNC(SSE2, sse2)
 ac-simd_f =  ff_pack_6ch_float_to_float_a_mmx;
 }
 }
-
+if(EXTERNAL_SSE(mm_flags)) {
+if(channels == 6) {
+if(   out_fmt == AV_SAMPLE_FMT_FLT   in_fmt == 
AV_SAMPLE_FMT_FLTP || out_fmt == AV_SAMPLE_FMT_S32  in_fmt == 
AV_SAMPLE_FMT_S32P)
+ac-simd_f =  ff_pack_6ch_float_to_float_a_sse;
+}
+}
 if(EXTERNAL_SSE2(mm_flags)) {
 if(   out_fmt == AV_SAMPLE_FMT_FLT   in_fmt == AV_SAMPLE_FMT_S32 || 
out_fmt == AV_SAMPLE_FMT_FLTP  in_fmt == AV_SAMPLE_FMT_S32P)
 ac-simd_f =  ff_int32_to_float_a_sse2;
@@ -105,6 +110,12 @@ MULTI_CAPS_FUNC(SSE2, sse2)
 if(   out_fmt == AV_SAMPLE_FMT_S16P   in_fmt == 
AV_SAMPLE_FMT_FLT)
 ac-simd_f =  ff_unpack_2ch_float_to_int16_a_sse2;
 }
+if(channels == 6) {
+if(   out_fmt == AV_SAMPLE_FMT_FLT   in_fmt == 
AV_SAMPLE_FMT_S32P)
+ac-simd_f =  ff_pack_6ch_int32_to_float_a_sse2;
+if(   out_fmt == AV_SAMPLE_FMT_S32   in_fmt == 
AV_SAMPLE_FMT_FLTP)
+ac-simd_f =  ff_pack_6ch_float_to_int32_a_sse2;
+}
 }
 if(EXTERNAL_SSSE3(mm_flags)) {
 if(channels == 2) {
@@ -116,16 +127,6 @@ MULTI_CAPS_FUNC(SSE2, sse2)
 ac-simd_f =  ff_unpack_2ch_int16_to_float_a_ssse3;
 }
 }
-if(EXTERNAL_SSE4(mm_flags)) {
-if(channels == 6) {
-if(   out_fmt == AV_SAMPLE_FMT_FLT   in_fmt == 
AV_SAMPLE_FMT_FLTP || out_fmt == AV_SAMPLE_FMT_S32  in_fmt == 
AV_SAMPLE_FMT_S32P)
-ac-simd_f =  ff_pack_6ch_float_to_float_a_sse4;
-if(   out_fmt == AV_SAMPLE_FMT_FLT   in_fmt == 
AV_SAMPLE_FMT_S32P)
-ac-simd_f =  ff_pack_6ch_int32_to_float_a_sse4;
-

Re: [FFmpeg-devel] [PATCH 3/3] idet improvements: add repeated field detection

2014-11-04 Thread Kevin Mitchell
oops. fixed.
From 7a8b181f88c8039c044d662fadbb92befeb8f163 Mon Sep 17 00:00:00 2001
From: Kevin Mitchell kevmi...@gmail.com
Date: Sun, 2 Nov 2014 04:49:34 -0800
Subject: [PATCH] avfilter/vf_idet: add a repeated field detection

This can be useful for determining telecine.
---
 doc/filters.texi  | 19 +--
 libavfilter/version.h |  2 +-
 libavfilter/vf_idet.c | 41 +++--
 libavfilter/vf_idet.h | 10 ++
 4 files changed, 67 insertions(+), 5 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index ae08f32..be4d9c2 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -5574,8 +5574,9 @@ value.
 
 Detect video interlacing type.
 
-This filter tries to detect if the input is interlaced or progressive,
-top or bottom field first.
+This filter tries to detect if the input frames as interlaced, progressive,
+top or bottom field first. It will also try and detect fields that are
+repeated between adjacent frames (a sign of telecine).
 
 Single frame detection considers only immediately adjacent frames when classifying each frame.
 Multiple frame detection incorporates the classification history of previous frames.
@@ -5616,6 +5617,18 @@ Cumulative number of frames that could not be classified using single-frame dete
 
 @item multiple.undetermined
 Cumulative number of frames that could not be classified using multiple-frame detection.
+
+@item repeated.current_frame
+Which field in the current frame is repeated from the last. One of ``neither'', ``top'', or ``bottom''.
+
+@item repeated.neither
+Cumulative number of frames with no repeated field.
+
+@item repeated.top
+Cumulative number of frames with the top field repeated from the previous frame's top field.
+
+@item repeated.bottom
+Cumulative number of frames with the bottom field repeated from the previous frame's bottom field.
 @end table
 
 The filter accepts the following options:
@@ -5625,6 +5638,8 @@ The filter accepts the following options:
 Set interlacing threshold.
 @item prog_thres
 Set progressive threshold.
+@item repeat_thres
+Threshold for repeated field detection.
 @item half_life
 Number of frames after which a given frame's contribution to the
 statistics is halved (i.e., it contributes only 0.5 to it's
diff --git a/libavfilter/version.h b/libavfilter/version.h
index dab9b45..6f61aee 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -31,7 +31,7 @@
 
 #define LIBAVFILTER_VERSION_MAJOR  5
 #define LIBAVFILTER_VERSION_MINOR  2
-#define LIBAVFILTER_VERSION_MICRO 102
+#define LIBAVFILTER_VERSION_MICRO 103
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 40b2616..ed21eea 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -32,6 +32,7 @@
 static const AVOption idet_options[] = {
 { intl_thres, set interlacing threshold, OFFSET(interlace_threshold),   AV_OPT_TYPE_FLOAT, {.dbl = 1.04}, -1, FLT_MAX, FLAGS },
 { prog_thres, set progressive threshold, OFFSET(progressive_threshold), AV_OPT_TYPE_FLOAT, {.dbl = 1.5},  -1, FLT_MAX, FLAGS },
+{ rep_thres,  set repeat threshold,  OFFSET(repeat_threshold),  AV_OPT_TYPE_FLOAT, {.dbl = 3.0},  -1, FLT_MAX, FLAGS },
 { half_life, half life of cumulative statistics, OFFSET(half_life), AV_OPT_TYPE_FLOAT, {.dbl = 0.0},  -1, INT_MAX, FLAGS },
 { NULL }
 };
@@ -72,6 +73,16 @@ static int av_dict_set_fxp(AVDictionary **pm, const char *key, uint64_t value, u
 return av_dict_set(pm, key, valuestr, flags);
 }
 
+static const char *rep2str(RepeatedField repeated_field)
+{
+switch(repeated_field) {
+case REPEAT_NONE: return neither;
+case REPEAT_TOP : return top;
+case REPEAT_BOTTOM  : return bottom;
+}
+return NULL;
+}
+
 int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w)
 {
 int x;
@@ -104,7 +115,9 @@ static void filter(AVFilterContext *ctx)
 int y, i;
 int64_t alpha[2]={0};
 int64_t delta=0;
+int64_t gamma[2]={0};
 Type type, best_type;
+RepeatedField repeat;
 int match = 0;
 AVDictionary **metadata = avpriv_frame_get_metadatap(idet-cur);
 
@@ -125,6 +138,7 @@ static void filter(AVFilterContext *ctx)
 alpha[ y   1] += idet-filter_line(cur-refs, prev, cur+refs, w);
 alpha[(y^1)1] += idet-filter_line(cur-refs, next, cur+refs, w);
 delta  += idet-filter_line(cur-refs,  cur, cur+refs, w);
+gamma[(y^1)1] += idet-filter_line(cur , prev, cur , w);
 }
 }
 
@@ -138,6 +152,14 @@ static void filter(AVFilterContext *ctx)
 type = UNDETERMINED;
 }
 
+if ( gamma[0]  idet-repeat_threshold * gamma[1] ){
+repeat = REPEAT_TOP;
+} else if ( gamma[1]  idet-repeat_threshold * gamma[0] ){
+repeat = REPEAT_BOTTOM;
+

Re: [FFmpeg-devel] OPW Qualification Task: Enable daemon mode for FFserver

2014-11-04 Thread Binathi Bingi
Hi there,

I see, we need dup2() to redirect the output to logfile. Therefore, I put
it back in the patch.

But, I am not sure if we should definitely use it, because I can't see any
messages on the console as all are being redirected to log file
For instance, when I run ffserver, I can't see the output likeFFserver
started or when I try to re-run while it is already running as daemon, I
can't see the messages like bind(port 8090): Address already in use

So, I did ps -ux to see if ffserver was running as daemon, and it was.
I am not sure if we should use dup2(), as it is redirecting messages from
console.

Regards,
Binathi

On Wed, Nov 5, 2014 at 12:04 AM, Binathi Bingi binti...@gmail.com wrote:

 Hi there,

 I am sorry for the indentation errors in the above mail, it was because of
 bad email agent.

 In the attached patch, if the config.logfilename is not -, then stdout
 is closed and then I reopened.

 Reynaldo, is right. I don't think it is good idea to use dup2().
 There were problems in running ffserver it couldn't start when I
 redirected the file descriptor to stdin, stdout, stderr using dup2().
 I removed dup2() and just opened something neutral in /dev/null
 In this patch, I included error check for return value of open().

 Cheers,
 Binathi

 On Tue, Nov 4, 2014 at 7:23 AM, Reynaldo H. Verdejo Pinochet 
 reyna...@osg.samsung.com wrote:

 Hi

 On 11/03/2014 04:09 PM, Binathi Bingi wrote:
  Hello,
 
  Inside the child process, I closed the file descriptor and then reopened
  and redirected them using dup2() and later closed the opened file. I am
 not
  sure if I understood and used the functionality of dup2() in the right
  sense.
 

 Looks about right but see bellow.

  [..]
  @@ -3736,10 +3737,42 @@ int main(int argc, char **argv)
   build_feed_streams();
 
   compute_bandwidth();
  -
  +

 Remove trailing withe space

  +if (config.ffserver_daemon) {

 What follows needs to be indented

  +pid_t ffserver_id = 0;
  +pid_t sid = 0;
  +
  +ffserver_id = fork();
  +
  +if (ffserver_id  0) {
  +ret = AVERROR(errno);
  +av_log(NULL, AV_LOG_ERROR, Impossible to start in daemon
 mode: %s\n, av_err2str(ret));
  +exit(1);

 Fix wrong indentation

  +}
  +
  +if (ffserver_id  0) {
  +exit(0);
  +}

 Drop the braces from single statement ifs blocks like this one.

  +
  +sid = setsid();
  +if (sid  0) {
  +exit(1);
  +}

 Same as above

  +
  +if (strcmp(config.logfilename, -) != 0) {
  +close(0);

 Drop the != 0. Anything but 0 will evaluate to true anyway. You do this
 elsewhere on your own code. Be consistent.

  +
  +fd = open(/dev/null, O_RDWR);
  +dup2(fd,0);
  +dup2(fd,1);
  +dup2(fd,2);

 You sure you wana dup2() stdin, stdout and stderr on the above
 condition? Please double check.

  +close(fd);

 Above block needs to be re-indented. Also, check for failures in
 open and dup2() and react accordingly. I think Nicolas mentioned
 this already.

  +
  +}
  +}
   /* signal init */
   signal(SIGPIPE, SIG_IGN);
  -
  +

 Again, drop the trailing white space you introduced here and on
 multiple lines in this same patch.

 It's getting there. Congrats ;)

 Bests,

 --
 Reynaldo H. Verdejo Pinochet
 Open Source Group
 Samsung Research America / Silicon Valley
 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



From 091aa564dc43bf18abd5dc596bf5350e92cad5dd Mon Sep 17 00:00:00 2001
From: Binathi binti...@gmail.com
Date: Tue, 4 Nov 2014 21:42:07 +0530
Subject: [PATCH] Restore Daemon mode in FFserver

Signed-off-by: Binathi Bingi binti...@gmail.com
---
 doc/ffserver.conf |  5 +
 doc/ffserver.texi |  7 ---
 ffserver.c| 38 --
 ffserver_config.c |  6 --
 ffserver_config.h |  1 +
 5 files changed, 50 insertions(+), 7 deletions(-)

diff --git a/doc/ffserver.conf b/doc/ffserver.conf
index b756961..8101f15 100644
--- a/doc/ffserver.conf
+++ b/doc/ffserver.conf
@@ -25,6 +25,11 @@ MaxBandwidth 1000
 # '-' is the standard output.
 CustomLog -
 
+# Suppress NoDaemon and enable Daemon, if you want to launch ffserver in daemon mode.
+# If no option is specified, default option is NoDaemon.
+#NoDaemon
+Daemon
+
 ##
 # Definition of the live feeds. Each live feed contains one video
 # and/or audio sequence coming from an ffmpeg encoder or another
diff --git a/doc/ffserver.texi b/doc/ffserver.texi
index 77273d2..5d5fc0f 100644
--- a/doc/ffserver.texi
+++ b/doc/ffserver.texi
@@ -405,9 +405,10 @@ In case the commandline option @option{-d} is specified this option is
 ignored, and the log is written to standard output.
 
 @item NoDaemon
-Set no-daemon mode. This option is currently ignored since now
-@command{ffserver} will always work in no-daemon mode, and is

[FFmpeg-devel] [PATCH] avformat/udp: UDP-Lite (RFC 3828) support added

2014-11-04 Thread Thomas Volkert
From: Thomas Volkert tho...@homer-conferencing.com

---
 Changelog|  1 +
 configure|  3 +++
 libavformat/allformats.c |  1 +
 libavformat/udp.c| 59 +++-
 libavformat/version.h|  2 +-
 5 files changed, 64 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index ec6abba..b960622 100644
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,7 @@ version next:
 - STL subtitle demuxer and decoder
 - libutvideo YUV 4:2:2 10bit support
 - XCB-based screen-grabber
+  UDP-Lite support (RFC 3828)
 
 version 2.4:
 - Icecast protocol
diff --git a/configure b/configure
index 40d1f07..ae20b53 100755
--- a/configure
+++ b/configure
@@ -1659,6 +1659,7 @@ HEADERS_LIST=
 sys_un_h
 sys_videoio_h
 termios_h
+udplite_h
 unistd_h
 windows_h
 winsock2_h
@@ -2542,6 +2543,7 @@ tcp_protocol_select=network
 tls_protocol_deps_any=openssl gnutls
 tls_protocol_select=tcp_protocol
 udp_protocol_select=network
+udplite_protocol_select=network
 unix_protocol_deps=sys_un_h
 unix_protocol_select=network
 
@@ -4745,6 +4747,7 @@ check_header io.h
 check_header libcrystalhd/libcrystalhd_if.h
 check_header mach/mach_time.h
 check_header malloc.h
+check_header net/udplite.h
 check_header poll.h
 check_header sys/mman.h
 check_header sys/param.h
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 4d7ef20..e82ef2b 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -371,6 +371,7 @@ void av_register_all(void)
 REGISTER_PROTOCOL(TCP,  tcp);
 REGISTER_PROTOCOL(TLS,  tls);
 REGISTER_PROTOCOL(UDP,  udp);
+REGISTER_PROTOCOL(UDPLITE,  udplite);
 REGISTER_PROTOCOL(UNIX, unix);
 
 /* external libraries */
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 376a544..beae4a1 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -40,6 +40,20 @@
 #include os_support.h
 #include url.h
 
+#if HAVE_UDPLITE_H
+#include udplite.h
+#else
+/* On many Linux systems, udplite.h is missing but the kernel supports 
UDP-Lite.
+ * So, we provide a fallback here.
+ */
+#define UDPLITE_SEND_CSCOV  10
+#define UDPLITE_RECV_CSCOV  11
+#endif
+
+#ifndef IPPROTO_UDPLITE
+#define IPPROTO_UDPLITE  136
+#endif
+
 #if HAVE_PTHREAD_CANCEL
 #include pthread.h
 #endif
@@ -55,11 +69,13 @@
 
 #define UDP_TX_BUF_SIZE 32768
 #define UDP_MAX_PKT_SIZE 65536
+#define UDP_HEADER_SIZE 8
 
 typedef struct {
 const AVClass *class;
 int udp_fd;
 int ttl;
+int udplite_coverage;
 int buffer_size;
 int is_multicast;
 int is_broadcast;
@@ -95,6 +111,7 @@ static const AVOption options[] = {
 {buffer_size, set packet buffer size in bytes, OFFSET(buffer_size), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D|E },
 {localport, set local port to bind to, OFFSET(local_port), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D|E },
 {localaddr, choose local IP address, OFFSET(local_addr), 
AV_OPT_TYPE_STRING, {.str = }, 0, 0, D|E },
+{udplite_coverage, choose UDPLite head size which should be validated by 
checksum, OFFSET(udplite_coverage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, 
D|E },
 {pkt_size, set size of UDP packets, OFFSET(packet_size), AV_OPT_TYPE_INT, 
{.i64 = 1472}, 0, INT_MAX, D|E },
 {reuse, explicitly allow or disallow reusing UDP sockets, 
OFFSET(reuse_socket), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
 {broadcast, explicitly allow or disallow broadcast destination, 
OFFSET(is_broadcast), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, E },
@@ -335,7 +352,10 @@ static int udp_socket_create(UDPContext *s, struct 
sockaddr_storage *addr,
 if (!res0)
 goto fail;
 for (res = res0; res; res=res-ai_next) {
-udp_fd = ff_socket(res-ai_family, SOCK_DGRAM, 0);
+if (s-udplite_coverage)
+   udp_fd = ff_socket(res-ai_family, SOCK_DGRAM, IPPROTO_UDPLITE);
+else
+   udp_fd = ff_socket(res-ai_family, SOCK_DGRAM, 0);
 if (udp_fd != -1) break;
 log_net_error(NULL, AV_LOG_ERROR, socket);
 }
@@ -570,6 +590,9 @@ static int udp_open(URLContext *h, const char *uri, int 
flags)
 if (av_find_info_tag(buf, sizeof(buf), ttl, p)) {
 s-ttl = strtol(buf, NULL, 10);
 }
+if (av_find_info_tag(buf, sizeof(buf), udplite_coverage, p)) {
+s-udplite_coverage = strtol(buf, NULL, 10);
+}
 if (av_find_info_tag(buf, sizeof(buf), localport, p)) {
 s-local_port = strtol(buf, NULL, 10);
 }
@@ -653,6 +676,18 @@ static int udp_open(URLContext *h, const char *uri, int 
flags)
goto fail;
 }
 
+/* Set the checksum coverage for UDP-Lite (RFC 3828) for sending and 
receiving.
+ * The receiver coverage has to be less than or equal to the sender 
coverage.
+ * Otherwise, the receiver will 

Re: [FFmpeg-devel] FFserver bug?

2014-11-04 Thread Lukasz Marek

On 31.10.2014 03:19, Michael Niedermayer wrote:

On Fri, Oct 31, 2014 at 02:14:29AM +0100, Sevan Gelici wrote:

Hi,

Two days ago i updated my linux system and also ffmpeg was updated. When i
started to stream it was not working anymore. I am using ffserver. i
determined the problem which causes the problem thats the bitrate it makes
like 50mb of it. i reinstalled the system a couple times because of some
tests and still i don't get it work. Can someone help me with this pls.


do you know which commit / revission has caused the regression ?


I wanted to learn git bisect and checked it.

Last working rev is f478e8500a3d1fb0c6014956de42d87e292b9e3b

The issue is present at next merge commit:
9b7cb02319b65596b5ef106a830fd813248fb580
but it segfaults. It can be fixed by cherry-picking:
24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d

Maybe worth to mention I recently created function to dump 
AvCodecContext, to test if ffm is transmitting context properly. And 
strange thing I noticed ffm demuxer's read_header callback is called 
only once, even though there are 2 streams. I haven't investigate it 
further yet, but it smells like a bug in ffmpeg tool.


BTW, during bisecting sometimes I landed in libav's tree (when merged 
commit was tested) Some one know how to avoid that?

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


Re: [FFmpeg-devel] FFserver bug?

2014-11-04 Thread Lukasz Marek

On 05.11.2014 00:07, Lukasz Marek wrote:

Maybe worth to mention I recently created function to dump
AvCodecContext, to test if ffm is transmitting context properly. And
strange thing I noticed ffm demuxer's read_header callback is called
only once, even though there are 2 streams.


I guess it is OK, ignore this remark
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/udp: UDP-Lite (RFC 3828) support added

2014-11-04 Thread Carl Eugen Hoyos
Thomas Volkert silvo at gmx.net writes:

 +#define UDPLITE_SEND_CSCOV10

tabs cannot be committed to FFmpeg git, please remove them.
There is a tool tools/patcheck that finds the tabs (and 
other issues) for you.

Carl Eugen

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


Re: [FFmpeg-devel] FFserver bug?

2014-11-04 Thread Michael Niedermayer
On Wed, Nov 05, 2014 at 12:07:14AM +0100, Lukasz Marek wrote:
 On 31.10.2014 03:19, Michael Niedermayer wrote:
 On Fri, Oct 31, 2014 at 02:14:29AM +0100, Sevan Gelici wrote:
 Hi,
 
 Two days ago i updated my linux system and also ffmpeg was updated. When i
 started to stream it was not working anymore. I am using ffserver. i
 determined the problem which causes the problem thats the bitrate it makes
 like 50mb of it. i reinstalled the system a couple times because of some
 tests and still i don't get it work. Can someone help me with this pls.
 
 do you know which commit / revission has caused the regression ?
 
 I wanted to learn git bisect and checked it.
 
 Last working rev is f478e8500a3d1fb0c6014956de42d87e292b9e3b
 
 The issue is present at next merge commit:
 9b7cb02319b65596b5ef106a830fd813248fb580

 but it segfaults. It can be fixed by cherry-picking:
 24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d

git show 24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d
fatal: bad object 24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d


 
 Maybe worth to mention I recently created function to dump
 AvCodecContext, to test if ffm is transmitting context properly. And
 strange thing I noticed ffm demuxer's read_header callback is called
 only once, even though there are 2 streams. I haven't investigate it
 further yet, but it smells like a bug in ffmpeg tool.
 

 BTW, during bisecting sometimes I landed in libav's tree (when
 merged commit was tested) Some one know how to avoid that?

see tools/bisect-create

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

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


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


[FFmpeg-devel] Broken endian indication in pixfmt list

2014-11-04 Thread wm4
The header pixfmt.h contains the following comment in the pixel format
list doxygen:

 * @note
 * Make sure that all newly added big-endian formats have (pix_fmt  1) == 1
 * and that all newly added little-endian formats have (pix_fmt  1) == 0.
 * This allows simpler detection of big vs little-endian.

This is currently broken for the following formats: nv20le/be gbrap16le/be

Obviously, this can't be fixed until the next ABI bump. But more
importantly, this looks like a stupid convention, and doesn't even
allow you to distinguish formats that need endian swapping and those
that don't.

Wouldn't it be better to have a flag that indicates whether the format
is endian-independent? I would define the flag as follows: if there is
a swapped-endian format defined, both formats have the flag set. I
think this would be useful to the API user.

(You can create this flag yourself with the currently available API and
without using the LSB-trick mentioned above, but it's rather painful.
For example, RGB444 can be accessed in an endian-independent way
according to its pixdesc, and av_read_image_line() does only 1 byte
reads for this format, because the components are neatly aligned.)

Should I write a patch that adds a AV_PIX_FMT_FLAG_ENDIAN flag?

Also, we should discuss whether swapped-endian formats should even
exist. From what I can see, only the raw decoders/encoders make
effective use of them. Wouldn't it be simpler to let the
decoders/encoders do the byte-swapping?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFserver bug?

2014-11-04 Thread Lukasz Marek

On 31.10.2014 02:14, Sevan Gelici wrote:

Hi,

Two days ago i updated my linux system and also ffmpeg was updated. When i
started to stream it was not working anymore. I am using ffserver. i
determined the problem which causes the problem thats the bitrate it makes
like 50mb of it. i reinstalled the system a couple times because of some
tests and still i don't get it work. Can someone help me with this pls.


I fixed it on 2.3 release branch. I know this should be done on master 
first, but I wanted to be close for the commit that introduced the problem.
There are some changes in later releases so cherry-pick would not be 
enough tho, to fix it on previous release

Fix patches attached.
From 9c1455bd9e830aedba645451b7c0cb44831658e2 Mon Sep 17 00:00:00 2001
From: Lukasz Marek lukasz.m.lu...@gmail.com
Date: Wed, 5 Nov 2014 02:10:24 +0100
Subject: [PATCH 1/2] lavc/options: don't free options while they are still in
 use

Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com
---
 libavcodec/options.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 64b27e5..a13f3e3 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -181,8 +181,6 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
 return AVERROR(EINVAL);
 }
 
-av_opt_free(dest);
-
 memcpy(dest, src, sizeof(*dest));
 
 dest-priv_data   = orig_priv_data;
-- 
1.9.1

From 3425953e04113a37a6b54217bc2254a76405e7f7 Mon Sep 17 00:00:00 2001
From: Lukasz Marek lukasz.m.lu...@gmail.com
Date: Wed, 5 Nov 2014 01:58:59 +0100
Subject: [PATCH 2/2] ffmpeg_opt: set correct priv_data for feed stream

new_output_stream creates a codec context with arbitraty picked codec.
Later data is updated, but priv_data are left alone.
There is a bit chance there is a mismatch between codecs.

Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com
---
 ffmpeg_opt.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index a825062..97056e8 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1636,6 +1636,10 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch
 memcpy(st-info, ic-streams[i]-info, sizeof(*st-info));
 st-codec= avctx;
 avcodec_copy_context(st-codec, ic-streams[i]-codec);
+av_opt_free(st-codec);
+av_free(st-codec-priv_data);
+st-codec-priv_data = ic-streams[i]-codec-priv_data;
+ic-streams[i]-codec-priv_data = NULL;
 
 if (st-codec-codec_type == AVMEDIA_TYPE_AUDIO  !ost-stream_copy)
 choose_sample_fmt(st, codec);
-- 
1.9.1

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


Re: [FFmpeg-devel] [PATCH] doc: clarify -frames options behavior

2014-11-04 Thread Lou Logan
On Tue, 4 Nov 2014 12:56:38 -0800, Timothy Gu wrote:

 On Tue, Nov 4, 2014 at 11:29 AM, Lou Logan l...@lrcd.com wrote:
  Replace frames to record with frames to output. The to record
  makes it seem like an input option, or that it would capture the frames
  insead of outputting them.
 
  Signed-off-by: Lou Logan l...@lrcd.com
  ---
   doc/ffmpeg.texi | 6 +++---
   ffmpeg_opt.c| 8 
   2 files changed, 7 insertions(+), 7 deletions(-)
 
 LGTM

Thanks. Pushed after fixing insead commit message typo.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] FFserver bug?

2014-11-04 Thread Lukasz Marek
W dniu środa, 5 listopada 2014 Michael Niedermayer michae...@gmx.at
napisał(a):

 On Wed, Nov 05, 2014 at 12:07:14AM +0100, Lukasz Marek wrote:
  On 31.10.2014 03:19, Michael Niedermayer wrote:
  On Fri, Oct 31, 2014 at 02:14:29AM +0100, Sevan Gelici wrote:
  Hi,
  
  Two days ago i updated my linux system and also ffmpeg was updated.
 When i
  started to stream it was not working anymore. I am using ffserver. i
  determined the problem which causes the problem thats the bitrate it
 makes
  like 50mb of it. i reinstalled the system a couple times because of
 some
  tests and still i don't get it work. Can someone help me with this pls.
  
  do you know which commit / revission has caused the regression ?
 
  I wanted to learn git bisect and checked it.
 
  Last working rev is f478e8500a3d1fb0c6014956de42d87e292b9e3b
 
  The issue is present at next merge commit:
  9b7cb02319b65596b5ef106a830fd813248fb580

  but it segfaults. It can be fixed by cherry-picking:
  24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d

 git show 24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d
 fatal: bad object 24a324855cbdb8d1be3ac2cc5e22d007c38d7c8d


I probably copied from picked. this should be the correct one.
e0d074556055e8d2ed706be100e26d7bb6864d6e


 
  Maybe worth to mention I recently created function to dump
  AvCodecContext, to test if ffm is transmitting context properly. And
  strange thing I noticed ffm demuxer's read_header callback is called
  only once, even though there are 2 streams. I haven't investigate it
  further yet, but it smells like a bug in ffmpeg tool.
 

  BTW, during bisecting sometimes I landed in libav's tree (when
  merged commit was tested) Some one know how to avoid that?

 see tools/bisect-create


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


Re: [FFmpeg-devel] Broken endian indication in pixfmt list

2014-11-04 Thread Michael Niedermayer
On Wed, Nov 05, 2014 at 02:13:29AM +0100, wm4 wrote:
 The header pixfmt.h contains the following comment in the pixel format
 list doxygen:
 
  * @note
  * Make sure that all newly added big-endian formats have (pix_fmt  1) == 1
  * and that all newly added little-endian formats have (pix_fmt  1) == 0.
  * This allows simpler detection of big vs little-endian.
 

 This is currently broken for the following formats: nv20le/be gbrap16le/be

yes


 
 Obviously, this can't be fixed until the next ABI bump. But more

can you post a patch which does make sure it gets fixed then?
and or that documentation corrected


[...]
 
 Also, we should discuss whether swapped-endian formats should even
 exist. From what I can see, only the raw decoders/encoders make
 effective use of them. Wouldn't it be simpler to let the
 decoders/encoders do the byte-swapping?

they are usefull to avoid doubble swaping if both in and out are
non native endian.
also they are usefull for the user API of libswscale, which mey be
used by end user applications which have such non native formats

[...]

-- 
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] avformat/udp: UDP-Lite (RFC 3828) support added

2014-11-04 Thread Michael Niedermayer
On Tue, Nov 04, 2014 at 11:48:05PM +0100, Thomas Volkert wrote:
 From: Thomas Volkert tho...@homer-conferencing.com
 
 ---
[...]
 @@ -893,3 +938,15 @@ URLProtocol ff_udp_protocol = {
  .priv_data_class = udp_context_class,
  .flags   = URL_PROTOCOL_FLAG_NETWORK,
  };
 +
 +URLProtocol ff_udplite_protocol = {
 +.name= udplite,
 +.url_open= udplite_open,
 +.url_read= udp_read,
 +.url_write   = udp_write,
 +.url_close   = udp_close,
 +.url_get_file_handle = udp_get_file_handle,
 +.priv_data_size  = sizeof(UDPContext),
 +.priv_data_class = udp_context_class,

classes cant be reused, the code will infinite loop otherwise
make fate is an example of it

also if this fixed ticket 1501, please mention it in the commit
message

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin


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


Re: [FFmpeg-devel] Broken endian indication in pixfmt list

2014-11-04 Thread wm4
On Wed, 5 Nov 2014 02:44:12 +0100
Michael Niedermayer michae...@gmx.at wrote:

 On Wed, Nov 05, 2014 at 02:13:29AM +0100, wm4 wrote:
  The header pixfmt.h contains the following comment in the pixel format
  list doxygen:
  
   * @note
   * Make sure that all newly added big-endian formats have (pix_fmt  1) == 1
   * and that all newly added little-endian formats have (pix_fmt  1) == 0.
   * This allows simpler detection of big vs little-endian.
  
 
  This is currently broken for the following formats: nv20le/be gbrap16le/be
 
 yes
 
 
  
  Obviously, this can't be fixed until the next ABI bump. But more
 
 can you post a patch which does make sure it gets fixed then?
 and or that documentation corrected

As I said, I could write a patch that adds a proper flag, which the
user can use to determine endian properties. I'd also adjust the
documentation and inform the user that the old way doesn't work anymore.

I'm not so much interested in creating big ifdef messes.

 
 [...]
  
  Also, we should discuss whether swapped-endian formats should even
  exist. From what I can see, only the raw decoders/encoders make
  effective use of them. Wouldn't it be simpler to let the
  decoders/encoders do the byte-swapping?
 
 they are usefull to avoid doubble swaping if both in and out are
 non native endian.

Which happens how often?

 also they are usefull for the user API of libswscale, which mey be
 used by end user applications which have such non native formats

Again, when is this actually useful?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Broken endian indication in pixfmt list

2014-11-04 Thread Michael Niedermayer
On Wed, Nov 05, 2014 at 02:59:45AM +0100, wm4 wrote:
 On Wed, 5 Nov 2014 02:44:12 +0100
 Michael Niedermayer michae...@gmx.at wrote:
 
  On Wed, Nov 05, 2014 at 02:13:29AM +0100, wm4 wrote:
   The header pixfmt.h contains the following comment in the pixel format
   list doxygen:
   
* @note
* Make sure that all newly added big-endian formats have (pix_fmt  1) 
   == 1
* and that all newly added little-endian formats have (pix_fmt  1) == 0.
* This allows simpler detection of big vs little-endian.
   
  
   This is currently broken for the following formats: nv20le/be gbrap16le/be
  
  yes
  
  
   
   Obviously, this can't be fixed until the next ABI bump. But more
  
  can you post a patch which does make sure it gets fixed then?
  and or that documentation corrected
 
 As I said, I could write a patch that adds a proper flag, which the
 user can use to determine endian properties. I'd also adjust the
 documentation and inform the user that the old way doesn't work anymore.

iam fine with that but you might run into some obstacles
the flags are uint8_t and all used
adding a new field might require some care to ensure ABI compatibility
and might need accessor functions


 
 I'm not so much interested in creating big ifdef messes.

neither am i

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.


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


Re: [FFmpeg-devel] Broken endian indication in pixfmt list

2014-11-04 Thread wm4
On Wed, 5 Nov 2014 03:19:04 +0100
Michael Niedermayer michae...@gmx.at wrote:

 On Wed, Nov 05, 2014 at 02:59:45AM +0100, wm4 wrote:
  On Wed, 5 Nov 2014 02:44:12 +0100
  Michael Niedermayer michae...@gmx.at wrote:
  
   On Wed, Nov 05, 2014 at 02:13:29AM +0100, wm4 wrote:
The header pixfmt.h contains the following comment in the pixel format
list doxygen:

 * @note
 * Make sure that all newly added big-endian formats have (pix_fmt  1) 
== 1
 * and that all newly added little-endian formats have (pix_fmt  1) == 
0.
 * This allows simpler detection of big vs little-endian.

   
This is currently broken for the following formats: nv20le/be 
gbrap16le/be
   
   yes
   
   

Obviously, this can't be fixed until the next ABI bump. But more
   
   can you post a patch which does make sure it gets fixed then?
   and or that documentation corrected
  
  As I said, I could write a patch that adds a proper flag, which the
  user can use to determine endian properties. I'd also adjust the
  documentation and inform the user that the old way doesn't work anymore.
 
 iam fine with that but you might run into some obstacles
 the flags are uint8_t and all used
 adding a new field might require some care to ensure ABI compatibility
 and might need accessor functions

I didn't realize that. It sort of ruins the idea.

I see two solutions without breaking ABI:
- add a flags2 member, which contains the flags; duplicate it, and
  deprecate the old flags member
- store the high bits of the flags member in a new flags2 member,
  and add an accessor which returns the full flags


There's also the deprecated av_pix_fmt_descriptors[] variable - if we
care about this, extending AVPixFmtDescriptor is not possible without
breaking ABI. And currently this symbol is actually exported.

 
  
  I'm not so much interested in creating big ifdef messes.
 
 neither am i
 
 [...]
 

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


Re: [FFmpeg-devel] [PATCH] avformat/mpegts: add scan_all_pmts option

2014-11-04 Thread Michael Niedermayer
On Mon, Nov 03, 2014 at 07:55:42PM -0800, Timothy Gu wrote:
 On Nov 3, 2014 4:59 PM, Michael Niedermayer michae...@gmx.at wrote:
 
  This allows selecting if the demuxer should consider all streams to be
  found after the first PMT and add further streams during decoding or if
 it rather
  should scan all that are within the analyze-duration and other limits
 
  Fixes Ticket3762
 
  Signed-off-by: Michael Niedermayer michae...@gmx.at
  ---
   libavformat/mpegts.c |8 +++-
   1 file changed, 7 insertions(+), 1 deletion(-)
 
  diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
  index 97e07a7..5691c5a 100644
  --- a/libavformat/mpegts.c
  +++ b/libavformat/mpegts.c
 
  +{scan_all_pmts,   Scan and combine all PMTs,
 offsetof(MpegTSContext, scan_all_pmts), AV_OPT_TYPE_INT,
  + { .i64 =  -1}, -1, 1,  AV_OPT_FLAG_DECODING_PARAM },
 
 Why not 0?

-1 was meant as a default/heuristic/what we did previously value

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin


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


[FFmpeg-devel] [PATCH] Enable mpcodecs without needing inline asm

2014-11-04 Thread Matt Oliver
Currently the extra filters provided by mpcodecs require inline asm support
to compile. However these filters all provide non-asm alternatives that can
be used with the correct pre-processor guard.

Based on some recent discussions it appears that some of these filters are
still used but with the requirement for inline asm they cannot be used with
certain compilers (such as msvc). So while people still use/need these
filters i thought id make them available for msvc users.

The mpcodec filters use pre-processor defines such as HAVE_MMX for inline
asm, given both mplayer and ffmpeg have a HAVE_MMX_INLINE define specific
for inline asm then the preprocessors can be changed to the _INLINE
variants which makes inline asm code compile as appropriate.

This patch has 2 parts, the first changes the pre-processors in mpcodecs to
use the _INLINE variants. Logically this would appear to be the correct
pre-processor for inline asm to begin with, if anyone knows of why the
_INLINE variants werent/shouldnt be used then feel free to let me know.

The mpcodec patch will have to be pushed to upstream but assuming
everything is ok then the second patch just updates ffmpegs configure to
allow the mpcodecs filters without requiring inline asm.


0001-mpcodecs-Use-_INLINE-guards-for-inline-asm.patch
Description: Binary data


0002-configure-Enable-mpcodec-compilation-without-inline-.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel