[FFmpeg-devel] Codec for GPS

2016-02-14 Thread Chau Pham
Hi Seniors


what codec does ffmpeg use for GPS?


Thank in advance

Tim

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


Re: [FFmpeg-devel] Help needed with muxing issues pertaining to raw AVI and QuickTime video

2016-02-14 Thread Mats Peterson

On 02/15/2016 07:00 AM, Mats Peterson wrote:

Files for testing are available at the links below. Get the *bpp_129.*
files. They are odd-width files (129x97 pixels).

https://drive.google.com/open?id=0B3_pEBoLs0faMnU1NUVMdXdsOE0
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk



The QuickTime files have strides aligned to 4-byte boundaries, but they 
will work fine in QuickTime in Windows or Mac.


Mats

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


Re: [FFmpeg-devel] Help needed with muxing issues pertaining to raw AVI and QuickTime video

2016-02-14 Thread Mats Peterson

On 02/15/2016 05:38 AM, Mats Peterson wrote:

I'm not very confident on the muxing side, therefore I would be grateful
if anyone able to look outside of his own agenda could look into
possible solutions in order to solve the following issues pertaining to
writing AVI and QuickTime files created with "-vcodec rawvideo":

1. Incorrect stride. It should be 4-byte aligned for AVI, and 2-byte
aligned for QuickTime. Currently it's the same as for nut, i.e. the
minimum possible. This will logically only work for files with even widths.

2. Palette being included in the frames. This is OK for nut, but it's
clearly non-standard behaviour for AVI and QuickTime, and it makes the
files unplayable with anything else than FFplay.

Thanks in advance.



Files for testing are available at the links below. Get the *bpp_129.* 
files. They are odd-width files (129x97 pixels).


https://drive.google.com/open?id=0B3_pEBoLs0faMnU1NUVMdXdsOE0
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Help needed with muxing issues pertaining to raw AVI and QuickTime video

2016-02-14 Thread Mats Peterson
I'm not very confident on the muxing side, therefore I would be grateful 
if anyone able to look outside of his own agenda could look into 
possible solutions in order to solve the following issues pertaining to 
writing AVI and QuickTime files created with "-vcodec rawvideo":


1. Incorrect stride. It should be 4-byte aligned for AVI, and 2-byte 
aligned for QuickTime. Currently it's the same as for nut, i.e. the 
minimum possible. This will logically only work for files with even widths.


2. Palette being included in the frames. This is OK for nut, but it's 
clearly non-standard behaviour for AVI and QuickTime, and it makes the 
files unplayable with anything else than FFplay.


Thanks in advance.

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH v2 2/3] compat/os2threads: support the return value of joined thread

2016-02-14 Thread KO Myung-Hun


Michael Niedermayer wrote:
> On Mon, Feb 15, 2016 at 12:20:34AM +0900, KO Myung-Hun wrote:
>> ---
>>  compat/os2threads.h | 39 ++-
>>  1 file changed, 18 insertions(+), 21 deletions(-)
> 
> applied
> 
> btw, you should add yourself to the MAINTAINERS file i think, as
> you de facto maintain this code ...
> 

Ok. I attached the patch.


-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

From f8705b23eaae1171d2d68ead110623bac1dab7a5 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun 
Date: Mon, 15 Feb 2016 13:16:23 +0900
Subject: [PATCH] MAINTAINERS: add myself as an OS/2 maintainer

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index d4873d7..dc2fa79 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -563,6 +563,7 @@ Windows ICL Matthew Oliver
 ADI/Blackfin DSPMarc Hoffman
 Sparc   Roman Shaposhnik
 x86 Michael Niedermayer
+OS/2KO Myung-Hun
 
 
 Releases
-- 
2.7.0

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


Re: [FFmpeg-devel] [PATCH 3/3] lavf/mpjpeg: do not include CRLF preceding boundary as, part of the returned frame

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 10:22:30PM -0500, Alexander Agranovsky wrote:
> Thanks - any problems with 2/3? Or is it still pending?

i saw a case where it caused much more data to be read in probing
i didnt had time to look yet so thats not a too informative bug
report, dont even know if it is a bug  ...


> 
> On 2/14/16 8:53 AM, Michael Niedermayer wrote:
> >On Sat, Feb 13, 2016 at 11:49:06PM -0500, Alexander Agranovsky wrote:
> >>  mpjpegdec.c |4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>0c761f422ba83446d20728449c0c6813e4e11560  
> >>0003-lavf-mpjpeg-do-not-include-CRLF-preceding-boundary-a.patch
> >> From b2ef061db32933e896dbeecb68268a62c47d6e0a Mon Sep 17 00:00:00 2001
> >>From: Alex Agranovsky 
> >>Date: Sat, 13 Feb 2016 23:16:45 -0500
> >>Subject: [PATCH 3/3] lavf/mpjpeg: do not include CRLF preceding boundary as
> >>  part of the returned frame
> >applied
> >
> >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

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.


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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 11:08:35PM +0100, Michael Niedermayer wrote:
> On Fri, Jan 01, 2016 at 03:19:21PM +0100, Michael Niedermayer wrote:
> > Hi all
> > 
> > Its a while since 2.8 so unless there are objections i will make a
> > 2.9 or if people prefer a 3.0 within the next month or so
> > 
> > Also ill likely make another round of point releases from the
> > 2.8/2.7/2.6/2.5 branches soon, that is if someone wants to backport
> > something or fix and backport ...
> 
> release/3.0 branch made
> 
> i will make 3.0 from, HEAD of release/3.0 in a few hours
> feel free to cherry pick anything into it from master that you feel
> should be in it before

3.0 release made

i plan to make a 3.0.1 in 2 weeks, everyone please if you fix a bug
in master, also cherry pick it to release/3.0 so they will be in 3.0.1

[...]

-- 
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 3/3] lavf/mpjpeg: do not include CRLF preceding boundary as, part of the returned frame

2016-02-14 Thread Alexander Agranovsky

Thanks - any problems with 2/3? Or is it still pending?

On 2/14/16 8:53 AM, Michael Niedermayer wrote:

On Sat, Feb 13, 2016 at 11:49:06PM -0500, Alexander Agranovsky wrote:

  mpjpegdec.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
0c761f422ba83446d20728449c0c6813e4e11560  
0003-lavf-mpjpeg-do-not-include-CRLF-preceding-boundary-a.patch
 From b2ef061db32933e896dbeecb68268a62c47d6e0a Mon Sep 17 00:00:00 2001
From: Alex Agranovsky 
Date: Sat, 13 Feb 2016 23:16:45 -0500
Subject: [PATCH 3/3] lavf/mpjpeg: do not include CRLF preceding boundary as
  part of the returned frame

applied

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


[FFmpeg-devel] [PATCH v3 1/2] lavc/ccaption_dec: do not ignore repeated character commands

2016-02-14 Thread Aman Gupta
From: Aman Gupta 

control codes in a cc stream can be repeated, and must be ignored.
however, repeated characters must not be ignored. the code attempted to
wipe prev_cmd in handle_char to allow repeated characters to be
processed, but prev_cmd would previously get reset _after_ handle_char()

i also moved the prev_cmd reset out from handle_char() so it can be
re-used for special character sets, which _must_ be ignored when
repeated.
---
 libavcodec/ccaption_dec.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 790f071..5fb2ec6 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -484,9 +484,6 @@ static void handle_char(CCaptionSubContext *ctx, char hi, 
char lo, int64_t pts)
 if (ctx->mode != CCMODE_POPON)
 ctx->screen_touched = 1;
 
-/* reset prev command since character can repeat */
-ctx->prev_cmd[0] = 0;
-ctx->prev_cmd[1] = 0;
 if (lo)
ff_dlog(ctx, "(%c,%c)\n", hi, lo);
 else
@@ -497,8 +494,15 @@ static void process_cc608(CCaptionSubContext *ctx, int64_t 
pts, uint8_t hi, uint
 {
 if (hi == ctx->prev_cmd[0] && lo == ctx->prev_cmd[1]) {
 /* ignore redundant command */
-} else if ( (hi == 0x10 && (lo >= 0x40 && lo <= 0x5f)) ||
-  ( (hi >= 0x11 && hi <= 0x17) && (lo >= 0x40 && lo <= 0x7f) ) ) {
+return;
+}
+
+/* set prev command */
+ctx->prev_cmd[0] = hi;
+ctx->prev_cmd[1] = lo;
+
+if ( (hi == 0x10 && (lo >= 0x40 && lo <= 0x5f)) ||
+   ( (hi >= 0x11 && hi <= 0x17) && (lo >= 0x40 && lo <= 0x7f) ) ) {
 handle_pac(ctx, hi, lo);
 } else if ( ( hi == 0x11 && lo >= 0x20 && lo <= 0x2f ) ||
 ( hi == 0x17 && lo >= 0x2e && lo <= 0x2f) ) {
@@ -559,14 +563,11 @@ static void process_cc608(CCaptionSubContext *ctx, 
int64_t pts, uint8_t hi, uint
 } else if (hi >= 0x20) {
 /* Standard characters (always in pairs) */
 handle_char(ctx, hi, lo, pts);
+ctx->prev_cmd[0] = ctx->prev_cmd[1] = 0;
 } else {
 /* Ignoring all other non data code */
 ff_dlog(ctx, "Unknown command 0x%hhx 0x%hhx\n", hi, lo);
 }
-
-/* set prev command */
-ctx->prev_cmd[0] = hi;
-ctx->prev_cmd[1] = lo;
 }
 
 static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket 
*avpkt)
-- 
2.5.3

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


Re: [FFmpeg-devel] [PATCH/RFC]lavf/mpegts: Detect Private Stream 1 as teletext

2016-02-14 Thread Marton Balint

On Mon, 15 Feb 2016, Carl Eugen Hoyos wrote:

Hi!

Attached patch fixes teletext detection for a sample that was uploaded by a
user in the thread "Which command line can do dvb_teletext from ts to mp4"
on the user mailing list:
http://we.tl/Zg2yq1H136

I am glad if somebody could explain how this should be done differently
for the given stream.


Hmm, maybe a raw dvb teletext stream demuxer with a probe function would 
work. I can wrap something up in a few days.


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


[FFmpeg-devel] [PATCH v3 2/2] lavc/ccaption_dec: implement special and extended character sets

2016-02-14 Thread Aman Gupta
From: Aman Gupta 

character sets implemented as defined in 
https://en.wikipedia.org/wiki/EIA-608#Characters
---
 libavcodec/ccaption_dec.c | 152 +-
 1 file changed, 149 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 5fb2ec6..237272c 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -63,6 +63,116 @@ enum cc_font {
 CCFONT_UNDERLINED_ITALICS,
 };
 
+enum cc_charset {
+CCSET_BASIC_AMERICAN,
+CCSET_SPECIAL_AMERICAN,
+CCSET_EXTENDED_SPANISH_FRENCH_MISC,
+CCSET_EXTENDED_PORTUGUESE_GERMAN_DANISH,
+};
+
+static const char *charset_overrides[4][128] =
+{
+[CCSET_BASIC_AMERICAN] = {
+[0x27] = "\u2019",
+[0x2a] = "\u00e1",
+[0x5c] = "\u00e9",
+[0x5e] = "\u00ed",
+[0x5f] = "\u00f3",
+[0x60] = "\u00fa",
+[0x7b] = "\u00e7",
+[0x7c] = "\u00f7",
+[0x7d] = "\u00d1",
+[0x7e] = "\u00f1",
+[0x7f] = "\u2588"
+},
+[CCSET_SPECIAL_AMERICAN] = {
+[0x30] = "\u00ae",
+[0x31] = "\u00b0",
+[0x32] = "\u00bd",
+[0x33] = "\u00bf",
+[0x34] = "\u2122",
+[0x35] = "\u00a2",
+[0x36] = "\u00a3",
+[0x37] = "\u266a",
+[0x38] = "\u00e0",
+[0x39] = "\u00A0",
+[0x3a] = "\u00e8",
+[0x3b] = "\u00e2",
+[0x3c] = "\u00ea",
+[0x3d] = "\u00ee",
+[0x3e] = "\u00f4",
+[0x3f] = "\u00fb",
+},
+[CCSET_EXTENDED_SPANISH_FRENCH_MISC] = {
+[0x20] = "\u00c1",
+[0x21] = "\u00c9",
+[0x22] = "\u00d3",
+[0x23] = "\u00da",
+[0x24] = "\u00dc",
+[0x25] = "\u00fc",
+[0x26] = "\u00b4",
+[0x27] = "\u00a1",
+[0x28] = "*",
+[0x29] = "\u2018",
+[0x2a] = "-",
+[0x2b] = "\u00a9",
+[0x2c] = "\u2120",
+[0x2d] = "\u00b7",
+[0x2e] = "\u201c",
+[0x2f] = "\u201d",
+[0x30] = "\u00c0",
+[0x31] = "\u00c2",
+[0x32] = "\u00c7",
+[0x33] = "\u00c8",
+[0x34] = "\u00ca",
+[0x35] = "\u00cb",
+[0x36] = "\u00eb",
+[0x37] = "\u00ce",
+[0x38] = "\u00cf",
+[0x39] = "\u00ef",
+[0x3a] = "\u00d4",
+[0x3b] = "\u00d9",
+[0x3c] = "\u00f9",
+[0x3d] = "\u00db",
+[0x3e] = "\u00ab",
+[0x3f] = "\u00bb",
+},
+[CCSET_EXTENDED_PORTUGUESE_GERMAN_DANISH] = {
+[0x20] = "\u00c3",
+[0x21] = "\u00e3",
+[0x22] = "\u00cd",
+[0x23] = "\u00cc",
+[0x24] = "\u00ec",
+[0x25] = "\u00d2",
+[0x26] = "\u00f2",
+[0x27] = "\u00d5",
+[0x28] = "\u00f5",
+[0x29] = "{",
+[0x2a] = "}",
+[0x2b] = "\\",
+[0x2c] = "^",
+[0x2d] = "_",
+[0x2e] = "|",
+[0x2f] = "~",
+[0x30] = "\u00c4",
+[0x31] = "\u00e4",
+[0x32] = "\u00d6",
+[0x33] = "\u00f6",
+[0x34] = "\u00df",
+[0x35] = "\u00a5",
+[0x36] = "\u00a4",
+[0x37] = "\u00a6",
+[0x38] = "\u00c5",
+[0x39] = "\u00e5",
+[0x3a] = "\u00d8",
+[0x3b] = "\u00f8",
+[0x3c] = "\u250c",
+[0x3d] = "\u2510",
+[0x3e] = "\u2514",
+[0x3f] = "\u2518",
+},
+};
+
 static const unsigned char pac2_attribs[32][3] = // Color, font, ident
 {
 { CCCOL_WHITE,   CCFONT_REGULAR,0 },  // 0x40 || 0x60
@@ -103,6 +213,7 @@ static const unsigned char pac2_attribs[32][3] = // Color, 
font, ident
 struct Screen {
 /* +1 is used to compensate null character of string */
 uint8_t characters[SCREEN_ROWS][SCREEN_COLUMNS+1];
+uint8_t charsets[SCREEN_ROWS][SCREEN_COLUMNS+1];
 uint8_t colors[SCREEN_ROWS][SCREEN_COLUMNS+1];
 uint8_t fonts[SCREEN_ROWS][SCREEN_COLUMNS+1];
 /*
@@ -123,6 +234,7 @@ typedef struct CCaptionSubContext {
 uint8_t cursor_column;
 uint8_t cursor_color;
 uint8_t cursor_font;
+uint8_t cursor_charset;
 AVBPrint buffer;
 int buffer_changed;
 int rollup;
@@ -189,6 +301,7 @@ static void flush_decoder(AVCodecContext *avctx)
 ctx->cursor_column = 0;
 ctx->cursor_font = 0;
 ctx->cursor_color = 0;
+ctx->cursor_charset = 0;
 ctx->active_screen = 0;
 ctx->last_real_time = 0;
 ctx->screen_touched = 0;
@@ -204,10 +317,13 @@ static int write_char(CCaptionSubContext *ctx, struct 
Screen *screen, char ch)
 uint8_t col = ctx->cursor_column;
 char *row = screen->characters[ctx->cursor_row];
 char *font = screen->fonts[ctx->cursor_row];
+char *charset = screen->charsets[ctx->cursor_row];
 
 if (col < SCREEN_COLUMNS) {
 row[col] = ch;
 font[col] = ctx->cursor_font;
+charset[col] = ctx->cursor_charset;
+ctx->cursor_charset = CCSET_BASIC_AMERICAN;
 if (ch) ctx->cursor_column++;
  

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Michael Niedermayer
On Mon, Feb 15, 2016 at 02:44:26AM +0100, Stefano Sabatini wrote:
> On date Sunday 2016-02-14 16:25:02 +0100, Michael Niedermayer encoded:
> > This was suggested by wm4 and stefano.
> > After this patch using align=1 the size used by various functions would not
> > contain padding, while the palette would be aligned at align>1
> > 
> > This patch makes it required to use align>=4 if the palette is to be 
> > accessed
> > as uint32
> > 
> > As a side-effect It fixes storing pal8 in nut with odd with
> > 
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavutil/imgutils.c |   13 +++--
> >  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> > 
> > diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
> > index adf6fdd..2f72ed7 100644
> > --- a/libavutil/imgutils.c
> > +++ b/libavutil/imgutils.c
> > @@ -125,7 +125,6 @@ int av_image_fill_pointers(uint8_t *data[4], enum 
> > AVPixelFormat pix_fmt, int hei
> >  
> >  if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
> >  desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
> > -size[0] = (size[0] + 3) & ~3;
> >  data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits 
> > words */
> >  return size[0] + 256 * 4;
> >  }
> > @@ -216,8 +215,13 @@ int av_image_alloc(uint8_t *pointers[4], int 
> > linesizes[4],
> >  av_free(buf);
> >  return ret;
> >  }
> > -if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
> > AV_PIX_FMT_FLAG_PSEUDOPAL)
> > +if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
> > AV_PIX_FMT_FLAG_PSEUDOPAL) {
> >  avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
> > +if (align < 4) {
> > +av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a 
> > minimum alignment of 4\n");
> > +return AVERROR(EINVAL);
> > +}
> > +}
> >  
> >  if ((desc->flags & AV_PIX_FMT_FLAG_PAL ||
> >   desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) &&
> > @@ -409,10 +413,7 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
> >  }
> >  
> >  if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
> > -uint32_t *d32 = (uint32_t *)(((size_t)dst + 3) & ~3);
> > -
> > -if (dst_size - 1024 < (uint8_t*)d32 - orig_dst)
> > -d32 = (uint32_t *)dst;
> > +uint32_t *d32 = (uint32_t *)dst;
> >  
> >  for (i = 0; i<256; i++)
> >  AV_WL32(d32 + i, AV_RN32(src_data[1] + 4*i));
> 
> I like it better than the other alternatives, also provides some bonus
> simplifications.
> 
> LGTM if it LGTY.

patch applied

thanks

[...]
-- 
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] [FFmpeg-mentors] New task ideas for GSoC and Outreachy

2016-02-14 Thread Stefano Sabatini
On date Wednesday 2016-02-10 16:21:09 +, Kieran Kunhya encoded:
> Hello,
> 
> It seems that we're trotting out the same old GSoC and Outreachy tasks that
> students haven't picked for years.
> 
> So, in the spirit of open source, I'd like to ask you, the developers and
> users what students should work on.
> 
> Note that this needs to be a clearly defined task that a student needs to
> work on for two months FULL-TIME so it can't just be fixing the odd thing
> here and there.

What about API scripting? This is a huge task though.
-- 
FFmpeg = Funny & Faithless Mystic Political Elected Geek
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Stefano Sabatini
On date Sunday 2016-02-14 16:25:02 +0100, Michael Niedermayer encoded:
> This was suggested by wm4 and stefano.
> After this patch using align=1 the size used by various functions would not
> contain padding, while the palette would be aligned at align>1
> 
> This patch makes it required to use align>=4 if the palette is to be accessed
> as uint32
> 
> As a side-effect It fixes storing pal8 in nut with odd with
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavutil/imgutils.c |   13 +++--
>  1 file changed, 7 insertions(+), 6 deletions(-)

> 
> diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
> index adf6fdd..2f72ed7 100644
> --- a/libavutil/imgutils.c
> +++ b/libavutil/imgutils.c
> @@ -125,7 +125,6 @@ int av_image_fill_pointers(uint8_t *data[4], enum 
> AVPixelFormat pix_fmt, int hei
>  
>  if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
>  desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
> -size[0] = (size[0] + 3) & ~3;
>  data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits 
> words */
>  return size[0] + 256 * 4;
>  }
> @@ -216,8 +215,13 @@ int av_image_alloc(uint8_t *pointers[4], int 
> linesizes[4],
>  av_free(buf);
>  return ret;
>  }
> -if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
> AV_PIX_FMT_FLAG_PSEUDOPAL)
> +if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
> AV_PIX_FMT_FLAG_PSEUDOPAL) {
>  avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
> +if (align < 4) {
> +av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a 
> minimum alignment of 4\n");
> +return AVERROR(EINVAL);
> +}
> +}
>  
>  if ((desc->flags & AV_PIX_FMT_FLAG_PAL ||
>   desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) &&
> @@ -409,10 +413,7 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
>  }
>  
>  if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
> -uint32_t *d32 = (uint32_t *)(((size_t)dst + 3) & ~3);
> -
> -if (dst_size - 1024 < (uint8_t*)d32 - orig_dst)
> -d32 = (uint32_t *)dst;
> +uint32_t *d32 = (uint32_t *)dst;
>  
>  for (i = 0; i<256; i++)
>  AV_WL32(d32 + i, AV_RN32(src_data[1] + 4*i));

I like it better than the other alternatives, also provides some bonus
simplifications.

LGTM if it LGTY.
-- 
FFmpeg = Fanciful & Funny Magical Perennial Elfic Gadget
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Fwd: Fwd: libavformat/segment : add option to increment timecode

2016-02-14 Thread Stefano Sabatini
On date Sunday 2016-02-14 15:41:05 +0100, Martin Vignali encoded:
[...]
> Hello,
> 
> New patch attach, i move variable declaration at the top (for
> AVDictionnaryEntry too).
> I also remove the return err, in case of an error occured in the
> av_timecode_init_from_string function.
> Instead i put an AV Log Warning, and the timecode is not modified.
> 
> Best regards
> 
> Martin

> From 5e162acdc9ec4602c3263796c07ca4226b314e14 Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sun, 14 Feb 2016 15:32:27 +0100
> Subject: [PATCH] lavf/segment: add increment timecode option
> 
> for example you can split a file, keeping a continuous timecode between
> each segment :
> 
> ffmpeg -i src.mov -timecode 10:00:00:00 -vcodec copy -f segment \
> -segment_time 2 -reset_timestamps 1 -increment_tc 1 target_%03d.mov
> ---
>  doc/muxers.texi   |  7 +++
>  libavformat/segment.c | 31 +++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 2e6bb4c..21f3525 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -1017,6 +1017,13 @@ implementation for HLS segmentation.
>  The segment muxer supports the following options:
>  
>  @table @option
> +
> +@item increment_tc @var{1|0}
> +if set to @code{1}, increment timecode between each segment
> +If this is selected, the input need to have
> +a timecode in the first video stream. Default value is
> +@code{0}.
> +
>  @item reference_stream @var{specifier}
>  Set the reference stream, as specified by the string @var{specifier}.
>  If @var{specifier} is set to @code{auto}, the reference is chosen
> diff --git a/libavformat/segment.c b/libavformat/segment.c
> index dd3b092..00680b3 100644
> --- a/libavformat/segment.c
> +++ b/libavformat/segment.c
> @@ -41,6 +41,7 @@
>  #include "libavutil/parseutils.h"
>  #include "libavutil/mathematics.h"
>  #include "libavutil/time.h"
> +#include "libavutil/timecode.h"
>  #include "libavutil/time_internal.h"
>  #include "libavutil/timestamp.h"
>  
> @@ -95,6 +96,7 @@ typedef struct SegmentContext {
>  char *time_str;///< segment duration specification string
>  int64_t time;  ///< segment duration
>  int use_strftime;  ///< flag to expand filename with strftime
> +int increment_tc;  ///< flag to increment timecode if found
>  
>  char *times_str;   ///< segment times specification string
>  int64_t *times;///< list of segment interval specification
> @@ -227,6 +229,34 @@ static int segment_start(AVFormatContext *s, int 
> write_header)
>  SegmentContext *seg = s->priv_data;
>  AVFormatContext *oc = seg->avf;
>  int err = 0;
> +AVTimecode tc;
> +AVRational rate;
> +AVDictionaryEntry *tcr;
> +char buf[AV_TIMECODE_STR_SIZE];
> +int i;
> +
> +if (seg->increment_tc) {
> +tcr = av_dict_get(s->metadata, "timecode", NULL, 0);
> +if (tcr) {
> +/* search the first video stream */
> +for (i = 0; i < s->nb_streams; i++) {
> +if (s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
> +rate = s->streams[i]->avg_frame_rate;/* Get fps from the 
> video stream */


> +err = av_timecode_init_from_string(, rate, 
> tcr->value, s);
> +if (err < 0) {
> +av_log(s, AV_LOG_WARNING, "Could not increment 
> timecode, error occured during timecode creation.");
> +break;
> +}

> +tc.start += (int) av_q2d(av_mul_q(av_make_q(seg->time, 
> 100 ), rate));/* increment timecode */

nit: 100_) => 100)

Also, reading from the timecode.c code it looks like the increment
must be expressed in fps units.

Finally, you are using the segment->time, which is different from the
effective segment duration. Could you set the metadata in segment_end,
where the exact duration is known?

[...]
-- 
FFmpeg = Fantastic and Faithful MultiPurpose EniGma
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/cfhd: mark as experimental, there are some unsolved crashes

2016-02-14 Thread James Almer
On 2/14/2016 9:08 PM, Carl Eugen Hoyos wrote:
> James Almer  gmail.com> writes:
> 
>> The patch was rejected on irc and dropped.
> 
> Reviews do not take place on the mailing list anymore?
> 
> Or are the crashes fixed?

Afaik, When that happens the author of the patch usually replies announcing
the patch was dropped. In this case Michael didn't because he forgot i guess.
And the crashes are being checked by Kieran (the maintainer) and Ronald.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/cfhd: mark as experimental, there are some unsolved crashes

2016-02-14 Thread Carl Eugen Hoyos
James Almer  gmail.com> writes:

> The patch was rejected on irc and dropped.

Reviews do not take place on the mailing list anymore?

Or are the crashes fixed?

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avcodec/cfhd: mark as experimental, there are some unsolved crashes

2016-02-14 Thread James Almer
On 2/14/2016 8:59 PM, Carl Eugen Hoyos wrote:
> Michael Niedermayer  niedermayer.cc> writes:
> 
>> -.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
>> +.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS 
>> | AV_CODEC_CAP_EXPERIMENTAL,
> 
> Please edit the Changelog accordingly:
> - Experimental Cineform HD decoder
> 
> Thank you, Carl Eugen

The patch was rejected on irc and dropped.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/cfhd: mark as experimental, there are some unsolved crashes

2016-02-14 Thread Carl Eugen Hoyos
Michael Niedermayer  niedermayer.cc> writes:

> -.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
> +.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS 
> | AV_CODEC_CAP_EXPERIMENTAL,

Please edit the Changelog accordingly:
- Experimental Cineform HD decoder

Thank you, Carl Eugen

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


[FFmpeg-devel] [PATCH/RFC]lavf/mpegts: Detect Private Stream 1 as teletext

2016-02-14 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes teletext detection for a sample that was uploaded by a 
user in the thread "Which command line can do dvb_teletext from ts to mp4" 
on the user mailing list:
http://we.tl/Zg2yq1H136

I am glad if somebody could explain how this should be done differently 
for the given stream.

Please comment, Carl Eugen
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 22874e6..aad9e7b 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -849,6 +849,15 @@ static int mpegts_set_stream_info(AVStream *st, PESContext 
*pes,
 st->codec->codec_id   = AV_CODEC_ID_BIN_DATA;
 st->request_probe = AVPROBE_SCORE_STREAM_RETRY / 5;
 }
+if (   st->codec->codec_id == AV_CODEC_ID_NONE
+&& !avcodec_is_open(st->codec)
+&& st->probe_packets > 0
+&& !stream_type
+&& pes->header[3] == 0xbd) {
+st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
+st->codec->codec_id   = AV_CODEC_ID_DVB_TELETEXT;
+st->request_probe = AVPROBE_SCORE_STREAM_RETRY / 5;
+}
 
 return 0;
 }
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [patch] gdigrab-mouse-dpi-awareness

2016-02-14 Thread Matt Oliver
On 13 February 2016 at 05:33, Γιώργος Μεταξάκης  wrote:

> checked with patcheck also.
> only "problem" is
> "Missing changelog entry (ignore if minor change)'
>

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


[FFmpeg-devel] [PATCHv2] avformat/asfenc: write group_mutual_exclusion_objects for audio on multiple languages

2016-02-14 Thread Marton Balint
Improves streaming compatibility with Windows Media Services. Also tested for
compatilbility in Windows Media Player, Windows Media ASF Viewer and VLC.

This version of the patch only writes exclusion among audio streams, therefore
choosing a subtitle language should be possible independently of audio language.

Signed-off-by: Marton Balint 
---
 libavformat/asf.c|  8 
 libavformat/asf.h|  2 ++
 libavformat/asfenc.c | 23 +++
 3 files changed, 33 insertions(+)

diff --git a/libavformat/asf.c b/libavformat/asf.c
index 455ca4d..719cae9 100644
--- a/libavformat/asf.c
+++ b/libavformat/asf.c
@@ -147,6 +147,14 @@ const ff_asf_guid ff_asf_extended_stream_properties_object 
= {
 0xcb, 0xa5, 0xe6, 0x14, 0x72, 0xc6, 0x32, 0x43, 0x83, 0x99, 0xa9, 0x69, 
0x52, 0x06, 0x5b, 0x5a
 };
 
+const ff_asf_guid ff_asf_group_mutual_exclusion_object = {
+0x40, 0x5a, 0x46, 0xd1, 0x79, 0x5a, 0x38, 0x43, 0xb7, 0x1b, 0xe3, 0x6b, 
0x8f, 0xd6, 0xc2, 0x49
+};
+
+const ff_asf_guid ff_asf_mutex_language = {
+0x00, 0x2a, 0xe2, 0xd6, 0xda, 0x35, 0xd1, 0x11, 0x90, 0x34, 0x00, 0xa0, 
0xc9, 0x03, 0x49, 0xbe
+};
+
 /* List of official tags at 
http://msdn.microsoft.com/en-us/library/dd743066(VS.85).aspx */
 const AVMetadataConv ff_asf_metadata_conv[] = {
 { "WM/AlbumArtist",  "album_artist" },
diff --git a/libavformat/asf.h b/libavformat/asf.h
index 914ddef..43288dd 100644
--- a/libavformat/asf.h
+++ b/libavformat/asf.h
@@ -100,6 +100,8 @@ extern const ff_asf_guid ff_asf_content_encryption;
 extern const ff_asf_guid ff_asf_ext_content_encryption;
 extern const ff_asf_guid ff_asf_digital_signature;
 extern const ff_asf_guid ff_asf_extended_stream_properties_object;
+extern const ff_asf_guid ff_asf_group_mutual_exclusion_object;
+extern const ff_asf_guid ff_asf_mutex_language;
 
 extern const AVMetadataConv ff_asf_metadata_conv[];
 
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 14f92e2..66551ea 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -396,6 +396,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t 
file_size,
 int64_t header_offset, cur_pos, hpos;
 int bit_rate;
 int64_t duration;
+int audio_language_counts[128] = { 0 };
 
 ff_metadata_conv(>metadata, ff_asf_metadata_conv, NULL);
 
@@ -444,6 +445,8 @@ static int asf_write_header1(AVFormatContext *s, int64_t 
file_size,
 asf->streams[n].stream_language_index = asf->nb_languages;
 asf->nb_languages++;
 }
+if (enc->codec_type == AVMEDIA_TYPE_AUDIO)
+
audio_language_counts[asf->streams[n].stream_language_index]++;
 }
 } else {
 asf->streams[n].stream_language_index = 128;
@@ -484,6 +487,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t 
file_size,
 if (asf->nb_languages) {
 int64_t hpos2;
 int i;
+int nb_audio_languages = 0;
 
 hpos2 = put_header(pb, _asf_language_guid);
 avio_wl16(pb, asf->nb_languages);
@@ -493,6 +497,25 @@ static int asf_write_header1(AVFormatContext *s, int64_t 
file_size,
 }
 end_header(pb, hpos2);
 
+for (i = 0; i < asf->nb_languages; i++)
+if (audio_language_counts[i])
+nb_audio_languages++;
+
+if (nb_audio_languages > 1) {
+hpos2 = put_header(pb, _asf_group_mutual_exclusion_object);
+ff_put_guid(pb, _asf_mutex_language);
+avio_wl16(pb, nb_audio_languages);
+for (i = 0; i < asf->nb_languages; i++) {
+if (audio_language_counts[i]) {
+avio_wl16(pb, audio_language_counts[i]);
+for (n = 0; n < s->nb_streams; n++)
+if (asf->streams[n].stream_language_index == i && 
s->streams[n]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
+avio_wl16(pb, n + 1);
+}
+}
+end_header(pb, hpos2);
+}
+
 for (n = 0; n < s->nb_streams; n++) {
 int64_t es_pos;
 if (asf->streams[n].stream_language_index > 127)
-- 
2.6.2

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


Re: [FFmpeg-devel] [PATCH 2/2] x86: use the new helper macros where useful

2016-02-14 Thread James Almer
On 2/14/2016 7:50 PM, Michael Niedermayer wrote:
> On Sun, Feb 14, 2016 at 07:04:44PM -0300, James Almer wrote:
>> On 2/11/2016 10:09 PM, James Almer wrote:
>>> Signed-off-by: James Almer 
>>> ---
>>>  libavcodec/x86/hevcdsp_init.c   | 11 ++-
>>>  libavcodec/x86/huffyuvencdsp_mmx.c  |  2 +-
>>>  libavcodec/x86/jpeg2000dsp_init.c   |  2 +-
>>>  libavcodec/x86/mlpdsp_init.c|  2 +-
>>>  libavcodec/x86/synth_filter_init.c  |  2 +-
>>>  libavcodec/x86/v210enc_init.c   |  2 +-
>>>  libavcodec/x86/vp9dsp_init.c|  2 +-
>>>  libavcodec/x86/vp9dsp_init_16bpp.c  |  2 +-
>>>  libavcodec/x86/vp9dsp_init_16bpp_template.c |  2 +-
>>>  libavutil/x86/float_dsp_init.c  |  2 +-
>>>  libavutil/x86/lls_init.c|  2 +-
>>>  libswresample/x86/audio_convert_init.c  |  2 +-
>>>  libswresample/x86/resample_init.c   |  2 +-
>>>  13 files changed, 22 insertions(+), 13 deletions(-)
>>
>> Ping for patchset. Would like to get it on 3.0
> 
> fate passes on linux32, 64, mingw32 and 64

Pushed to master and backported to release/3.0 branch. Thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/genh: Mark coef_splitted as av_unused

2016-02-14 Thread Michael Niedermayer
On Sun, Oct 18, 2015 at 08:42:37PM +0200, Michael Niedermayer wrote:
> From: Michael Niedermayer 
> 
> This avoid "libavformat/genh.c:43:14: warning: variable coef_splitted set but 
> not used"
> Fewer warnings makes it easier to see new and important warnings

applied

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

Democracy is the form of government in which you can choose your dictator


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/h264_cabac: Check decode_cabac_mb_mvd() for failure

2016-02-14 Thread Michael Niedermayer
On Tue, Jan 26, 2016 at 02:47:43AM +0100, Michael Niedermayer wrote:
> From: Michael Niedermayer 
> 
> Fixes harmless integer overflow
> Fixes Ticket5150
> 
> No speedloss measured, actually its slightly faster, but please benchmark & 
> double check this
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavcodec/h264_cabac.c |8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

applied

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

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- 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] doc/protocols: document protocol_whitelist

2016-02-14 Thread Michael Niedermayer
On Sat, Feb 13, 2016 at 06:01:36PM +0100, Stefano Sabatini wrote:
> On date Saturday 2016-02-13 17:01:59 +0100, Michael Niedermayer encoded:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  doc/protocols.texi |   19 +++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/doc/protocols.texi b/doc/protocols.texi
> > index 05c4bdb..41b43d4 100644
> > --- a/doc/protocols.texi
> > +++ b/doc/protocols.texi
> > @@ -1,3 +1,22 @@
> > +@chapter Protocol Options
> > +@c man begin PROTOCOL OPTIONS
> > +
> > +The libavformat library provides some generic global options, which
> > +can be set on all the protocols. In addition each protocol may support
> > +so-called private options, which are specific for that component.
> > +
> > +The list of supported options follows:
> > +
> > +@table @option
> > +@item protocol_whitelist @var{list} (@emph{input})
> > +"," separated List of allowed protocols. "ALL" matches all protocols. 
> > protocols
> 
> Nit:
> Set a ","-separated list of allowed protocols. "ALL" matches all protocols. 
> Protocols
> 
> 
> > +prefixed by "-" are disabled.
> 
> > The default is that initially all protocols are
> 
> This "initially" is confusing.
> 
> > +allowed but protocols used by a protocol are restricted to a per protocol
> > +subset.
> 
> What about:
> 
> All protocols are allowed by default but protocols used by a another
> protocol (nested protocols) are restricted to a per protocol subset.

all changed as suggested and applied

thanks


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

It is what and why we do it that matters, not just one of them.


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


[FFmpeg-devel] [PATCH] avfilter: add fieldhint filter

2016-02-14 Thread Paul B Mahol
Hi,

patch attached.
From 851f9cb101d8a23b8f35679ca83fce5a7c122101 Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Sun, 14 Feb 2016 19:02:42 +0100
Subject: [PATCH] avfilter: add fieldhint filter

Signed-off-by: Paul B Mahol 
---
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_fieldhint.c | 280 +
 3 files changed, 282 insertions(+)
 create mode 100644 libavfilter/vf_fieldhint.c

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 8916588..9120ecc 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -153,6 +153,7 @@ OBJS-$(CONFIG_EXTRACTPLANES_FILTER)  += vf_extractplanes.o
 OBJS-$(CONFIG_FADE_FILTER)   += vf_fade.o
 OBJS-$(CONFIG_FFTFILT_FILTER)+= vf_fftfilt.o
 OBJS-$(CONFIG_FIELD_FILTER)  += vf_field.o
+OBJS-$(CONFIG_FIELDHINT_FILTER)  += vf_fieldhint.o
 OBJS-$(CONFIG_FIELDMATCH_FILTER) += vf_fieldmatch.o
 OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o
 OBJS-$(CONFIG_FIND_RECT_FILTER)  += vf_find_rect.o lavfutils.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index fa7d304..0fe72d6 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -174,6 +174,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(FADE,   fade,   vf);
 REGISTER_FILTER(FFTFILT,fftfilt,vf);
 REGISTER_FILTER(FIELD,  field,  vf);
+REGISTER_FILTER(FIELDHINT,  fieldhint,  vf);
 REGISTER_FILTER(FIELDMATCH, fieldmatch, vf);
 REGISTER_FILTER(FIELDORDER, fieldorder, vf);
 REGISTER_FILTER(FIND_RECT,  find_rect,  vf);
diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c
new file mode 100644
index 000..bdba77f
--- /dev/null
+++ b/libavfilter/vf_fieldhint.c
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2016 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
+#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
+#include "avfilter.h"
+#include "internal.h"
+#include "video.h"
+
+typedef struct FieldHintContext {
+const AVClass *class;
+
+char *hint_file_str;
+FILE *hint;
+int mode;
+
+AVFrame *frame[3];
+
+int64_t line;
+int nb_planes;
+int eof;
+int planewidth[4];
+int planeheight[4];
+} FieldHintContext;
+
+#define OFFSET(x) offsetof(FieldHintContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+
+static const AVOption fieldhint_options[] = {
+{ "hint", "set hint file", OFFSET(hint_file_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
+{ "mode", "set hint mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "mode" },
+{   "absolute", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "mode" },
+{   "relative", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "mode" },
+{ NULL }
+};
+
+AVFILTER_DEFINE_CLASS(fieldhint);
+
+static av_cold int init(AVFilterContext *ctx)
+{
+FieldHintContext *s = ctx->priv;
+int ret;
+
+if (!s->hint_file_str) {
+av_log(ctx, AV_LOG_ERROR, "Hint file must be set.\n");
+return AVERROR(EINVAL);
+}
+s->hint = fopen(s->hint_file_str, "r");
+if (!s->hint) {
+ret = AVERROR(errno);
+av_log(ctx, AV_LOG_ERROR, "%s: %s\n", s->hint_file_str, av_err2str(ret));
+return ret;
+}
+
+return 0;
+}
+
+static int query_formats(AVFilterContext *ctx)
+{
+AVFilterFormats *pix_fmts = NULL;
+int fmt, ret;
+
+for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
+const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
+if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL ||
+  desc->flags & AV_PIX_FMT_FLAG_PAL ||
+  desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) &&
+(ret = ff_add_format(_fmts, fmt)) < 0)
+return ret;
+}
+
+return ff_set_common_formats(ctx, pix_fmts);
+}
+
+static int config_input(AVFilterLink *inlink)
+{
+FieldHintContext *s = inlink->dst->priv;
+const AVPixFmtDescriptor *desc = 

Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Carl Eugen Hoyos
Michael Niedermayer  niedermayer.cc> writes:

> > The following tickets are showstoppers imo:

> > #5090 and #5216
> 
> 5090 and 5216 should be fixed by:
> 0212 11:21 Rodger Combs(2.0K) └─&─&─&─&─&─>
> Re: [FFmpeg-devel] [PATCH] lavf/mov: add
> support for sidx fragment indexes
> please test and if it solves the issues, apply it

The one-liner that changes dts calculation in mov.c 
fixes neither of the tickets.

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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Michael Niedermayer
On Fri, Jan 01, 2016 at 03:19:21PM +0100, Michael Niedermayer wrote:
> Hi all
> 
> Its a while since 2.8 so unless there are objections i will make a
> 2.9 or if people prefer a 3.0 within the next month or so
> 
> Also ill likely make another round of point releases from the
> 2.8/2.7/2.6/2.5 branches soon, that is if someone wants to backport
> something or fix and backport ...

release/3.0 branch made

i will make 3.0 from, HEAD of release/3.0 in a few hours
feel free to cherry pick anything into it from master that you feel
should be in it before

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


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


Re: [FFmpeg-devel] [PATCH 2/2] x86: use the new helper macros where useful

2016-02-14 Thread James Almer
On 2/11/2016 10:09 PM, James Almer wrote:
> Signed-off-by: James Almer 
> ---
>  libavcodec/x86/hevcdsp_init.c   | 11 ++-
>  libavcodec/x86/huffyuvencdsp_mmx.c  |  2 +-
>  libavcodec/x86/jpeg2000dsp_init.c   |  2 +-
>  libavcodec/x86/mlpdsp_init.c|  2 +-
>  libavcodec/x86/synth_filter_init.c  |  2 +-
>  libavcodec/x86/v210enc_init.c   |  2 +-
>  libavcodec/x86/vp9dsp_init.c|  2 +-
>  libavcodec/x86/vp9dsp_init_16bpp.c  |  2 +-
>  libavcodec/x86/vp9dsp_init_16bpp_template.c |  2 +-
>  libavutil/x86/float_dsp_init.c  |  2 +-
>  libavutil/x86/lls_init.c|  2 +-
>  libswresample/x86/audio_convert_init.c  |  2 +-
>  libswresample/x86/resample_init.c   |  2 +-
>  13 files changed, 22 insertions(+), 13 deletions(-)

Ping for patchset. Would like to get it on 3.0
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] x86: use the new helper macros where useful

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 07:04:44PM -0300, James Almer wrote:
> On 2/11/2016 10:09 PM, James Almer wrote:
> > Signed-off-by: James Almer 
> > ---
> >  libavcodec/x86/hevcdsp_init.c   | 11 ++-
> >  libavcodec/x86/huffyuvencdsp_mmx.c  |  2 +-
> >  libavcodec/x86/jpeg2000dsp_init.c   |  2 +-
> >  libavcodec/x86/mlpdsp_init.c|  2 +-
> >  libavcodec/x86/synth_filter_init.c  |  2 +-
> >  libavcodec/x86/v210enc_init.c   |  2 +-
> >  libavcodec/x86/vp9dsp_init.c|  2 +-
> >  libavcodec/x86/vp9dsp_init_16bpp.c  |  2 +-
> >  libavcodec/x86/vp9dsp_init_16bpp_template.c |  2 +-
> >  libavutil/x86/float_dsp_init.c  |  2 +-
> >  libavutil/x86/lls_init.c|  2 +-
> >  libswresample/x86/audio_convert_init.c  |  2 +-
> >  libswresample/x86/resample_init.c   |  2 +-
> >  13 files changed, 22 insertions(+), 13 deletions(-)
> 
> Ping for patchset. Would like to get it on 3.0

fate passes on linux32, 64, mingw32 and 64

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

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 


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


Re: [FFmpeg-devel] [PATCH v2 3/3] compat/os2threads: split long lines

2016-02-14 Thread Michael Niedermayer
On Mon, Feb 15, 2016 at 12:20:35AM +0900, KO Myung-Hun wrote:
> ---
>  compat/os2threads.h | 17 -
>  1 file changed, 12 insertions(+), 5 deletions(-)

applied

thanks

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

Observe your enemies, for they first find out your faults. -- Antisthenes


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


Re: [FFmpeg-devel] [PATCH 01/12] avutil/parseutils: use microsecond precision when parsing "now" in av_parse_time()

2016-02-14 Thread Marton Balint


On Sun, 14 Feb 2016, Timothy Gu wrote:


On Sun, Feb 14, 2016 at 02:54:29AM +0100, Marton Balint wrote:


I have applied the series except the last one patching ffmpeg_opt.


This set seems to cause some issues in some FATE stations:

http://fatebeta.ffmpeg.org/report/armel5tej-qemu-debian-gcc4.4/20160214170733#failed_tests
http://fatebeta.ffmpeg.org/report/mips-ubuntu-qemu-gcc-4.4/20160214183331#failed_tests
http://fatebeta.ffmpeg.org/report/sh4-debian-qemu-gcc-4.7/20160214132808#failed_tests
http://fatebeta.ffmpeg.org/report/x86_32-linux-gnu-gcc-4.4.5/20160214082234#failed_tests
http://fatebeta.ffmpeg.org/report/x86_64-netbsd-gcc46/20160214193410#failed_tests



Yes I forgot about 32 bit time capabilities, now I have pushed the fix I 
earlier sent to the ML.


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


Re: [FFmpeg-devel] [PATCH] avformat/asfenc: write group_mutual_exclusion_objects on multiple languages

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 05:03:26AM +0100, Marton Balint wrote:
> 
> On Sun, 14 Feb 2016, Michael Niedermayer wrote:
> 
> >On Sun, Feb 07, 2016 at 11:02:56PM +0100, Marton Balint wrote:
> >>Improves streaming compatibility with Windows Media Services. Also tested 
> >>for
> >>compatilbility in Windows Media Player, Windows Media ASF Viewer and VLC.
> >>
> 
> [..]
> 
> >would this make a subtitle and a audio track exclude each other ?
> >one can want a subtitle ad audio stream of the same language as well
> >as different languages play at teh same time
> 
> You're right, on the other hand probably there won't be a proper
> default excusion policy which suits every use case.
> 
> There is another way to exclude streams, using the advanced mutual
> exclusion object which define groups from which only one of the
> streams can be selected.
> 
> I can put all audio streams into such a group, but in this case the
> exclusion type (language based) may not reflect the reality in case
> of multiple bitrates of the same language. Also AFAIK ASF can have
> multiple streams of the same type as well for fancy multi-video
> streams.
> 
> Obviously I can create an option "exclusion_policy" which controls
> the behaviour, the reason why I did not do that is because I thought
> subtitles in ASF are very rare anyway and writing language
> exclusions is usually what the user wants.
> 
> So which approach do you prefer? Adding an option for this? What
> would be the default? Or writing advanced mutual exclusion objects
> based on some other logic?

i dont know, ill leave this to you and anyone else interrested

but i think a user option cannot be the primary solution, it might
be usefull t be able to override the default though

i think this could become quite complex in involved if one tries to do
it perfectly so i also withdraw my objection to this patch

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato


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


Re: [FFmpeg-devel] [PATCH v2 1/3] compat/os2threads: Improve pthread_cond_xxx() functions

2016-02-14 Thread Michael Niedermayer
On Mon, Feb 15, 2016 at 12:20:33AM +0900, KO Myung-Hun wrote:
> 1. Manipulate waiting count in pthread_cond_wait()
> 2. Use builtin atomic functions to manipulate waiting count
> ---
>  compat/os2threads.h | 26 +++---
>  1 file changed, 15 insertions(+), 11 deletions(-)

applied

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 ..."


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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 04:04:29PM +, Carl Eugen Hoyos wrote:
> Henrik Gramner  gramner.com> writes:
> 
> > The Ubuntu 16.04 LTS feature freeze is coming up next week, 
> > so it'd be nice to have a release before that.
> 
> (I am all for it, I am not sure if it is still possible though.)
> 

> The following tickets are showstoppers imo:
> #5215

this is the result of the VBV constrains for dvds
one could try to play around with the rate control and other general
encoding parameters but its basically that I frames are bigger and
with constraint bitrate they have less space available and thus are
lower quality
this issue should be as old as MPEG itself


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire


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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 07:34:26PM +0100, Michael Niedermayer wrote:
> On Sun, Feb 14, 2016 at 04:04:29PM +, Carl Eugen Hoyos wrote:
> > Henrik Gramner  gramner.com> writes:
> > 
> > > The Ubuntu 16.04 LTS feature freeze is coming up next week, 
> > > so it'd be nice to have a release before that.
> > 
> > (I am all for it, I am not sure if it is still possible though.)
> > 
> 
> > The following tickets are showstoppers imo:
> > #5215
> 
> this is the result of the VBV constrains for dvds
> one could try to play around with the rate control and other general
> encoding parameters but its basically that I frames are bigger and
> with constraint bitrate they have less space available and thus are
> lower quality
> this issue should be as old as MPEG itself

mixed up tickets, sorry

 michaelni: wrong ticket
 michaelni: he said 5215, not 5125
 ohh ooops

[...]
-- 
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 01/12] avutil/parseutils: use microsecond precision when parsing "now" in av_parse_time()

2016-02-14 Thread Timothy Gu
On Sun, Feb 14, 2016 at 02:54:29AM +0100, Marton Balint wrote:
> 
> I have applied the series except the last one patching ffmpeg_opt.

This set seems to cause some issues in some FATE stations:

http://fatebeta.ffmpeg.org/report/armel5tej-qemu-debian-gcc4.4/20160214170733#failed_tests
http://fatebeta.ffmpeg.org/report/mips-ubuntu-qemu-gcc-4.4/20160214183331#failed_tests
http://fatebeta.ffmpeg.org/report/sh4-debian-qemu-gcc-4.7/20160214132808#failed_tests
http://fatebeta.ffmpeg.org/report/x86_32-linux-gnu-gcc-4.4.5/20160214082234#failed_tests
http://fatebeta.ffmpeg.org/report/x86_64-netbsd-gcc46/20160214193410#failed_tests

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


Re: [FFmpeg-devel] [PATCH] x86/vc1dsp: Port vc1_*_hor_16b_shift2 to NASM format

2016-02-14 Thread Timothy Gu
On Sun, Feb 14, 2016 at 01:21:57PM +0100, Christophe Gisquet wrote:
> Hi,
> 
> 2016-02-14 6:49 GMT+01:00 Timothy Gu :
> >  %if HAVE_MMX_INLINE
> 
> Isn't that macro meant for C code (and in config.asm without much of a
> purpose)?

Yes, but this code isn't used unless inline asm is enabled so I don't want to
fill the binary up with bloat.

> >  ; Compute the rounder 32-r or 8-r and unpacks it to m7
> >  %macro LOAD_ROUNDER_MMX 1 ; round
> > -movd  m7, %1
> > +movh  m7, %1
> 
> Same here: until there's a SSE2 version for some of those functions,
> which will require specific code (like a shufps), that's unrelated.

Okay, removed.

> 
> > +cglobal vc1_%2_hor_16b_shift2, 4, 5, 0, dst, stride, src, rnd, h
> 
> Do you intend to port more?

Yes, when I get the time.

> Because in that case, having a SSE2
> version of this one would be possible.
> And the wider version would be straightforward in SSE2.
> And that would allow you to put at last a (c) in this code you've
> spent so much time with.

I do intend on writing a SSE2 version but I'd rather port them all first.

> 
> Otherwise looks OK, but I haven't tested.

FATE passes, so pushed.

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


[FFmpeg-devel] [PATCH] avcodec/cfhd: clear idwt_buf on allocation

2016-02-14 Thread Michael Niedermayer
This avoids use of uninitialized variables and might make bugs in general
easier to reproduce

Signed-off-by: Michael Niedermayer 
---
 libavcodec/cfhd.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 5c15d9b..d8e183b 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -176,7 +176,7 @@ static int alloc_buffers(AVCodecContext *avctx)
 w2 = w4 * 2;
 h2 = h4 * 2;
 
-s->plane[i].idwt_buf = av_malloc_array(height * stride, 
sizeof(*s->plane[i].idwt_buf));
+s->plane[i].idwt_buf = av_mallocz_array(height * stride, 
sizeof(*s->plane[i].idwt_buf));
 s->plane[i].idwt_tmp = av_malloc_array(height * stride, 
sizeof(*s->plane[i].idwt_tmp));
 if (!s->plane[i].idwt_buf || !s->plane[i].idwt_tmp) {
 return AVERROR(ENOMEM);
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH] avcodec/cfhd: mark as experimental, there are some unsolved crashes

2016-02-14 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavcodec/cfhd.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 5c15d9b..97da320 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -756,6 +756,6 @@ AVCodec ff_cfhd_decoder = {
 .init   = cfhd_decode_init,
 .close  = cfhd_close_decoder,
 .decode = cfhd_decode,
-.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
+.capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | 
AV_CODEC_CAP_EXPERIMENTAL,
 .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
 };
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] avcodec: only warn about hwaccel with frame threads

2016-02-14 Thread Michael Niedermayer
On Sat, Jan 23, 2016 at 10:12:30AM +0100, Andreas Cadhalpun wrote:
> VLC uses hwaccel with frame threads and it works fine, but returning
> an error here made it fail.
> 
> This regression was introduced in commit 31741ae.
> 
> Signed-off-by: Andreas Cadhalpun 
> ---
>  libavcodec/utils.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

applied with updated warning message suggested by nevcairiel

thanks

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

What does censorship reveal? It reveals fear. -- Julian Assange


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


Re: [FFmpeg-devel] Fwd: Fwd: libavformat/segment : add option to increment timecode

2016-02-14 Thread Martin Vignali
2016-02-14 14:10 GMT+01:00 Stefano Sabatini :

> On date Saturday 2016-02-13 22:00:27 +0100, Martin Vignali encoded:
> [...]
> > From 8395ed7c66327f754e656622bacb5c2dd91d00ca Mon Sep 17 00:00:00 2001
> > From: Martin Vignali 
> > Date: Sat, 13 Feb 2016 21:46:38 +0100
> > Subject: [PATCH] lavf/segment: add increment timecode option
> >
> > for example you can split a file, keeping a continuous timecode between
> > each segment :
> >
> > ffmpeg -i src.mov -timecode 10:00:00:00 -vcodec copy -f segment \
> > -segment_time 2 -reset_timestamps 1 -increment_tc 1 target_%03d.mov
> > ---
> >  doc/muxers.texi   |  7 +++
> >  libavformat/segment.c | 28 
> >  2 files changed, 35 insertions(+)
> >
> > diff --git a/doc/muxers.texi b/doc/muxers.texi
> > index 2e6bb4c..21f3525 100644
> > --- a/doc/muxers.texi
> > +++ b/doc/muxers.texi
> > @@ -1017,6 +1017,13 @@ implementation for HLS segmentation.
> >  The segment muxer supports the following options:
> >
> >  @table @option
> > +
> > +@item increment_tc @var{1|0}
> > +if set to @code{1}, increment timecode between each segment
> > +If this is selected, the input need to have
> > +a timecode in the first video stream. Default value is
> > +@code{0}.
> > +
> >  @item reference_stream @var{specifier}
> >  Set the reference stream, as specified by the string @var{specifier}.
> >  If @var{specifier} is set to @code{auto}, the reference is chosen
> > diff --git a/libavformat/segment.c b/libavformat/segment.c
> > index dd3b092..fc997cc 100644
> > --- a/libavformat/segment.c
> > +++ b/libavformat/segment.c
> > @@ -41,6 +41,7 @@
> >  #include "libavutil/parseutils.h"
> >  #include "libavutil/mathematics.h"
> >  #include "libavutil/time.h"
> > +#include "libavutil/timecode.h"
> >  #include "libavutil/time_internal.h"
> >  #include "libavutil/timestamp.h"
> >
> > @@ -95,6 +96,7 @@ typedef struct SegmentContext {
> >  char *time_str;///< segment duration specification string
> >  int64_t time;  ///< segment duration
> >  int use_strftime;  ///< flag to expand filename with strftime
> > +int increment_tc;  ///< flag to increment timecode if found
> >
> >  char *times_str;   ///< segment times specification string
> >  int64_t *times;///< list of segment interval specification
> > @@ -227,6 +229,31 @@ static int segment_start(AVFormatContext *s, int
> write_header)
> >  SegmentContext *seg = s->priv_data;
> >  AVFormatContext *oc = seg->avf;
> >  int err = 0;
> > +AVTimecode tc;
> > +AVRational rate;
> > +int i;
> > +
> > +if (seg->increment_tc) {
> > +AVDictionaryEntry *tcr = av_dict_get(s->metadata, "timecode",
> NULL, 0);
> > +if (tcr) {
> > +/* search the first video stream */
> > +for (i = 0; i < s->nb_streams; i++) {
> > +if (s->streams[i]->codec->codec_type ==
> AVMEDIA_TYPE_VIDEO) {
> > +rate = s->streams[i]->avg_frame_rate;/* Get fps
> from the video stream */
> > +err = av_timecode_init_from_string(, rate,
> tcr->value, s);
> > +if (err < 0)
> > +return err;
> > +tc.start += (int)
> av_q2d(av_mul_q(av_make_q(seg->time, 100 ), rate));/* increment
> timecode */
>
> > +char buf[AV_TIMECODE_STR_SIZE];
>
> This will create compilation warnings/failures since it's not C90
> style, put the declaration at the beginning of the block
>
> > +av_dict_set(>metadata, "timecode",
> > +av_timecode_make_string(, buf, 0),
> 0);
> > +break;
> > +}
> > +}
> > +} else {
> > +av_log(s, AV_LOG_WARNING, "Could not increment timecode, no
> timecode metadata found");
> > +}
> > +}
> >
> >  if (write_header) {
> >  avformat_free_context(oc);
> > @@ -948,6 +975,7 @@ static const AVOption options[] = {
> >  { "segment_start_number", "set the sequence number of the first
> segment", OFFSET(segment_idx), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E },
> >  { "segment_wrap_number", "set the number of wrap before the first
> segment", OFFSET(segment_idx_wrap_nb), AV_OPT_TYPE_INT, {.i64 = 0}, 0,
> INT_MAX, E },
> >  { "strftime",  "set filename expansion with strftime at
> segment creation", OFFSET(use_strftime), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0,
> 1, E },
> > +{ "increment_tc", "increment timecode between each segment",
> OFFSET(increment_tc), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, E },
> >  { "break_non_keyframes", "allow breaking segments on
> non-keyframes", OFFSET(break_non_keyframes), AV_OPT_TYPE_BOOL, {.i64 = 0},
> 0, 1, E },
>
> LGTM otherwise if tested, thanks.
> --
> FFmpeg = Fundamental and Fascinating Majestic Plastic Extended Guru
> ___
> 

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 04:25 PM, Michael Niedermayer wrote:

This was suggested by wm4 and stefano.
After this patch using align=1 the size used by various functions would not
contain padding, while the palette would be aligned at align>1

This patch makes it required to use align>=4 if the palette is to be accessed
as uint32



A "minimum" alignment of 4? I thought 4 was fixed.

Maats

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


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_get_buffer_size(): do not insert padding between stride*height and palette

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 02:00:24PM +0100, Stefano Sabatini wrote:
> On date Saturday 2016-02-13 23:08:50 +0100, wm4 encoded:
> > On Sat, 13 Feb 2016 21:51:48 +0100
> > Michael Niedermayer  wrote:
> > 
> > > On Sat, Feb 13, 2016 at 08:46:34PM +0100, wm4 wrote:
> > > > On Sat, 13 Feb 2016 19:38:01 +0100
> > > > Michael Niedermayer  wrote:
> > > >   
> > > > > This fixes the layout that is stored in pal8 nut with odd width*height
> > > > > 
> > > > > Signed-off-by: Michael Niedermayer 
> > > > > ---
> > > > >  libavcodec/avpicture.c |2 ++
> > > > >  libavutil/imgutils.c   |4 
> > > > >  2 files changed, 6 insertions(+)
> > > > > 
> > > > > diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c
> > > > > index 56435f4..cac9287 100644
> > > > > --- a/libavcodec/avpicture.c
> > > > > +++ b/libavcodec/avpicture.c
> > > > > @@ -51,6 +51,8 @@ int avpicture_layout(const AVPicture* src, enum 
> > > > > AVPixelFormat pix_fmt, int width
> > > > >  
> > > > >  int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int 
> > > > > height)
> > > > >  {
> > > > > +if (pix_fmt == AV_PIX_FMT_PAL8)
> > > > > +return FFALIGN(width*height, 4) + 1024;
> > > > >  return av_image_get_buffer_size(pix_fmt, width, height, 1);
> > > > >  }
> > > > >  
> > > > > diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
> > > > > index adf6fdd..976bd23 100644
> > > > > --- a/libavutil/imgutils.c
> > > > > +++ b/libavutil/imgutils.c
> > > > > @@ -372,6 +372,10 @@ int av_image_get_buffer_size(enum AVPixelFormat 
> > > > > pix_fmt,
> > > > >  if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
> > > > >  return FFALIGN(width, align) * height;
> > > > >  
> > > > > +// For paletted images we do not align the palette as in AVFrames
> > > > > +if (desc->flags & AV_PIX_FMT_FLAG_PAL)
> > > > > +return FFALIGN(width, align) * height + 1024;
> > > > > +
> > > > >  return av_image_fill_arrays(data, linesize, NULL, pix_fmt,
> > > > >  width, height, align);
> > > > >  }  
> > > > 
> > > > It seems wrong to litter the code with specific checks for an obscure
> > > > pixel format, and change behavior, just to make these function's
> > > > behavior line up with what NUT needs?  
> > > 
> > > I think my commit message was poorly worded
> > > 
> > > we need to either fix the code or fix/clarify the documentation
> > > 
> > > av_image_get_buffer_size() is documented as
> > > 
> > >  * Return the size in bytes of the amount of data required to store an
> > >  * image with the given parameters.
> > > 
> > > it does not do this, after the patch it does.
> > > 
> > > the docs could be changed to something like:
> > > 
> > >  * Return the size in bytes of the amount of data required to store an
> > >  * image with the given parameters. Except for PAL8 where the size is
> > >  * rounded up to the next multiple of 4 even if the user asks for
> > >  * less alignment
> > > 
> > > and likely there are other ways it could be documented
> > 
> > Why 4?
> > 
> > Also, why do av_image_get_buffer_size() and avpicture_get_size() do
> > different things?
> 

> > I'd totally expect each line _and_ the start of the palette to be
> > aligned to the requested slignment.
> 
> It's what I would expect as well. 

Ive posted a patch that does this


> 
> The plan was to drop the avpicture_ API I think, so we should not add
> inconsistencies.

the align expectation you wrote above also affects avpicture_*
the fix for it for the new API also changes the behavior of
avpicture_* as it uses the new API
If we want to fix any bugs in the new API we either have to accept
that the avpicture_* code will also slightly change in behavior or
we would need special cases to keep it behaving the same

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


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


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 04:28 PM, Mats Peterson wrote:

On 02/14/2016 04:25 PM, Michael Niedermayer wrote:

As a side-effect It fixes storing pal8 in nut with odd with


  It worked fine before this patch (palette starting at a 4-byte boundary).



OK, sorry, I get it.

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] lavf/mpjpeg: Trim quotes on MIME boundary, if present.

2016-02-14 Thread Michael Niedermayer
On Sat, Feb 13, 2016 at 11:47:20PM -0500, Alexander Agranovsky wrote:
> 

>  mpjpegdec.c |7 +++
>  1 file changed, 7 insertions(+)
> 7be9bc0f4e4e369bc7bf45dd1ce8a3b97e960f4e  
> 0001-lavf-mpjpeg-Trim-quotes-on-MIME-boundary-if-present.patch
> From f2d8bc033cc6ab6e9a42472c99bdfce8305a13db Mon Sep 17 00:00:00 2001
> From: Alex Agranovsky 
> Date: Fri, 12 Feb 2016 12:59:29 -0500
> Subject: [PATCH 1/3] lavf/mpjpeg: Trim quotes on MIME boundary, if present.
> 
> Fixes 5023
> 
> Signed-off-by: Alex Agranovsky 
> ---
>  libavformat/mpjpegdec.c | 7 +++
>  1 file changed, 7 insertions(+)

applied

thanks

[...]

-- 
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] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (v2)

2016-02-14 Thread Christophe Gisquet
Hi,

2016-02-14 0:43 GMT+01:00 Michael Niedermayer :
> i can test and commit the code, it seems everyone who wanted to
> comment did comment

Yes, nothing really worth postponing the patchset from my side, except
maybe cleaner splitting of the bypass stuff, as agreed by the author.
I don't mind if the other various "topics" are merged into a single
patch, otherwise.

> what parts are left ?

"cosmetics"
"operations simplification" (!!stuff)
"significance map decoding improvements"

"bypass decoding improvements"

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


[FFmpeg-devel] [PATCH] avutil/parseutils: remove 2112 date from fate test

2016-02-14 Thread Marton Balint
It is not supported on 32bit.

Signed-off-by: Marton Balint 
---
 libavutil/parseutils.c| 2 +-
 tests/ref/fate/parseutils | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c
index 16c8b6a..0097bec 100644
--- a/libavutil/parseutils.c
+++ b/libavutil/parseutils.c
@@ -888,7 +888,7 @@ int main(void)
 "2012 - 02-22  17:44:07",
 "2000-12-20T010247.6",
 "2000-12-12 1:35:46+05:30",
-"2112-12-12 22:30:40-02",
+"2002-12-12 22:30:40-02",
 };
 static const char * const duration_string[] = {
 "2:34:56.79",
diff --git a/tests/ref/fate/parseutils b/tests/ref/fate/parseutils
index e9855ce..3306229 100644
--- a/tests/ref/fate/parseutils
+++ b/tests/ref/fate/parseutils
@@ -77,7 +77,7 @@ now  -> 1331972053.20 = 
2012-03-17T08:14:13Z
 2012 - 02-22  17:44:07   -> 1329929047.00 = 2012-02-22T16:44:07Z
 2000-12-20T010247.6  ->  977270567.60 = 2000-12-20T00:02:47Z
 2000-12-12 1:35:46+05:30 ->  976565146.00 = 2000-12-11T20:05:46Z
-2112-12-12 22:30:40-02   -> 4511032240.00 = 2112-12-13T00:30:40Z
+2002-12-12 22:30:40-02   -> 1039739440.00 = 2002-12-13T00:30:40Z
 2:34:56.79   ->   +929679
 -1:23:45.67  ->   -502567
 42.1729  -> +42172900
-- 
2.6.2

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


Re: [FFmpeg-devel] Fwd: Fwd: libavformat/segment : add option to increment timecode

2016-02-14 Thread Stefano Sabatini
On date Saturday 2016-02-13 22:00:27 +0100, Martin Vignali encoded:
[...]
> From 8395ed7c66327f754e656622bacb5c2dd91d00ca Mon Sep 17 00:00:00 2001
> From: Martin Vignali 
> Date: Sat, 13 Feb 2016 21:46:38 +0100
> Subject: [PATCH] lavf/segment: add increment timecode option
> 
> for example you can split a file, keeping a continuous timecode between
> each segment :
> 
> ffmpeg -i src.mov -timecode 10:00:00:00 -vcodec copy -f segment \
> -segment_time 2 -reset_timestamps 1 -increment_tc 1 target_%03d.mov
> ---
>  doc/muxers.texi   |  7 +++
>  libavformat/segment.c | 28 
>  2 files changed, 35 insertions(+)
> 
> diff --git a/doc/muxers.texi b/doc/muxers.texi
> index 2e6bb4c..21f3525 100644
> --- a/doc/muxers.texi
> +++ b/doc/muxers.texi
> @@ -1017,6 +1017,13 @@ implementation for HLS segmentation.
>  The segment muxer supports the following options:
>  
>  @table @option
> +
> +@item increment_tc @var{1|0}
> +if set to @code{1}, increment timecode between each segment
> +If this is selected, the input need to have
> +a timecode in the first video stream. Default value is
> +@code{0}.
> +
>  @item reference_stream @var{specifier}
>  Set the reference stream, as specified by the string @var{specifier}.
>  If @var{specifier} is set to @code{auto}, the reference is chosen
> diff --git a/libavformat/segment.c b/libavformat/segment.c
> index dd3b092..fc997cc 100644
> --- a/libavformat/segment.c
> +++ b/libavformat/segment.c
> @@ -41,6 +41,7 @@
>  #include "libavutil/parseutils.h"
>  #include "libavutil/mathematics.h"
>  #include "libavutil/time.h"
> +#include "libavutil/timecode.h"
>  #include "libavutil/time_internal.h"
>  #include "libavutil/timestamp.h"
>  
> @@ -95,6 +96,7 @@ typedef struct SegmentContext {
>  char *time_str;///< segment duration specification string
>  int64_t time;  ///< segment duration
>  int use_strftime;  ///< flag to expand filename with strftime
> +int increment_tc;  ///< flag to increment timecode if found
>  
>  char *times_str;   ///< segment times specification string
>  int64_t *times;///< list of segment interval specification
> @@ -227,6 +229,31 @@ static int segment_start(AVFormatContext *s, int 
> write_header)
>  SegmentContext *seg = s->priv_data;
>  AVFormatContext *oc = seg->avf;
>  int err = 0;
> +AVTimecode tc;
> +AVRational rate;
> +int i;
> +
> +if (seg->increment_tc) {
> +AVDictionaryEntry *tcr = av_dict_get(s->metadata, "timecode", NULL, 
> 0);
> +if (tcr) {
> +/* search the first video stream */
> +for (i = 0; i < s->nb_streams; i++) {
> +if (s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
> +rate = s->streams[i]->avg_frame_rate;/* Get fps from the 
> video stream */
> +err = av_timecode_init_from_string(, rate, 
> tcr->value, s);
> +if (err < 0)
> +return err;
> +tc.start += (int) av_q2d(av_mul_q(av_make_q(seg->time, 
> 100 ), rate));/* increment timecode */

> +char buf[AV_TIMECODE_STR_SIZE];

This will create compilation warnings/failures since it's not C90
style, put the declaration at the beginning of the block

> +av_dict_set(>metadata, "timecode",
> +av_timecode_make_string(, buf, 0), 0);
> +break;
> +}
> +}
> +} else {
> +av_log(s, AV_LOG_WARNING, "Could not increment timecode, no 
> timecode metadata found");
> +}
> +}
>  
>  if (write_header) {
>  avformat_free_context(oc);
> @@ -948,6 +975,7 @@ static const AVOption options[] = {
>  { "segment_start_number", "set the sequence number of the first 
> segment", OFFSET(segment_idx), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E },
>  { "segment_wrap_number", "set the number of wrap before the first 
> segment", OFFSET(segment_idx_wrap_nb), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 
> INT_MAX, E },
>  { "strftime",  "set filename expansion with strftime at segment 
> creation", OFFSET(use_strftime), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E },
> +{ "increment_tc", "increment timecode between each segment", 
> OFFSET(increment_tc), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, E },
>  { "break_non_keyframes", "allow breaking segments on non-keyframes", 
> OFFSET(break_non_keyframes), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, E },

LGTM otherwise if tested, thanks.
-- 
FFmpeg = Fundamental and Fascinating Majestic Plastic Extended Guru
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] x86/vf_blend: Add SSE2 optimization for divide

2016-02-14 Thread Henrik Gramner
You could try doing 8 or 16 bytes per iteration instead of 4, it might
be faster depending on how good your cpu is at OOE.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavc/rawdec: Retrieve nut palette from packet data

2016-02-14 Thread Mats Peterson
Since a new frame is created due to the line alignment requirement of 16 
bytes, the nut palette has to be retrieved from the packet data.


Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From d8687d9a6db9630876619e802086c78d82f5c661 Mon Sep 17 00:00:00 2001
From: Mats Peterson 
Date: Sun, 14 Feb 2016 15:41:06 +0100
Subject: [PATCH] lavc/rawdec: Retrieve nut palette from packets

---
 libavcodec/rawdec.c |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 287be96..34ee65c 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -384,7 +384,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
 const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE,
  NULL);
-
 if (pal) {
 av_buffer_unref(>palette);
 context->palette = av_buffer_alloc(AVPALETTE_SIZE);
@@ -394,6 +393,14 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 }
 memcpy(context->palette->data, pal, AVPALETTE_SIZE);
 frame->palette_has_changed = 1;
+} else if (context->is_nut_pal8) {
+int vid_size = avctx->width * avctx->height;
+vid_size = (vid_size + 3) & ~3;
+if (avpkt->size - vid_size) {
+pal = avpkt->data + vid_size;
+memcpy(context->palette->data, pal, avpkt->size - vid_size);
+frame->palette_has_changed = 1;
+}
 }
 }
 
-- 
1.7.10.4

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


Re: [FFmpeg-devel] [PATCH] avcodec: Remove libutvideo support

2016-02-14 Thread Carl Eugen Hoyos
Paul B Mahol  gmail.com> writes:

> Because there is not more maintainer for this, I will 
> push this very soon.

I will try to maintain it for the foreseeable future.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] avcodec: Remove libutvideo support

2016-02-14 Thread James Almer
On 2/14/2016 11:53 AM, Carl Eugen Hoyos wrote:
> Paul B Mahol  gmail.com> writes:
> 
>> Because there is not more maintainer for this, I will 
>> push this very soon.
> 
> I will try to maintain it for the foreseeable future.
> 
> Carl Eugen

How do you plan to get around the fact the only working version of this
library is an obscure outdated fork that doesn't even compile on most
OSes, and that so far the only person to claim being able to compile at
all was you?

You say you're going to "maintain" it, which to me sounds like you just
added your name to this file in order to have an argument against removal,
unless you commit the needed changes to our wrapper and/or to a widely
available and maintained libutvideo repo to keep everything working on
every OS as it's intended to.
Otherwise things will remain as broken as always, but under a new name,
meaning all of Derek's arguments in favor or removing it are still valid.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Michael Niedermayer
This was suggested by wm4 and stefano.
After this patch using align=1 the size used by various functions would not
contain padding, while the palette would be aligned at align>1

This patch makes it required to use align>=4 if the palette is to be accessed
as uint32

As a side-effect It fixes storing pal8 in nut with odd with

Signed-off-by: Michael Niedermayer 
---
 libavutil/imgutils.c |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index adf6fdd..2f72ed7 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -125,7 +125,6 @@ int av_image_fill_pointers(uint8_t *data[4], enum 
AVPixelFormat pix_fmt, int hei
 
 if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
 desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
-size[0] = (size[0] + 3) & ~3;
 data[1] = ptr + size[0]; /* palette is stored here as 256 32 bits 
words */
 return size[0] + 256 * 4;
 }
@@ -216,8 +215,13 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
 av_free(buf);
 return ret;
 }
-if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
AV_PIX_FMT_FLAG_PSEUDOPAL)
+if (desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & 
AV_PIX_FMT_FLAG_PSEUDOPAL) {
 avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
+if (align < 4) {
+av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a 
minimum alignment of 4\n");
+return AVERROR(EINVAL);
+}
+}
 
 if ((desc->flags & AV_PIX_FMT_FLAG_PAL ||
  desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) &&
@@ -409,10 +413,7 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
 }
 
 if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
-uint32_t *d32 = (uint32_t *)(((size_t)dst + 3) & ~3);
-
-if (dst_size - 1024 < (uint8_t*)d32 - orig_dst)
-d32 = (uint32_t *)dst;
+uint32_t *d32 = (uint32_t *)dst;
 
 for (i = 0; i<256; i++)
 AV_WL32(d32 + i, AV_RN32(src_data[1] + 4*i));
-- 
1.7.9.5

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


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 04:25 PM, Michael Niedermayer wrote:

As a side-effect It fixes storing pal8 in nut with odd with


 It worked fine before this patch (palette starting at a 4-byte boundary).

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


Re: [FFmpeg-devel] [PATCH] x86/vc1dsp: Port vc1_*_hor_16b_shift2 to NASM format

2016-02-14 Thread Christophe Gisquet
Hi,

2016-02-14 6:49 GMT+01:00 Timothy Gu :
>  %if HAVE_MMX_INLINE

Isn't that macro meant for C code (and in config.asm without much of a purpose)?

I suspect it is not useful, but I haven't dug into that.

> +; XXX some of these macros are not used right now, but they will in the 
> future
> +; when more functions are ported.

I would still recommend only porting the ones needed in this commit,
but I'm not going to bother you further with this.

>  ; Compute the rounder 32-r or 8-r and unpacks it to m7
>  %macro LOAD_ROUNDER_MMX 1 ; round
> -movd  m7, %1
> +movh  m7, %1

Same here: until there's a SSE2 version for some of those functions,
which will require specific code (like a shufps), that's unrelated.

> +cglobal vc1_%2_hor_16b_shift2, 4, 5, 0, dst, stride, src, rnd, h

Do you intend to port more? Because in that case, having a SSE2
version of this one would be possible.
And the wider version would be straightforward in SSE2.
And that would allow you to put at last a (c) in this code you've
spent so much time with.

Otherwise looks OK, but I haven't tested.

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


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_get_buffer_size(): do not insert padding between stride*height and palette

2016-02-14 Thread Stefano Sabatini
On date Saturday 2016-02-13 23:08:50 +0100, wm4 encoded:
> On Sat, 13 Feb 2016 21:51:48 +0100
> Michael Niedermayer  wrote:
> 
> > On Sat, Feb 13, 2016 at 08:46:34PM +0100, wm4 wrote:
> > > On Sat, 13 Feb 2016 19:38:01 +0100
> > > Michael Niedermayer  wrote:
> > >   
> > > > This fixes the layout that is stored in pal8 nut with odd width*height
> > > > 
> > > > Signed-off-by: Michael Niedermayer 
> > > > ---
> > > >  libavcodec/avpicture.c |2 ++
> > > >  libavutil/imgutils.c   |4 
> > > >  2 files changed, 6 insertions(+)
> > > > 
> > > > diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c
> > > > index 56435f4..cac9287 100644
> > > > --- a/libavcodec/avpicture.c
> > > > +++ b/libavcodec/avpicture.c
> > > > @@ -51,6 +51,8 @@ int avpicture_layout(const AVPicture* src, enum 
> > > > AVPixelFormat pix_fmt, int width
> > > >  
> > > >  int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int 
> > > > height)
> > > >  {
> > > > +if (pix_fmt == AV_PIX_FMT_PAL8)
> > > > +return FFALIGN(width*height, 4) + 1024;
> > > >  return av_image_get_buffer_size(pix_fmt, width, height, 1);
> > > >  }
> > > >  
> > > > diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
> > > > index adf6fdd..976bd23 100644
> > > > --- a/libavutil/imgutils.c
> > > > +++ b/libavutil/imgutils.c
> > > > @@ -372,6 +372,10 @@ int av_image_get_buffer_size(enum AVPixelFormat 
> > > > pix_fmt,
> > > >  if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
> > > >  return FFALIGN(width, align) * height;
> > > >  
> > > > +// For paletted images we do not align the palette as in AVFrames
> > > > +if (desc->flags & AV_PIX_FMT_FLAG_PAL)
> > > > +return FFALIGN(width, align) * height + 1024;
> > > > +
> > > >  return av_image_fill_arrays(data, linesize, NULL, pix_fmt,
> > > >  width, height, align);
> > > >  }  
> > > 
> > > It seems wrong to litter the code with specific checks for an obscure
> > > pixel format, and change behavior, just to make these function's
> > > behavior line up with what NUT needs?  
> > 
> > I think my commit message was poorly worded
> > 
> > we need to either fix the code or fix/clarify the documentation
> > 
> > av_image_get_buffer_size() is documented as
> > 
> >  * Return the size in bytes of the amount of data required to store an
> >  * image with the given parameters.
> > 
> > it does not do this, after the patch it does.
> > 
> > the docs could be changed to something like:
> > 
> >  * Return the size in bytes of the amount of data required to store an
> >  * image with the given parameters. Except for PAL8 where the size is
> >  * rounded up to the next multiple of 4 even if the user asks for
> >  * less alignment
> > 
> > and likely there are other ways it could be documented
> 
> Why 4?
> 
> Also, why do av_image_get_buffer_size() and avpicture_get_size() do
> different things?

> I'd totally expect each line _and_ the start of the palette to be
> aligned to the requested slignment.

It's what I would expect as well. 

The plan was to drop the avpicture_ API I think, so we should not add
inconsistencies.

> > 
> > > 
> > > It's also possible that this is actually what the API user wants; there
> > > are many implications.  
> > 
> > yes, that is possible, should i add a av_image_get_buffer_size2() ?
> 
> Either that or a minor bump and a warning in APIchanges, depending on
> how this plays out.
> 
> > but iam not sure what use av_image_get_buffer_size() has then
> > in its current form
> > its not the AVFrame required size and its not the storage size in
> > any container (for all pixel formats) i think, either would have
> > exceptions
> 
> Maybe one could argue that it shouldn't include the palette? It's kind
> of a special case, and many uses do not store the palette directly along
> with the image data, but somewhere else.
> 
> > 
> > > 
> > > Also, is this consistent with av_image_fill_arrays etc.?  
> > 
> > no, and that also was not teh case before the patch. for example
> > av_image_fill_arrays() sets pointers up for pseudopal formats
> > that would be outside the array space given from
> > av_image_get_buffer_size()
> 
> I thought these functions build on each other: one to get the buffer
> size, and another one to get the offsets into the buffer. Does it make
> sense that they are not consistent?
> 
> > 

> > maybe stefano could comment as i think he wrote a lot of this

The av_image_* API was a port of the avpicture_* API, trying to remove
special cases of the imgconvert code and relying on the generic
pixdesc struct information.

It simplified the code (no need to update N places when a new format
was added) and allowed to specify the alignment value, which is
assumed for each line (and by extension for the palette, since it
resides in the data array).

Now, should we consider the palette buffer part of the buffer used to
store 

Re: [FFmpeg-devel] [PATCH] avcodec: Remove libutvideo support

2016-02-14 Thread Paul B Mahol
On 2/10/16, Derek Buitenhuis  wrote:
> * Upstream libutvideo doesn't build as a lib, and Linux is not supported.
>   It has no API.
> * The fork that was used as an argument to keep support is *also* broken and
>   unmaintained now, and it's maintainer/author is fine with removal.
> * A third fork on github, *also* doesn't work.
> * The only working library that I can find is a package for an obscure
> distro,
>   in German only, with a bunch of patches applied.
> * The ASM in libutvideo doesn't even work on x86_64.
> * More, I'm sure others can fill in.
>
> Signed-off-by: Derek Buitenhuis 
> ---
>  Changelog|   1 +
>  LICENSE.md   |   3 -
>  MAINTAINERS  |   1 -
>  configure|   6 -
>  libavcodec/Makefile  |   3 -
>  libavcodec/allcodecs.c   |   1 -
>  libavcodec/libutvideo.h  |  72 ---
>  libavcodec/libutvideodec.cpp | 272
> -
>  libavcodec/libutvideoenc.cpp | 281
> ---
>  libavcodec/version.h |   4 +-
>  10 files changed, 3 insertions(+), 641 deletions(-)
>  delete mode 100644 libavcodec/libutvideo.h
>  delete mode 100644 libavcodec/libutvideodec.cpp
>  delete mode 100644 libavcodec/libutvideoenc.cpp
>

Because there is not more maintainer for this, I will push this very soon.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2 2/3] compat/os2threads: support the return value of joined thread

2016-02-14 Thread KO Myung-Hun
---
 compat/os2threads.h | 39 ++-
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/compat/os2threads.h b/compat/os2threads.h
index 12cb7b0..3b289df 100644
--- a/compat/os2threads.h
+++ b/compat/os2threads.h
@@ -35,9 +35,15 @@
 #include 
 #include 
 
-#include "libavutil/mem.h"
+#include "libavutil/attributes.h"
+
+typedef struct {
+TID tid;
+void *(*start_routine)(void *);
+void *arg;
+void *result;
+} pthread_t;
 
-typedef TID  pthread_t;
 typedef void pthread_attr_t;
 
 typedef HMTX pthread_mutex_t;
@@ -58,39 +64,30 @@ typedef struct {
 
 #define PTHREAD_ONCE_INIT {0, _FMUTEX_INITIALIZER}
 
-struct thread_arg {
-void *(*start_routine)(void *);
-void *arg;
-};
-
 static void thread_entry(void *arg)
 {
-struct thread_arg *thread_arg = arg;
-
-thread_arg->start_routine(thread_arg->arg);
+pthread_t *thread = arg;
 
-av_free(thread_arg);
+thread->result = thread->start_routine(thread->arg);
 }
 
 static av_always_inline int pthread_create(pthread_t *thread, const 
pthread_attr_t *attr, void *(*start_routine)(void*), void *arg)
 {
-struct thread_arg *thread_arg;
-
-thread_arg = av_mallocz(sizeof(struct thread_arg));
-if (!thread_arg)
-return ENOMEM;
+thread->start_routine = start_routine;
+thread->arg = arg;
+thread->result = NULL;
 
-thread_arg->start_routine = start_routine;
-thread_arg->arg = arg;
-
-*thread = _beginthread(thread_entry, NULL, 256 * 1024, thread_arg);
+thread->tid = _beginthread(thread_entry, NULL, 1024 * 1024, thread);
 
 return 0;
 }
 
 static av_always_inline int pthread_join(pthread_t thread, void **value_ptr)
 {
-DosWaitThread((PTID), DCWW_WAIT);
+DosWaitThread(, DCWW_WAIT);
+
+if (value_ptr)
+*value_ptr = thread.result;
 
 return 0;
 }
-- 
2.7.0

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


Re: [FFmpeg-devel] [PATCH] avcodec: Remove libutvideo support

2016-02-14 Thread Carl Eugen Hoyos
James Almer  gmail.com> writes:

> How do you plan to get around the fact the only working 
> version of this library is an obscure outdated fork that 
> doesn't even compile on most OSes

I am sorry, I did not realize this:
On which system does it not compile?

Carl Eugen

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


[FFmpeg-devel] [PATCH v2 3/3] compat/os2threads: split long lines

2016-02-14 Thread KO Myung-Hun
---
 compat/os2threads.h | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/compat/os2threads.h b/compat/os2threads.h
index 3b289df..40a119f 100644
--- a/compat/os2threads.h
+++ b/compat/os2threads.h
@@ -71,7 +71,10 @@ static void thread_entry(void *arg)
 thread->result = thread->start_routine(thread->arg);
 }
 
-static av_always_inline int pthread_create(pthread_t *thread, const 
pthread_attr_t *attr, void *(*start_routine)(void*), void *arg)
+static av_always_inline int pthread_create(pthread_t *thread,
+   const pthread_attr_t *attr,
+   void *(*start_routine)(void*),
+   void *arg)
 {
 thread->start_routine = start_routine;
 thread->arg = arg;
@@ -92,7 +95,8 @@ static av_always_inline int pthread_join(pthread_t thread, 
void **value_ptr)
 return 0;
 }
 
-static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const 
pthread_mutexattr_t *attr)
+static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex,
+   const pthread_mutexattr_t *attr)
 {
 DosCreateMutexSem(NULL, (PHMTX)mutex, 0, FALSE);
 
@@ -120,7 +124,8 @@ static av_always_inline int 
pthread_mutex_unlock(pthread_mutex_t *mutex)
 return 0;
 }
 
-static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const 
pthread_condattr_t *attr)
+static av_always_inline int pthread_cond_init(pthread_cond_t *cond,
+  const pthread_condattr_t *attr)
 {
 DosCreateEventSem(NULL, >event_sem, DCE_POSTONE, FALSE);
 DosCreateEventSem(NULL, >ack_sem, DCE_POSTONE, FALSE);
@@ -156,7 +161,8 @@ static av_always_inline int 
pthread_cond_broadcast(pthread_cond_t *cond)
 return 0;
 }
 
-static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, 
pthread_mutex_t *mutex)
+static av_always_inline int pthread_cond_wait(pthread_cond_t *cond,
+  pthread_mutex_t *mutex)
 {
 __atomic_increment(>wait_count);
 
@@ -173,7 +179,8 @@ static av_always_inline int 
pthread_cond_wait(pthread_cond_t *cond, pthread_mute
 return 0;
 }
 
-static av_always_inline int pthread_once(pthread_once_t *once_control, void 
(*init_routine)(void))
+static av_always_inline int pthread_once(pthread_once_t *once_control,
+ void (*init_routine)(void))
 {
 if (!once_control->done)
 {
-- 
2.7.0

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


[FFmpeg-devel] [PATCH v2 0/3] Improve os2threads

2016-02-14 Thread KO Myung-Hun
Hi/2.

These are v2 patches for os2threads.

Replaced spin-locks with an event semaphore.

[PATCH v2 1/3] compat/os2threads: Improve pthread_cond_xxx()
[PATCH v2 2/3] compat/os2threads: support the return value of joined
[PATCH v2 3/3] compat/os2threads: split long lines
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2 1/3] compat/os2threads: Improve pthread_cond_xxx() functions

2016-02-14 Thread KO Myung-Hun
1. Manipulate waiting count in pthread_cond_wait()
2. Use builtin atomic functions to manipulate waiting count
---
 compat/os2threads.h | 26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/compat/os2threads.h b/compat/os2threads.h
index 7c0fe13..12cb7b0 100644
--- a/compat/os2threads.h
+++ b/compat/os2threads.h
@@ -32,6 +32,7 @@
 #undef __STRICT_ANSI__  /* for _beginthread() */
 #include 
 
+#include 
 #include 
 
 #include "libavutil/mem.h"
@@ -43,8 +44,9 @@ typedef HMTX pthread_mutex_t;
 typedef void pthread_mutexattr_t;
 
 typedef struct {
-HEV  event_sem;
-int  wait_count;
+HEV event_sem;
+HEV ack_sem;
+volatile unsigned  wait_count;
 } pthread_cond_t;
 
 typedef void pthread_condattr_t;
@@ -124,6 +126,7 @@ static av_always_inline int 
pthread_mutex_unlock(pthread_mutex_t *mutex)
 static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const 
pthread_condattr_t *attr)
 {
 DosCreateEventSem(NULL, >event_sem, DCE_POSTONE, FALSE);
+DosCreateEventSem(NULL, >ack_sem, DCE_POSTONE, FALSE);
 
 cond->wait_count = 0;
 
@@ -133,16 +136,16 @@ static av_always_inline int 
pthread_cond_init(pthread_cond_t *cond, const pthrea
 static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
 {
 DosCloseEventSem(cond->event_sem);
+DosCloseEventSem(cond->ack_sem);
 
 return 0;
 }
 
 static av_always_inline int pthread_cond_signal(pthread_cond_t *cond)
 {
-if (cond->wait_count > 0) {
+if (!__atomic_cmpxchg32(>wait_count, 0, 0)) {
 DosPostEventSem(cond->event_sem);
-
-cond->wait_count--;
+DosWaitEventSem(cond->ack_sem, SEM_INDEFINITE_WAIT);
 }
 
 return 0;
@@ -150,23 +153,24 @@ static av_always_inline int 
pthread_cond_signal(pthread_cond_t *cond)
 
 static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond)
 {
-while (cond->wait_count > 0) {
-DosPostEventSem(cond->event_sem);
-
-cond->wait_count--;
-}
+while (!__atomic_cmpxchg32(>wait_count, 0, 0))
+pthread_cond_signal(cond);
 
 return 0;
 }
 
 static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, 
pthread_mutex_t *mutex)
 {
-cond->wait_count++;
+__atomic_increment(>wait_count);
 
 pthread_mutex_unlock(mutex);
 
 DosWaitEventSem(cond->event_sem, SEM_INDEFINITE_WAIT);
 
+__atomic_decrement(>wait_count);
+
+DosPostEventSem(cond->ack_sem);
+
 pthread_mutex_lock(mutex);
 
 return 0;
-- 
2.7.0

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


Re: [FFmpeg-devel] [PATCH] avutil/imgutils: remove special case for aligning the palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 04:30 PM, Mats Peterson wrote:

On 02/14/2016 04:28 PM, Mats Peterson wrote:

On 02/14/2016 04:25 PM, Michael Niedermayer wrote:

As a side-effect It fixes storing pal8 in nut with odd with


  It worked fine before this patch (palette starting at a 4-byte
boundary).



OK, sorry, I get it.



And please read your mail.

Mats

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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Henrik Gramner
On Fri, Jan 1, 2016 at 3:19 PM, Michael Niedermayer
 wrote:
> Hi all
>
> Its a while since 2.8 so unless there are objections i will make a
> 2.9 or if people prefer a 3.0 within the next month or so

The Ubuntu 16.04 LTS feature freeze is coming up next week, so it'd be
nice to have a release before that.

https://wiki.ubuntu.com/XenialXerus/ReleaseSchedule
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread wm4
On Sun, 14 Feb 2016 13:07:04 -0300
James Almer  wrote:

> On 2/14/2016 1:04 PM, Carl Eugen Hoyos wrote:
> > Henrik Gramner  gramner.com> writes:
> >   
> >> The Ubuntu 16.04 LTS feature freeze is coming up next week, 
> >> so it'd be nice to have a release before that.  
> > 
> > (I am all for it, I am not sure if it is still possible though.)
> > 
> > The following tickets are showstoppers imo:
> > #5215
> > #5090 and #5216  
> 
> They are not. They are all fixes that can be promptly backported.
> No reason whatsoever to force a distro to stick with a five months
> old release of ffmpeg just because of three rare issues that can
> and will be fixed eventually.

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


Re: [FFmpeg-devel] [PATCH] vf_blend: Reduce number of arguments for kernel function

2016-02-14 Thread Timothy Gu
On Sun, Feb 14, 2016 at 10:12:21AM +0100, Paul B Mahol wrote:
> On 2/14/16, Timothy Gu  wrote:
> > ---
> >  libavfilter/blend.h |  2 +-
> >  libavfilter/vf_blend.c  | 27 ++-
> >  libavfilter/x86/vf_blend.asm|  3 +--
> >  libavfilter/x86/vf_blend_init.c |  2 +-
> >  4 files changed, 17 insertions(+), 17 deletions(-)
> >
> 
> ok if it works

Pushed, thanks for the review.

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


Re: [FFmpeg-devel] [PATCH] checkasm: Add vf_blend tests

2016-02-14 Thread Michael Niedermayer
On Sat, Feb 13, 2016 at 03:04:58PM -0800, Timothy Gu wrote:
> ---
>  tests/checkasm/Makefile   |   1 +
>  tests/checkasm/checkasm.c |   3 ++
>  tests/checkasm/checkasm.h |   1 +
>  tests/checkasm/vf_blend.c | 130 
> ++
>  4 files changed, 135 insertions(+)
>  create mode 100644 tests/checkasm/vf_blend.c

fails to build unless i applied to wrong patches

make fate
...
tests/checkasm/vf_blend.c: In function ‘checkasm_check_blend’:
tests/checkasm/vf_blend.c:105:5: error: implicit declaration of function 
‘ff_blend_init’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make: *** [tests/checkasm/vf_blend.o] Error 1


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

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


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


Re: [FFmpeg-devel] [PATCH v4] libavcodec/dnxhd_parser: add parser and probe support raw 444 and dnxhr formats

2016-02-14 Thread Michael Niedermayer
On Sat, Feb 13, 2016 at 09:44:32PM -0800, Mark Reid wrote:
> ---
>  libavcodec/dnxhd_parser.c |  7 +++
>  libavcodec/dnxhddata.c|  8 
>  libavcodec/dnxhddata.h| 18 +-
>  libavcodec/dnxhddec.c | 12 
>  libavformat/dnxhddec.c|  7 ---
>  5 files changed, 36 insertions(+), 16 deletions(-)

applied

thanks

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

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides


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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread James Almer
On 2/14/2016 12:54 PM, Henrik Gramner wrote:
> On Fri, Jan 1, 2016 at 3:19 PM, Michael Niedermayer
>  wrote:
>> Hi all
>>
>> Its a while since 2.8 so unless there are objections i will make a
>> 2.9 or if people prefer a 3.0 within the next month or so
> 
> The Ubuntu 16.04 LTS feature freeze is coming up next week, so it'd be
> nice to have a release before that.
> 
> https://wiki.ubuntu.com/XenialXerus/ReleaseSchedule

+1000

LTS releases are supported for several years, so it's really important they
use the latest version we can offer.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread James Almer
On 2/14/2016 1:04 PM, Carl Eugen Hoyos wrote:
> Henrik Gramner  gramner.com> writes:
> 
>> The Ubuntu 16.04 LTS feature freeze is coming up next week, 
>> so it'd be nice to have a release before that.
> 
> (I am all for it, I am not sure if it is still possible though.)
> 
> The following tickets are showstoppers imo:
> #5215
> #5090 and #5216

They are not. They are all fixes that can be promptly backported.
No reason whatsoever to force a distro to stick with a five months
old release of ffmpeg just because of three rare issues that can
and will be fixed eventually.

> 
> I wonder if the fact that #5209 is very rarely 
> reproducible makes it more or less important...
> 
> Carl Eugen
> 
> ___
> 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] checkasm: Add vf_blend tests

2016-02-14 Thread Timothy Gu
On Sun, Feb 14, 2016 at 10:06:16AM +0100, Paul B Mahol wrote:
> On 2/14/16, Timothy Gu  wrote:
> > +
> > +#include 
> > +#include "checkasm.h"
> > +#include "libavfilter/blend.h"
> > +#include "libavutil/common.h"
> > +#include "libavutil/internal.h"
> > +#include "libavutil/intreadwrite.h"
> > +
> > +#define WIDTH 256
> > +#define HEIGHT 256
> > +#define BUF_UNITS 9
> > +#define SIZE_PER_UNIT (WIDTH * HEIGHT)
> > +#define BUF_SIZE (BUF_UNITS * SIZE_PER_UNIT)
> > +
> > +#define randomize_buffers()   \
> > +do {  \
> > +int i, j; \
> > +for (i = 0; i < HEIGHT; i++) {\
> > +for (j = 0; j < WIDTH; j++) { \
> > +top1[i * WIDTH + j] = \
> > +top2[i * WIDTH + j] = i;  \
> > +bot1[i * WIDTH + j] = \
> > +bot2[i * WIDTH + j] = j;  \
> 
> I think you failed to get my point.
> 
> For 8bit blend if you blend 256x256 horizontal gradient
> with 256x256 vertical gradient you will get blend
> function response, which is unique. And covers all
> possibilities for 8bit formats.

You might have missed the fact that I changed WIDTH and HEIGHT as well, so
that for top it'll look like this

  0   0   0   0   0   0 ...   0
  1   1   1   1   1   1 ...   1
  .   .   .   .   .   . ...   .
  .   .   .   .   .   . ...   .
  .   .   .   .   .   . ...   .
255 255 255 255 255 255 ... 255

For bottom it'll look like

  0   1   2   3   4   5 ... 255
  0   1   2   3   4   5 ... 255
  .   .   .   .   .   . ...   .
  .   .   .   .   .   . ...   .
  .   .   .   .   .   . ...   .
  0   1   2   3   4   5 ... 255

Or am I missing something?

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


Re: [FFmpeg-devel] [PATCH 1/2] vf_blend: Templatize identity function and use a better name

2016-02-14 Thread Timothy Gu
On Sun, Feb 14, 2016 at 10:07:39AM +0100, Paul B Mahol wrote:
> On 2/14/16, Timothy Gu  wrote:
> > ---
> >  libavfilter/vf_blend.c | 22 ++
> >  1 file changed, 14 insertions(+), 8 deletions(-)
> >
> 
> lgtm

Set pushed.

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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Γιώργος Μεταξάκης
I have also fixed the #5008 have anyone checked it ?
[patch] gdigrab-mouse-dpi-awareness

On Sun, Feb 14, 2016 at 8:03 PM Michael Niedermayer 
wrote:

> On Sun, Feb 14, 2016 at 04:04:29PM +, Carl Eugen Hoyos wrote:
> > Henrik Gramner  gramner.com> writes:
> >
> > > The Ubuntu 16.04 LTS feature freeze is coming up next week,
> > > so it'd be nice to have a release before that.
> >
> > (I am all for it, I am not sure if it is still possible though.)
> >
> > The following tickets are showstoppers imo:
> > #5215
> > #5090 and #5216
>
> 5090 and 5216 should be fixed by:
> 0212 11:21 Rodger Combs(2.0K) └─&─&─&─&─&─>Re: [FFmpeg-devel] [PATCH]
> lavf/mov: add support for sidx fragment indexes
> please test and if it solves the issues, apply it
>
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The greatest way to live with honor in this world is to be what we pretend
> to be. -- Socrates
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-- 

Metaksakis Georgios

FORTH - ICS

Work : (0030) 281 139 2583

Mobile : (0030) 697 369 3871
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Carl Eugen Hoyos
Henrik Gramner  gramner.com> writes:

> The Ubuntu 16.04 LTS feature freeze is coming up next week, 
> so it'd be nice to have a release before that.

(I am all for it, I am not sure if it is still possible though.)

The following tickets are showstoppers imo:
#5215
#5090 and #5216

I wonder if the fact that #5209 is very rarely 
reproducible makes it more or less important...

Carl Eugen

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


Re: [FFmpeg-devel] 2.9/3.0, 2.8.5, ...

2016-02-14 Thread Michael Niedermayer
On Sun, Feb 14, 2016 at 04:04:29PM +, Carl Eugen Hoyos wrote:
> Henrik Gramner  gramner.com> writes:
> 
> > The Ubuntu 16.04 LTS feature freeze is coming up next week, 
> > so it'd be nice to have a release before that.
> 
> (I am all for it, I am not sure if it is still possible though.)
> 
> The following tickets are showstoppers imo:
> #5215
> #5090 and #5216

5090 and 5216 should be fixed by:
0212 11:21 Rodger Combs(2.0K) └─&─&─&─&─&─>Re: [FFmpeg-devel] [PATCH] 
lavf/mov: add support for sidx fragment indexes
please test and if it solves the issues, apply it


[...]

-- 
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] vf_blend: Reduce number of arguments for kernel function

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> ---
>  libavfilter/blend.h |  2 +-
>  libavfilter/vf_blend.c  | 27 ++-
>  libavfilter/x86/vf_blend.asm|  3 +--
>  libavfilter/x86/vf_blend_init.c |  2 +-
>  4 files changed, 17 insertions(+), 17 deletions(-)
>

ok if it works
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] checkasm: Add vf_blend tests

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> ---
>  tests/checkasm/Makefile   |   1 +
>  tests/checkasm/checkasm.c |   3 ++
>  tests/checkasm/checkasm.h |   1 +
>  tests/checkasm/vf_blend.c | 130
> ++
>  4 files changed, 135 insertions(+)
>  create mode 100644 tests/checkasm/vf_blend.c
>
> diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
> index 07fe5bc..bfd7c11 100644
> --- a/tests/checkasm/Makefile
> +++ b/tests/checkasm/Makefile
> @@ -1,5 +1,6 @@
>  # libavcodec tests
>  AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o
> +AVCODECOBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o
>  AVCODECOBJS-$(CONFIG_BSWAPDSP) += bswapdsp.o
>  AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o
>  AVCODECOBJS-$(CONFIG_FLACDSP)  += flacdsp.o
> diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
> index 49fd2af..1e73e34 100644
> --- a/tests/checkasm/checkasm.c
> +++ b/tests/checkasm/checkasm.c
> @@ -68,6 +68,9 @@ static const struct {
>  #if CONFIG_ALAC_DECODER
>  { "alacdsp", checkasm_check_alacdsp },
>  #endif
> +#if CONFIG_BLEND_FILTER
> +{ "vf_blend", checkasm_check_blend },
> +#endif
>  #if CONFIG_BSWAPDSP
>  { "bswapdsp", checkasm_check_bswapdsp },
>  #endif
> diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
> index 5c07f89..0c8bc2d 100644
> --- a/tests/checkasm/checkasm.h
> +++ b/tests/checkasm/checkasm.h
> @@ -31,6 +31,7 @@
>  #include "libavutil/timer.h"
>
>  void checkasm_check_alacdsp(void);
> +void checkasm_check_blend(void);
>  void checkasm_check_bswapdsp(void);
>  void checkasm_check_flacdsp(void);
>  void checkasm_check_fmtconvert(void);
> diff --git a/tests/checkasm/vf_blend.c b/tests/checkasm/vf_blend.c
> new file mode 100644
> index 000..51e1391
> --- /dev/null
> +++ b/tests/checkasm/vf_blend.c
> @@ -0,0 +1,130 @@
> +/*
> + * Copyright (c) 2016 Tiancheng "Timothy" Gu
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> + */
> +
> +#include 
> +#include "checkasm.h"
> +#include "libavfilter/blend.h"
> +#include "libavutil/common.h"
> +#include "libavutil/internal.h"
> +#include "libavutil/intreadwrite.h"
> +
> +#define WIDTH 256
> +#define HEIGHT 256
> +#define BUF_UNITS 9
> +#define SIZE_PER_UNIT (WIDTH * HEIGHT)
> +#define BUF_SIZE (BUF_UNITS * SIZE_PER_UNIT)
> +
> +#define randomize_buffers()   \
> +do {  \
> +int i, j; \
> +for (i = 0; i < HEIGHT; i++) {\
> +for (j = 0; j < WIDTH; j++) { \
> +top1[i * WIDTH + j] = \
> +top2[i * WIDTH + j] = i;  \
> +bot1[i * WIDTH + j] = \
> +bot2[i * WIDTH + j] = j;  \

I think you failed to get my point.

For 8bit blend if you blend 256x256 horizontal gradient
with 256x256 vertical gradient you will get blend
function response, which is unique. And covers all
possibilities for 8bit formats.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] vf_blend: Use memcpy when opacity is 0

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> For xor mode, 1.8x faster on Haswell.
> ---
>  libavfilter/vf_blend.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
> index c24013d..599084f 100644
> --- a/libavfilter/vf_blend.c
> +++ b/libavfilter/vf_blend.c
> @@ -130,6 +130,7 @@ static void blend_copy ## src(const uint8_t *top,
> ptrdiff_t top_linesize,\
>  }
>
>  COPY(top)
> +COPY(bottom)
>
>  #undef COPY
>
> @@ -512,6 +513,7 @@ static int config_output(AVFilterLink *outlink)
>  case BLEND_MULTIPLY128:param->blend = is_16bit ?
> blend_multiply128_16bit: blend_multiply128_8bit;break;
>  case BLEND_NEGATION:   param->blend = is_16bit ?
> blend_negation_16bit   : blend_negation_8bit;   break;
>  case BLEND_NORMAL: param->blend = param->opacity == 1 ?
> blend_copytop :
> +  param->opacity == 0 ?
> blend_copybottom :
>is_16bit ? blend_normal_16bit
> : blend_normal_8bit; break;
>  case BLEND_OR: param->blend = is_16bit ? blend_or_16bit
> : blend_or_8bit; break;
>  case BLEND_OVERLAY:param->blend = is_16bit ?
> blend_overlay_16bit: blend_overlay_8bit;break;
> @@ -528,6 +530,10 @@ static int config_output(AVFilterLink *outlink)
>  if (ARCH_X86)
>  ff_blend_init_x86(param, is_16bit);
>
> +if (param->opacity == 0 && param->mode != BLEND_NORMAL) {
> +param->blend = blend_copytop;
> +}
> +
>  if (s->all_expr && !param->expr_str) {
>  param->expr_str = av_strdup(s->all_expr);
>  if (!param->expr_str)

lgtm if bitexact for all modes.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] vf_blend: Use integers for divide mode

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> 2.5x faster for 8-bit mode without autovectorization in GCC, 2x
> slower with it on x86. However, since the platforms we enable GCC
> autovectorization on most probably has support for SSE2
> optimization (added in the subsequent commit), this commit should
> in general do good.
> ---
>  libavfilter/vf_blend.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
> index 2b734b4..b9e5add 100644
> --- a/libavfilter/vf_blend.c
> +++ b/libavfilter/vf_blend.c
> @@ -240,7 +240,7 @@ DEFINE_BLEND8(hardlight,  (B < 128) ? MULTIPLY(2, B, A)
> : SCREEN(2, B, A))
>  DEFINE_BLEND8(hardmix,(A < (255 - B)) ? 0: 255)
>  DEFINE_BLEND8(darken, FFMIN(A, B))
>  DEFINE_BLEND8(lighten,FFMAX(A, B))
> -DEFINE_BLEND8(divide, av_clip_uint8(((float)A / ((float)B) * 255)))
> +DEFINE_BLEND8(divide, av_clip_uint8(B == 0 ? 255 : 255 * A / B))
>  DEFINE_BLEND8(dodge,  DODGE(A, B))
>  DEFINE_BLEND8(burn,   BURN(A, B))
>  DEFINE_BLEND8(softlight,  (A > 127) ? B + (255 - B) * (A - 127.5) / 127.5 *
> (0.5 - fabs(B - 127.5) / 255): B - B * ((127.5 - A) / 127.5) * (0.5 - fabs(B
> - 127.5)/255))
> @@ -280,7 +280,7 @@ DEFINE_BLEND16(hardlight,  (B < 32768) ? MULTIPLY(2, B,
> A) : SCREEN(2, B, A))
>  DEFINE_BLEND16(hardmix,(A < (65535 - B)) ? 0: 65535)
>  DEFINE_BLEND16(darken, FFMIN(A, B))
>  DEFINE_BLEND16(lighten,FFMAX(A, B))
> -DEFINE_BLEND16(divide, av_clip_uint16(((float)A / ((float)B) * 65535)))
> +DEFINE_BLEND16(divide, av_clip_uint16(B == 0 ? 65535 : 65535 * A / B))
>  DEFINE_BLEND16(dodge,  DODGE(A, B))
>  DEFINE_BLEND16(burn,   BURN(A, B))
>  DEFINE_BLEND16(softlight,  (A > 32767) ? B + (65535 - B) * (A - 32767.5) /
> 32767.5 * (0.5 - fabs(B - 32767.5) / 65535): B - B * ((32767.5 - A) /
> 32767.5) * (0.5 - fabs(B - 32767.5)/65535))
> --
> 2.1.4
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

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


Re: [FFmpeg-devel] [PATCH] x86/vf_blend: Add SSE2 optimization for divide

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> On Sat, Feb 13, 2016 at 07:21:25PM -0800, Timothy Gu wrote:
>> ---
>>  libavfilter/x86/vf_blend.asm| 30 ++
>>  libavfilter/x86/vf_blend_init.c |  2 ++
>>  2 files changed, 32 insertions(+)
>
> Locally added commit message:
>
>  4.5x faster than C float version with autovectorization
> 10  x faster than C int version
> 25  x faster than C float version without autovectorization
>
> Timothy
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

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


Re: [FFmpeg-devel] [PATCH 1/2] lavc/rawdec: Remove temporary switching code for 1 bpp AVI without a palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 11:45 AM, Mats Peterson wrote:

Just as a parenthesis, regardless of whether this patch is applied or
not, the only way to create a "spec" compliant 1 bpp raw file from a 1
bpp raw AVI or QuickTime file


Make that any type of source file, not only AVI or QuickTime.

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] vf_blend: Templatize identity function and use a better name

2016-02-14 Thread Paul B Mahol
On 2/14/16, Timothy Gu  wrote:
> ---
>  libavfilter/vf_blend.c | 22 ++
>  1 file changed, 14 insertions(+), 8 deletions(-)
>

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


Re: [FFmpeg-devel] [PATCH 1/2] lavc/rawdec: Remove temporary switching code for 1 bpp AVI without a palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 07:03 AM, Mats Peterson wrote:

Old stuff, new shape.



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



Just as a parenthesis, regardless of whether this patch is applied or 
not, the only way to create a "spec" compliant 1 bpp raw file from a 1 
bpp raw AVI or QuickTime file is to use nut as output, like "ffmpeg -i 
1bpp.avi -vcodec rawvideo [-pix_fmt monow] 1bpp.nut". Both AVI and 
QuickTime will have the wrong stride in the output files. AVI should use 
a 4-byte aligned, and QuickTime a 2-byte aligned stride, but it will 
currently be the same as in nut, i.e. the minimum possible one.


Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/

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


Re: [FFmpeg-devel] [PATCH 1/2] lavc/rawdec: Remove temporary switching code for 1 bpp AVI without a palette

2016-02-14 Thread Mats Peterson

On 02/14/2016 11:45 AM, Mats Peterson wrote:

On 02/14/2016 07:03 AM, Mats Peterson wrote:

Old stuff, new shape.



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



Just as a parenthesis, regardless of whether this patch is applied or
not, the only way to create a "spec" compliant 1 bpp raw file from a 1
bpp raw AVI or QuickTime file is to use nut as output, like "ffmpeg -i
1bpp.avi -vcodec rawvideo [-pix_fmt monow] 1bpp.nut". Both AVI and


Using "-vcodec copy" of course creates a spec compliant 1 bpp raw AVI or 
QuickTime file (provided the original is spec compliant), but it's 
pretty meaningless to convert to an identical file.


Mats

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


Re: [FFmpeg-devel] [PATCH] avfilter: add loop filters

2016-02-14 Thread Paul B Mahol
On 2/12/16, Paul B Mahol  wrote:
> On 2/11/16, Paul B Mahol  wrote:
>> Hi,
>>
>> patch attached.
>>
>
> Better version attached.
>

Even better version attached.
From 5a96e8103b2556291e1fe1922adb16945e70f64b Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Thu, 11 Feb 2016 22:05:54 +0100
Subject: [PATCH] avfilter: add loop filters

Signed-off-by: Paul B Mahol 
---
 doc/filters.texi |  19 +++
 libavfilter/Makefile |   2 +
 libavfilter/allfilters.c |   2 +
 libavfilter/f_loop.c | 381 +++
 libavutil/audio_fifo.c   |  24 +++
 libavutil/audio_fifo.h   |  17 +++
 6 files changed, 445 insertions(+)
 create mode 100644 libavfilter/f_loop.c

diff --git a/doc/filters.texi b/doc/filters.texi
index 68f54f1..dc83c1b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -8147,6 +8147,25 @@ The formula that generates the correction is:
 where @var{r_0} is halve of the image diagonal and @var{r_src} and @var{r_tgt} are the
 distances from the focal point in the source and target images, respectively.
 
+@section loop, aloop
+
+Loop video frames or audio samples.
+
+Those filters accepts the following options:
+
+@table @option
+@item loop
+Set the number of loops.
+
+@item size
+Set maximal size in number of frames for @code{loop} filter or maximal number
+of samples in case of @code{aloop} filter.
+
+@item start
+Set first frame of loop for @code{loop} filter or first sample of loop in case
+of @code{aloop} filter.
+@end table
+
 @anchor{lut3d}
 @section lut3d
 
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 8916588..35ac53a 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -38,6 +38,7 @@ OBJS-$(CONFIG_AGATE_FILTER)  += af_agate.o
 OBJS-$(CONFIG_AINTERLEAVE_FILTER)+= f_interleave.o
 OBJS-$(CONFIG_ALIMITER_FILTER)   += af_alimiter.o
 OBJS-$(CONFIG_ALLPASS_FILTER)+= af_biquads.o
+OBJS-$(CONFIG_ALOOP_FILTER)  += f_loop.o
 OBJS-$(CONFIG_AMERGE_FILTER) += af_amerge.o
 OBJS-$(CONFIG_AMETADATA_FILTER)  += f_metadata.o
 OBJS-$(CONFIG_AMIX_FILTER)   += af_amix.o
@@ -180,6 +181,7 @@ OBJS-$(CONFIG_INTERLACE_FILTER)  += vf_interlace.o
 OBJS-$(CONFIG_INTERLEAVE_FILTER) += f_interleave.o
 OBJS-$(CONFIG_KERNDEINT_FILTER)  += vf_kerndeint.o
 OBJS-$(CONFIG_LENSCORRECTION_FILTER) += vf_lenscorrection.o
+OBJS-$(CONFIG_LOOP_FILTER)   += f_loop.o
 OBJS-$(CONFIG_LUT3D_FILTER)  += vf_lut3d.o
 OBJS-$(CONFIG_LUT_FILTER)+= vf_lut.o
 OBJS-$(CONFIG_LUTRGB_FILTER) += vf_lut.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index fa7d304..6331fe5 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -58,6 +58,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(AINTERLEAVE,ainterleave,af);
 REGISTER_FILTER(ALIMITER,   alimiter,   af);
 REGISTER_FILTER(ALLPASS,allpass,af);
+REGISTER_FILTER(ALOOP,  aloop,  af);
 REGISTER_FILTER(AMERGE, amerge, af);
 REGISTER_FILTER(AMETADATA,  ametadata,  af);
 REGISTER_FILTER(AMIX,   amix,   af);
@@ -201,6 +202,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(INTERLEAVE, interleave, vf);
 REGISTER_FILTER(KERNDEINT,  kerndeint,  vf);
 REGISTER_FILTER(LENSCORRECTION, lenscorrection, vf);
+REGISTER_FILTER(LOOP,   loop,   vf);
 REGISTER_FILTER(LUT3D,  lut3d,  vf);
 REGISTER_FILTER(LUT,lut,vf);
 REGISTER_FILTER(LUTRGB, lutrgb, vf);
diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c
new file mode 100644
index 000..d8eb692
--- /dev/null
+++ b/libavfilter/f_loop.c
@@ -0,0 +1,381 @@
+/*
+ * Copyright (c) 2016 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/audio_fifo.h"
+#include "libavutil/avassert.h"
+#include "libavutil/fifo.h"
+#include "libavutil/internal.h"
+#include "libavutil/opt.h"
+#include 

Re: [FFmpeg-devel] [PATCH] avfilter: add loop filters

2016-02-14 Thread Paul B Mahol
On 2/13/16, Stefano Sabatini  wrote:
> On date Friday 2016-02-12 15:28:15 +0100, Paul B Mahol encoded:
>> On 2/11/16, Paul B Mahol  wrote:
>> > Hi,
>> >
>> > patch attached.
>> >
>>
>> Better version attached.
>
>> From d953f78bffbf3db8f0209b41b189ece12b402afa Mon Sep 17 00:00:00 2001
>> From: Paul B Mahol 
>> Date: Thu, 11 Feb 2016 22:05:54 +0100
>> Subject: [PATCH] avfilter: add loop filters
>>
>> Signed-off-by: Paul B Mahol 
>> ---
>>  libavfilter/Makefile |   2 +
>>  libavfilter/allfilters.c |   2 +
>>  libavfilter/f_loop.c | 339
>> +++
>>  libavutil/audio_fifo.c   |  24 
>>  libavutil/audio_fifo.h   |  17 +++
> [...]
>> +int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples,
>> int offset)
>> +{
>> +int i, ret, size;
>> +
>> +if (offset < 0 || offset >= af->nb_samples)
>> +return AVERROR(EINVAL);
>> +if (nb_samples < 0)
>> +return AVERROR(EINVAL);
>> +nb_samples = FFMIN(nb_samples, af->nb_samples);
>> +if (!nb_samples)
>> +return 0;
>
>> +if (offset > af->nb_samples - nb_samples)
>> +return AVERROR(EINVAL);
>
> is this check really required, or could you have something like:
> nb_samples = FFMIN(nb_samples, af->nb_samples - offset);
>
> ?

I prefer direct approach, if user supplied invalid values, notify him.
Do not try to silently guess what user wants.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 4/4] avfilter/f_metadata: whitespace clean-up

2016-02-14 Thread Paul B Mahol
All aplied. Thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel