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

2016-02-12 Thread Γιώργος Μεταξάκης
didn't knew about that ticket.

On Fri, Feb 12, 2016 at 10:57 AM Carl Eugen Hoyos  wrote:

> Γιώργος Μεταξάκης  gmail.com> writes:
>
> > > > i'm sending you a new patch with only 6 changes.
> > > > The problem was that when you where capturing the
> > > > screen, the mouse wasn't on the correct location.
>
> Does this fix ticket #5008?
> If yes, please mention it in the commit message.
>
> Thank you, Carl Eugen
> ___
> 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


0001-mouse-dpi-awareness.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-02-12 Thread Mats Peterson

On 02/11/2016 03:46 AM, Mats Peterson wrote:


Nice. The patch fails on tests/ref/fate/sub2video, since you JUST
changed it over there. Can you fix that on your side?



Ignore this patch.

Mats

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


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

2016-02-12 Thread Paul B Mahol
On 2/12/16, Mats Peterson  wrote:
> On 02/11/2016 03:46 AM, Mats Peterson wrote:
>
>> Nice. The patch fails on tests/ref/fate/sub2video, since you JUST
>> changed it over there. Can you fix that on your side?
>>
>
> Ignore this patch.

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


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

2016-02-12 Thread Mats Peterson
Now handles non-standard 8 bpp raw AVI files created with "-vcodec 
rawvideo" that contain the palette at the end of each frame, like nut.


8 bpp raw QuickTime files created with "-vcodec rawvideo" won't work 
quite right, because they contain a palette both in the video sample 
description and at the end of each frame, which currently causes the 
stride to be calculated incorrectly. They are hugely non-standard anyway.


Original description follows:

This patch removes the monowhite switching code for 1 bpp raw AVI 
without a palette. I don't see any reason to keep it, since it's 
semantically incorrect to use monowhite for palettized data in my book, 
it adds unnecessary noise to the code, and it's inconsistent with the 
rest of the code in FFmpeg.


For black & white AVI or QuickTime files, in order to produce a 
monochrome nut file, force the pixel format with "-pix_fmt monow" or 
"-pix_fmt monob".


Another way is to use "ffmpeg -i 1bpp.avi -vcodec copy -vtag B1W0 
1bpp.nut". The "-vtag" option is currently needed, otherwise FFmpeg will 
use a RGB[15] codec tag for some reason.


I have also updated the 1 bpp FATE test files (once again).

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 1600eeb442b1ebfd56a7f8882b93db3f2076b006 Mon Sep 17 00:00:00 2001
From: Mats Peterson 
Date: Fri, 12 Feb 2016 11:24:30 +0100
Subject: [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

---
 libavcodec/rawdec.c   |   68 -
 tests/ref/vsynth/vsynth1-bpp1 |4 +--
 tests/ref/vsynth/vsynth2-bpp1 |4 +--
 tests/ref/vsynth/vsynth3-bpp1 |4 +--
 tests/ref/vsynth/vsynth_lena-bpp1 |4 +--
 5 files changed, 37 insertions(+), 47 deletions(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index b7ce2b6..cadeaff 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -46,6 +46,7 @@ typedef struct RawVideoContext {
 int is_pal8;
 int is_nut_mono;
 int is_nut_pal8;
+int has_pkt_pal;
 int is_yuv2;
 int is_lt_16bpp; // 16bpp pixfmt and bits_per_coded_sample < 16
 int tff;
@@ -100,7 +101,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
 else {
 memset(context->palette->data, 0, AVPALETTE_SIZE);
-if (avctx->bits_per_coded_sample <= 1)
+if (avctx->bits_per_coded_sample == 1)
 memset(context->palette->data, 0xff, 4);
 }
 }
@@ -121,17 +122,13 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 if (avctx->codec_tag == MKTAG('B','1','W','0') ||
 avctx->codec_tag == MKTAG('B','0','W','1'))
 context->is_nut_mono = 1;
-else if (avctx->codec_tag == MKTAG('P','A','L','8'))
+else if (avctx->codec_tag == MKTAG('P','A','L',8))
 context->is_nut_pal8 = 1;
 
 if (avctx->codec_tag == AV_RL32("yuv2") &&
 avctx->pix_fmt   == AV_PIX_FMT_YUYV422)
 context->is_yuv2 = 1;
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (context->is_pal8 && avctx->bits_per_coded_sample == 1)
-avctx->pix_fmt = AV_PIX_FMT_NONE;
-
 return 0;
 }
 
@@ -192,33 +189,21 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 return AVERROR_INVALIDDATA;
 }
 
-if (context->is_nut_mono)
-stride = avctx->width / 8 + (avctx->width & 7 ? 1 : 0);
-else if (context->is_nut_pal8)
-stride = avctx->width;
-else
-stride = avpkt->size / avctx->height;
+if ((avctx->bits_per_coded_sample == 8 || context->is_nut_pal8) &&
+avctx->frame_number == 0 &&
+!av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL))
+context->has_pkt_pal = 1;
+
+stride = (avpkt->size - (context->has_pkt_pal ? AVPALETTE_SIZE : 0)) / avctx->height;
 
-if (stride == 0 || avpkt->size < stride * avctx->height) {
+av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d\n", avpkt->size);
+av_log(avctx, AV_LOG_DEBUG, "STRIDE: %d\n", stride);
+
+if (stride <= 0 || avpkt->size < stride * avctx->height) {
 av_log(avctx, AV_LOG_ERROR, "Packet too small (%d)\n", avpkt->size);
 return AVERROR_INVALIDDATA;
 }
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (avctx->pix_fmt == AV_PIX_FMT_NONE &&
-avctx->bits_per_coded_sample == 1 &&
-avctx->frame_number == 0 &&
-context->palette &&
-AV_RB64(context->palette->data) == 0x
-) {
-const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
-if (!pal) {
-avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
-context->is_pal8 = 0;
-context->is_mono = 1;
-} else
-avctx->pix_fmt = AV_PIX_FMT_PAL8;
-}
 desc = av_pix_fmt_desc_get(avctx->pix_fmt);
 
 if 

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

2016-02-12 Thread Γιώργος Μεταξάκης
I have changed that.

On Fri, Feb 12, 2016 at 10:25 AM Hendrik Leppkes 
wrote:

> On Fri, Feb 12, 2016 at 9:21 AM, Γιώργος Μεταξάκης 
> wrote:
> > i'm very sorry for those mistakes
> > i'm sending you a new patch with only 6 changes.
> > The problem was that when you where capturing the screen, the mouse
> wasn't
> > on the correct location.
> >
>
> That looks much better already, unfortunately there is still tabs in the
> patch.
>
> - Hendrik
> ___
> 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


0001-mouse-dpi-awareness.patch
Description: Binary data
___
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-12 Thread Hendrik Leppkes
On Fri, Feb 12, 2016 at 9:21 AM, Γιώργος Μεταξάκης  wrote:
> i'm very sorry for those mistakes
> i'm sending you a new patch with only 6 changes.
> The problem was that when you where capturing the screen, the mouse wasn't
> on the correct location.
>

That looks much better already, unfortunately there is still tabs in the patch.

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


Re: [FFmpeg-devel] [PATCH] lavf/mov: add support for sidx fragment indexes

2016-02-12 Thread Rodger Combs
This issue is fixed by this patch, but I'm unsure of possible implications on 
other files. It passes FATE, at least.

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 149e3b4..c5e0a1e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3609,7 +3609,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
 }
 av_log(c->fc, AV_LOG_DEBUG, "calculated into dts %"PRId64"\n", 
dts);
 } else {
-dts = frag->time;
+dts = frag->time - sc->time_offset;
 av_log(c->fc, AV_LOG_DEBUG, "found frag time %"PRId64
 ", using it for dts\n", dts);
 }


> On Jan 15, 2016, at 16:57, Michael Niedermayer  wrote:
> 
> On Fri, Jan 15, 2016 at 10:24:43PM +, Dan Sanders wrote:
>> Michael, I wanted to check if you have you looked into this playback issue,
>> or were planning to?
> 
> i didnt look into it, i had thought rodger would look into it as it
> was his patch ...
> 
> rodger, did you look into this ?
> 
> [...]
> -- 
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> then the original author, trying to rewrite it will not make it better.

___
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-12 Thread Moritz Barsnick
On Fri, Feb 12, 2016 at 09:25:54 +0100, Hendrik Leppkes wrote:
> On Fri, Feb 12, 2016 at 9:21 AM, Γιώργος Μεταξάκης  wrote:
> > i'm very sorry for those mistakes
> That looks much better already, unfortunately there is still tabs in the 
> patch.

A good hint for new contributors is to use:
./tools/patcheck

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 10:53 AM, Paul B Mahol wrote:

On 2/12/16, Mats Peterson  wrote:

On 02/11/2016 03:46 AM, Mats Peterson wrote:


Nice. The patch fails on tests/ref/fate/sub2video, since you JUST
changed it over there. Can you fix that on your side?



Ignore this patch.


Why?


Are you being sarcastic?
___
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-12 Thread Carl Eugen Hoyos
Γιώργος Μεταξάκης  gmail.com> writes:

> > > i'm sending you a new patch with only 6 changes.
> > > The problem was that when you where capturing the 
> > > screen, the mouse wasn't on the correct location.

Does this fix ticket #5008?
If yes, please mention it in the commit message.

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


[FFmpeg-devel] [CLT2016] FFmpeg at Chemnitzer Linux-Tage 2016

2016-02-12 Thread Thilo Borgmann
Hi!

FFmpeg has been accepted for CLT 2016 in Chemnitz, Germany!
This "Chemnitzer Linux Tage" will take place from 19th to 20th of March.
You can find more details on their homepage:

https://chemnitzer.linux-tage.de/2016/en/

Thus once again, we will man a booth with our staff and are happily waiting for
our users and fellow developers to get in touch with us!

We would like to encourage everyone visiting the CLT to bring us sample files
and/or command lines that show suspicious or buggy behavior - this will be your
change to get your bug fixed right away! :)

See you in Chemnitz!
-Thilo
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 11:06 AM, Paul B Mahol wrote:

Why?


Are you being sarcastic?


No. Why patch should be ignored?
___


Because I had to fix some additional stuff. I should perhaps say "Ignore 
this *version* of the patch"...


Mats

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


Re: [FFmpeg-devel] [PATCH] avfilter/af_anequalizer: Avoid loss of precision when calculating nyquist frequency

2016-02-12 Thread Paul B Mahol
On 2/12/16, Michael Niedermayer  wrote:
> Fixes: CID1351398
> Fixes: CID1351400
>
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/af_anequalizer.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
> index b646814..a344c77 100644
> --- a/libavfilter/af_anequalizer.c
> +++ b/libavfilter/af_anequalizer.c
> @@ -610,7 +610,7 @@ static int config_input(AVFilterLink *inlink)
>  }
>
>  if (s->filters[s->nb_filters].freq < 0 ||
> -s->filters[s->nb_filters].freq > inlink->sample_rate / 2)
> +s->filters[s->nb_filters].freq > inlink->sample_rate / 2.0)
>  s->filters[s->nb_filters].ignore = 1;
>
>  if (s->filters[s->nb_filters].channel < 0 ||
> @@ -645,7 +645,7 @@ static int process_command(AVFilterContext *ctx, const
> char *cmd, const char *ar
>  if (filter < 0 || filter >= s->nb_filters)
>  return AVERROR(EINVAL);
>
> -if (freq < 0 || freq > inlink->sample_rate / 2)
> +if (freq < 0 || freq > inlink->sample_rate / 2.0)
>  return AVERROR(EINVAL);
>
>  s->filters[filter].freq  = freq;
> --
> 1.7.9.5
>
> ___
> 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] avfilter/vf_zoompan: Fix use of uninitialized variables

2016-02-12 Thread Paul B Mahol
On 2/12/16, Michael Niedermayer  wrote:
> Fixes: CID1351392
> Fixes: CID1351393
> Fixes: CID1351395
>
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/vf_zoompan.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
> index 8d640e7..8d0103b 100644
> --- a/libavfilter/vf_zoompan.c
> +++ b/libavfilter/vf_zoompan.c
> @@ -265,7 +265,7 @@ static int request_frame(AVFilterLink *outlink)
>  AVFilterContext *ctx = outlink->src;
>  ZPContext *s = ctx->priv;
>  AVFrame *in = s->in;
> -double zoom, dx, dy;
> +double zoom=1, dx=0, dy=0;
>  int ret;
>
>  if (in) {
> --
> 1.7.9.5
>
> ___
> 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 2/2] avfilter/vf_zoompan: Initialize ret

2016-02-12 Thread Paul B Mahol
On 2/12/16, Michael Niedermayer  wrote:
> Silences: CID1351394
>
> Signed-off-by: Michael Niedermayer 
> ---
>  libavfilter/vf_zoompan.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
> index 8d0103b..99a1a34 100644
> --- a/libavfilter/vf_zoompan.c
> +++ b/libavfilter/vf_zoompan.c
> @@ -266,7 +266,7 @@ static int request_frame(AVFilterLink *outlink)
>  ZPContext *s = ctx->priv;
>  AVFrame *in = s->in;
>  double zoom=1, dx=0, dy=0;
> -int ret;
> +int ret = -1;
>
>  if (in) {
>  ret = output_single_frame(ctx, in, s->var_values, s->current_frame,
> --
> 1.7.9.5
>
> ___
> 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] gdigrab-mouse-dpi-awareness

2016-02-12 Thread Γιώργος Μεταξάκης
i'm very sorry for those mistakes
i'm sending you a new patch with only 6 changes.
The problem was that when you where capturing the screen, the mouse wasn't
on the correct location.

On Fri, Feb 12, 2016 at 2:01 AM James Darnley 
wrote:

> On 2016-02-11 23:19, Γιώργος Μεταξάκης wrote:
> > Subject: [PATCH] mouse dpi awareness
> >
> > ---
> >  libavdevice/gdigrab.c | 28 +++-
> >  1 file changed, 15 insertions(+), 13 deletions(-)
> >
> > diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
> > index 4428a34..60f184e 100644
> > --- a/libavdevice/gdigrab.c
> > +++ b/libavdevice/gdigrab.c
> > @@ -71,6 +71,8 @@ struct gdigrab {
> >
> >  #define REGION_WND_BORDER 3
> >
> > +
> > +
> >  /**
> >   * Callback to handle Windows messages for the region outline window.
> >   *
>
> Please don't add random whitespace changes.
>
> > @@ -235,8 +237,7 @@ gdigrab_read_header(AVFormatContext *s1)
> >  AVStream   *st   = NULL;
> >
> >  int bpp;
> > -int vertres;
> > -int desktopvertres;
> > +
> >  RECT virtual_rect;
> >  RECT clip_rect;
> >  BITMAP bmp;
> > @@ -279,8 +280,8 @@ gdigrab_read_header(AVFormatContext *s1)
> >  GetClientRect(hwnd, _rect);
> >  } else {
> >  /* desktop -- get the right height and width for scaling DPI */
> > -vertres = GetDeviceCaps(source_hdc, VERTRES);
> > -desktopvertres = GetDeviceCaps(source_hdc, DESKTOPVERTRES);
> > +int vertres = GetDeviceCaps(source_hdc, VERTRES);
> > +int desktopvertres = GetDeviceCaps(source_hdc, DESKTOPVERTRES);
> >  virtual_rect.left = GetSystemMetrics(SM_XVIRTUALSCREEN);
> >  virtual_rect.top = GetSystemMetrics(SM_YVIRTUALSCREEN);
> >  virtual_rect.right = (virtual_rect.left +
> GetSystemMetrics(SM_CXVIRTUALSCREEN)) * desktopvertres / vertres;
>
> Is this change just moving the declaration?
>
> > @@ -431,8 +432,10 @@ error:
> >  static void paint_mouse_pointer(AVFormatContext *s1, struct gdigrab
> *gdigrab)
> >  {
> >  CURSORINFO ci = {0};
> > + int vertres = GetDeviceCaps(gdigrab->source_hdc, VERTRES);
> > +int desktopvertres = GetDeviceCaps(gdigrab->source_hdc,
> DESKTOPVERTRES);
> >
> > -#define CURSOR_ERROR(str) \
> > + #define CURSOR_ERROR(str) \
> >  if (!gdigrab->cursor_error_printed) {   \
> >  WIN32_API_ERROR(str); \
> >  gdigrab->cursor_error_printed = 1;  \
> > @@ -459,12 +462,7 @@ static void paint_mouse_pointer(AVFormatContext
> *s1, struct gdigrab *gdigrab)
> >  icon = CopyCursor(LoadCursor(NULL, IDC_ARROW));
> >  }
> >
> > -if (!GetIconInfo(icon, )) {
> > -CURSOR_ERROR("Could not get icon info");
> > -goto icon_error;
> > -}
> > -
> > -pos.x = ci.ptScreenPos.x - clip_rect.left - info.xHotspot;
> > +pos.x = ci.ptScreenPos.x - clip_rect.left - info.xHotspot;
> >  pos.y = ci.ptScreenPos.y - clip_rect.top - info.yHotspot;
> >
> >  if (hwnd) {
>
> No Tabs!
>
> Why did you remove the GetIconInfo() call?  You need that to fill the
> info data structure you use right here.
>
> > @@ -478,7 +476,11 @@ static void paint_mouse_pointer(AVFormatContext
> *s1, struct gdigrab *gdigrab)
> >  goto icon_error;
> >  }
> >  }
> > -
> > +
> > + //that would keep the correct location of mouse with hidpi
> screens
> > +pos.x = pos.x * desktopvertres / vertres;
> > +pos.y = pos.y * desktopvertres / vertres;
> > +
> >  av_log(s1, AV_LOG_DEBUG, "Cursor pos (%li,%li) -> (%li,%li)\n",
> >  ci.ptScreenPos.x, ci.ptScreenPos.y, pos.x, pos.y);
> >
>
> You probably want to round that division and add some brackets so the
> division happens last.  The change you want to make is probably right
> but I would have to check the docs before signing off.
>
> > @@ -639,4 +641,4 @@ AVInputFormat ff_gdigrab_demuxer = {
> >  .read_close = gdigrab_read_close,
> >  .flags  = AVFMT_NOFILE,
> >  .priv_class = _class,
> > -};
> > +};
> > \ No newline at end of file
>
> I think you need a better editor.
>
> What were the symptoms of the problem before your fix?  Was the cursor
> being drawn too large or to small?  The second last chunk suggests it
> was in the wrong position.
>
>
> ___
> 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


0001-mouse-dpi-awareness.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 12:55:59PM +0100, Mats Peterson wrote:
> On 02/12/2016 12:53 PM, Mats Peterson wrote:
> >ahead. I know the debug code is superfluous, though.
> 
> But it's handy in order to check packet size / stride, since this
> circus is far from over and done with.

i agree about its usefullness, it could be added but in a seperate
patch/commit

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

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


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


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

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 12:31:56PM +0100, Mats Peterson wrote:
> On 02/12/2016 12:02 PM, Mats Peterson wrote:
> >On 02/12/2016 11:26 AM, Mats Peterson wrote:
> >>Now handles non-standard 8 bpp raw AVI files created with "-vcodec
> >>rawvideo" that contain the palette at the end of each frame, like nut.
> >>
> >>8 bpp raw QuickTime files created with "-vcodec rawvideo" won't work
> >>quite right, because they contain a palette both in the video sample
> >>description and at the end of each frame, which currently causes the
> >>stride to be calculated incorrectly. They are hugely non-standard anyway.
> >>
> >
> >Furthermore, the strides of AVI and QuickTime files created with
> >"-vcodec rawvide" are not according to standards. That's not my problem,
> >though.
> >
> >Mats
> >
> 
> And with this patch applied, the only way to create a standards
> compliant 1 bpp raw AVI or QuickTime file from an existing compliant
> AVI or QuickTime file is to use "-vcodec copy", since "-vcodec
> rawvideo" will produce a file with incorrect stride.

can you fix that ?
it is very important that generated files are correct and compliant
to specs

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

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"


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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:41 PM, Mats Peterson wrote:

On 02/12/2016 01:09 PM, Mats Peterson wrote:

On 02/12/2016 01:03 PM, Mats Peterson wrote:

Well, it's not because of my patch. It was the same before it. And you
have more knowledge than me when it comes to fixing the muxing code. I
have mostly dealt with the demuxing side so far, since that's where I
feel decently comfortable.

Mats


I admit it sounded like it was because of my patch, but I worded it in a
confusing way, I guess. I meant that since my patch will make 1 bpp raw
AVI files use pal8 internally, to produce a 1 bpp file, you can either
use "-vcodec copy", or "-vcodec rawvideo -pix_fmt mono", and the latter
one will produce files with incorrect strides. It has nothing to do with
my patch per se.



To be exact, AVI and QuickTime files produced with "-vcodec rawvideo",
regardless of bit depth, will use the minimum possible stride like nut,
which is not according to specs. AVI should use 4-byte aligned strides,
and QuickTime 2-byte aligned strides.



And this is of course not considering the weird way of storing the 
palette in the frames for 8 bpp raw AVI and QuickTime, which clearly is 
not according to specs. For nut it seems sensible, though.


Mats

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


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

2016-02-12 Thread wm4
On Fri, 12 Feb 2016 13:23:02 +0100
Mats Peterson  wrote:

> On 02/12/2016 12:49 PM, Michael Niedermayer wrote:
> >> +av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d\n", avpkt->size);
> >> +av_log(avctx, AV_LOG_DEBUG, "STRIDE: %d\n", stride);  
> >
> > this looks like some private debug code, which doesnt belong in this
> > patch
> >  
> 
> This is easy enough for you to remove, isn't it?

It's even easier for you. (Should be.)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_zoompan: Fix use of uninitialized variables

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 09:20:08AM +0100, Paul B Mahol wrote:
> On 2/12/16, Michael Niedermayer  wrote:
> > Fixes: CID1351392
> > Fixes: CID1351393
> > Fixes: CID1351395
> >
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavfilter/vf_zoompan.c |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
> > index 8d640e7..8d0103b 100644
> > --- a/libavfilter/vf_zoompan.c
> > +++ b/libavfilter/vf_zoompan.c
> > @@ -265,7 +265,7 @@ static int request_frame(AVFilterLink *outlink)
> >  AVFilterContext *ctx = outlink->src;
> >  ZPContext *s = ctx->priv;
> >  AVFrame *in = s->in;
> > -double zoom, dx, dy;
> > +double zoom=1, dx=0, dy=0;
> >  int ret;
> >
> >  if (in) {
> > --
> > 1.7.9.5
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> ok

applied

thanks

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

Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.


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] avfilter/vf_zoompan: Initialize ret

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 09:20:22AM +0100, Paul B Mahol wrote:
> On 2/12/16, Michael Niedermayer  wrote:
> > Silences: CID1351394
> >
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavfilter/vf_zoompan.c |2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
> > index 8d0103b..99a1a34 100644
> > --- a/libavfilter/vf_zoompan.c
> > +++ b/libavfilter/vf_zoompan.c
> > @@ -266,7 +266,7 @@ static int request_frame(AVFilterLink *outlink)
> >  ZPContext *s = ctx->priv;
> >  AVFrame *in = s->in;
> >  double zoom=1, dx=0, dy=0;
> > -int ret;
> > +int ret = -1;
> >
> >  if (in) {
> >  ret = output_single_frame(ctx, in, s->var_values, s->current_frame,
> > --
> > 1.7.9.5
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> ok

applied

thanks

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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 12:53 PM, Mats Peterson wrote:

ahead. I know the debug code is superfluous, though.


But it's handy in order to check packet size / stride, since this circus 
is far from over and done with.


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:00 PM, Michael Niedermayer wrote:

can you fix that ?
it is very important that generated files are correct and compliant
to specs



Well, it's not because of my patch. It was the same before it. And you 
have more knowledge than me when it comes to fixing the muxing code. I 
have mostly dealt with the demuxing side so far, since that's where I 
feel decently comfortable.


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:09 PM, Mats Peterson wrote:


I admit it sounded like it was because of my patch, but I worded it in a
confusing way, I guess. I meant that since my patch will make 1 bpp raw
AVI files use pal8 internally, to produce a 1 bpp file, you can either
use "-vcodec copy", or "-vcodec rawvideo -pix_fmt mono", and the latter
one will produce files with incorrect strides. It has nothing to do with
my patch per se.




I meant "-pix_fmt monow" of course.

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:09 PM, Mats Peterson wrote:

On 02/12/2016 01:03 PM, Mats Peterson wrote:

Well, it's not because of my patch. It was the same before it. And you
have more knowledge than me when it comes to fixing the muxing code. I
have mostly dealt with the demuxing side so far, since that's where I
feel decently comfortable.

Mats


I admit it sounded like it was because of my patch, but I worded it in a
confusing way, I guess. I meant that since my patch will make 1 bpp raw
AVI files use pal8 internally, to produce a 1 bpp file, you can either
use "-vcodec copy", or "-vcodec rawvideo -pix_fmt mono", and the latter
one will produce files with incorrect strides. It has nothing to do with
my patch per se.



To be exact, AVI and QuickTime files produced with "-vcodec rawvideo", 
regardless of bit depth, will use the minimum possible stride like nut, 
which is not according to specs. AVI should use 4-byte aligned strides, 
and QuickTime 2-byte aligned strides.


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:02 PM, Michael Niedermayer wrote:

On Fri, Feb 12, 2016 at 12:55:59PM +0100, Mats Peterson wrote:

On 02/12/2016 12:53 PM, Mats Peterson wrote:

ahead. I know the debug code is superfluous, though.


But it's handy in order to check packet size / stride, since this
circus is far from over and done with.


i agree about its usefullness, it could be added but in a seperate
patch/commit


Yes, that I can agree on.

Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:03 PM, Mats Peterson wrote:

Well, it's not because of my patch. It was the same before it. And you
have more knowledge than me when it comes to fixing the muxing code. I
have mostly dealt with the demuxing side so far, since that's where I
feel decently comfortable.

Mats


I admit it sounded like it was because of my patch, but I worded it in a 
confusing way, I guess. I meant that since my patch will make 1 bpp raw 
AVI files use pal8 internally, to produce a 1 bpp file, you can either 
use "-vcodec copy", or "-vcodec rawvideo -pix_fmt mono", and the latter 
one will produce files with incorrect strides. It has nothing to do with 
my patch per se.


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 12:49 PM, Michael Niedermayer wrote:

+av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d\n", avpkt->size);
+av_log(avctx, AV_LOG_DEBUG, "STRIDE: %d\n", stride);


this looks like some private debug code, which doesnt belong in this
patch



This is easy enough for you to remove, isn't it?

Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/12/2016 01:27 PM, wm4 wrote:


This is easy enough for you to remove, isn't it?


It's even easier for you. (Should be.)


Well, he seems to want to split the patch up anyway, so it shouldn't be 
that hard to remove those lines.


Mats

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


Re: [FFmpeg-devel] [PATCH] fate/source: Attempt to fix BSD sed

2016-02-12 Thread Michael Niedermayer
On Thu, Feb 11, 2016 at 10:27:47PM -0800, Timothy Gu wrote:
> I apparently used a GNU extension in the !{} syntax. Remove that rule
> and the cause of it.
> ---
>  cmdutils.h | 4 ++--
>  tests/fate/source-check.sh | 1 -
>  2 files changed, 2 insertions(+), 3 deletions(-)

on freebsd this results in:

...
": RE error: invalid repetition count(s)
libavutil/x86/w64xmmtest.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libavutil/x86_cpu.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libavutil/xga_font_data.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libavutil/xtea.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libpostproc/postprocess.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libpostproc/postprocess_internal.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libpostproc/version.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswresample/audioconvert.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswresample/resample.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswresample/swresample.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswresample/swresample_internal.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswresample/version.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswscale/ppc/yuv2rgb_altivec.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswscale/rgb2rgb.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswscale/swscale.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswscale/swscale_internal.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
libswscale/version.h
sed: 1: "s/[^A-Za-z0-9]\{1\,\}/_/g
": RE error: invalid repetition count(s)
tests/checkasm/checkasm.h

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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway


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/filters: add geq diagonal split screen example

2016-02-12 Thread Michael Niedermayer
On Thu, Feb 11, 2016 at 03:51:34PM -0900, Lou Logan wrote:
> Signed-off-by: Lou Logan 
> ---
>  doc/filters.texi | 7 +++
>  1 file changed, 7 insertions(+)

LGTM

thx


[...]

-- 
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 v2 2/2] libavcodec/dnxhd_parser: add parser and probe support raw 444 and dnxhr formats

2016-02-12 Thread Michael Niedermayer
On Thu, Feb 11, 2016 at 08:41:16PM -0800, Mark Reid wrote:
> ---
>  libavcodec/dnxhd_parser.c | 11 +++
>  libavformat/dnxhddec.c|  7 ---
>  2 files changed, 11 insertions(+), 7 deletions(-)

what effect on speed does this have ?
AV_RB*() might be better than memcmp(), also a inline function or
macro might be better if this is called alot

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

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


signature.asc
Description: Digital signature
___
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-12 Thread Paul B Mahol
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 +++
 5 files changed, 384 insertions(+)
 create mode 100644 libavfilter/f_loop.c

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..b902af0
--- /dev/null
+++ b/libavfilter/f_loop.c
@@ -0,0 +1,339 @@
+/*
+ * 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 "avfilter.h"
+#include "audio.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
+
+typedef struct LoopContext {
+const AVClass *class;
+
+AVAudioFifo *fifo;
+AVFrame **frames;
+int nb_frames;
+int current_frame;
+int64_t start_pts;
+int64_t duration;
+int64_t current_sample;
+int64_t nb_samples;
+int64_t ignored_samples;
+
+int loop;
+int64_t size;
+int64_t start;
+int64_t pts;
+} LoopContext;
+
+#define AFLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define VFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define OFFSET(x) offsetof(LoopContext, x)
+
+#if CONFIG_ALOOP_FILTER
+
+static int aconfig_input(AVFilterLink *inlink)
+{
+AVFilterContext *ctx = inlink->dst;
+LoopContext *s  = ctx->priv;
+
+s->fifo = av_audio_fifo_alloc(inlink->format, inlink->channels, 8192);
+if (!s->fifo)
+return AVERROR(ENOMEM);
+
+return 0;
+}
+
+static 

Re: [FFmpeg-devel] [PATCH] doc/filters: add example of pipe protocol use in movie filter

2016-02-12 Thread Carl Eugen Hoyos
Dave Rice  dericed.com> writes:

> Based on Paul’s advice on 
> https://trac.ffmpeg.org/ticket/5229#comment:1. This adds 
> an example of the pipe protocol in the movie filter with 
> necessary escaping.

On which system / shell does your example work?

Carl Eugen
___
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-12 Thread Nicolas George
Le quartidi 24 pluviôse, an CCXXIV, Michael Niedermayer a écrit :
> This shoudl use av_frame_get_pkt_duration()
> 
> /**
>  * duration of the corresponding packet, expressed in
>  * AVStream->time_base units, 0 if unknown.
>  * Code outside libavutil should access this field using:
>  * av_frame_get_pkt_duration(frame)

This was necessary to ensure ABI compatibility both backwards and with the
fork. Since we do not support the latter, we could allow direct access.

Regards,

-- 
  Nicolas George


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


[FFmpeg-devel] [PATCH] doc/filters: add example of pipe protocol use in movie filter

2016-02-12 Thread Dave Rice
Hi,
Based on Paul’s advice on https://trac.ffmpeg.org/ticket/5229#comment:1. This 
adds an example of the pipe protocol in the movie filter with necessary 
escaping.
Dave Rice




0001-doc-filters-add-example-of-pipe-protocol-use-in-movi.patch
Description: Binary data
___
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-12 Thread Michael Niedermayer
On Thu, Feb 11, 2016 at 11:11:49PM +0100, Paul B Mahol wrote:
> Hi,
> 
> patch attached.

>  Makefile |2 
>  allfilters.c |2 
>  f_loop.c |  220 
> +++
>  3 files changed, 224 insertions(+)
> 9acd18c6b2dff1cc2c1b5d5e9cfcc94760a02821  0001-avfilter-add-loop-filters.patch
> From 1fd9636e9040b2a6b321cdd16ebd392c8db2de1b 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 
[...]

> +static int push_frame(AVFilterContext *ctx)
> +{
> +AVFilterLink *outlink = ctx->outputs[0];
> +LoopContext *s = ctx->priv;
> +int64_t pts;
> +int ret;
> +
> +AVFrame *out = av_frame_clone(s->frames[s->current_frame]);
> +
> +if (!out)
> +return AVERROR(ENOMEM);
> +out->pts += s->duration - s->start_pts;

> +pts = out->pts + out->pkt_duration;

[...]

> +s->duration = frame->pts + frame->pkt_duration;

This shoudl use av_frame_get_pkt_duration()

/**
 * duration of the corresponding packet, expressed in
 * AVStream->time_base units, 0 if unknown.
 * Code outside libavutil should access this field using:
 * av_frame_get_pkt_duration(frame)



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

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 


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


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

2016-02-12 Thread Carl Eugen Hoyos
Derek Buitenhuis  gmail.com> writes:

> On 2/10/2016 4:33 PM, Paul B Mahol wrote:
> > I'm fine by this, but it would be nice to have SIMD 
> > and 10 bit support in decoder.
> 
> I agree with the latter.
> 
> I'd argue, however, we don't actually support 10-bit via the
> wrapper anyway, since you can't even build the library. ;)

It works here with a repo I found on my hard disc 
for the sample from ticket #4044:

$ ffplay utvideo-yuv422p10le_UQY2_crc32-A431CD5F.avi -autoexit
ffplay version N-78396-g0abdf70 Copyright (c) 2003-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-libutvideo --enable-gpl --disable-decoder=utvideo
  libavutil  55. 17.100 / 55. 17.100
  libavcodec 57. 24.102 / 57. 24.102
  libavformat57. 25.100 / 57. 25.100
  libavdevice57.  0.101 / 57.  0.101
  libavfilter 6. 31.100 /  6. 31.100
  libswscale  4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc54.  0.100 / 54.  0.100
Input #0, avi, from 'utvideo-yuv422p10le_UQY2_crc32-A431CD5F.avi':
  Metadata:
encoder : Lavf56.7.104
  Duration: 00:00:05.00, start: 0.00, bitrate: 9131 kb/s
Stream #0:0: Video: utvideo (UQY2 / 0x32595155), yuv422p10le(8 bpc),
320x240, 9186 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 25 tbn, 25 tbc
   4.96 M-V:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0

$ git status
# On branch 15.1.0
$ git describe
v14.2.0-69-g36eb60c

Carl Eugen

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


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

2016-02-12 Thread Paul B Mahol
On 2/12/16, Mats Peterson  wrote:
> On 02/12/2016 10:53 AM, Paul B Mahol wrote:
>> On 2/12/16, Mats Peterson  wrote:
>>> On 02/11/2016 03:46 AM, Mats Peterson wrote:
>>>
 Nice. The patch fails on tests/ref/fate/sub2video, since you JUST
 changed it over there. Can you fix that on your side?

>>>
>>> Ignore this patch.
>>
>> Why?
>
> Are you being sarcastic?

No. Why patch should be ignored?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] alac: allow extra data without the ATOM header

2016-02-12 Thread Carl Eugen Hoyos
Steve Lhomme  gmail.com> writes:

> can be found in such sample 
> http://streams.videolan.org/issues/16620/VLCSupportsample.mkv

The sample works fine here both with current and 
old FFmpeg.
I believe it should also work with vlc --demux=ffmpeg

Is vlc supposed to remux alac from mkv to mov?
Does it work? If not, I don't think this patch should 
be applied.

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-12 Thread Carl Eugen Hoyos
Derek Buitenhuis  gmail.com> writes:

> On 2/12/2016 5:03 PM, Paul B Mahol wrote:
> > make install (as root)and then build FFmpeg with
> > libutvideo support.
> 
> Last time I tried this, it failed to configure, due to 
> duplicated symbol 'main'.

It works fine here for 32 and 64 bit for unpatched FFmpeg 
and unpatched libutvideo.

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-12 Thread Carl Eugen Hoyos
Derek Buitenhuis  gmail.com> writes:

> On 2/10/2016 4:33 PM, Paul B Mahol wrote:
> > I'm fine by this, but it would be nice to have SIMD and 
> > 10 bit support in decoder.
> 
> I agree with the latter.
> 
> I'd argue, however, we don't actually support 10-bit via the
> wrapper anyway, since you can't even build the library. ;)

I tested the following (from scratch):
$ git clone git://github.com/qyot27/libutvideo
$ cd libutvideo
$ ./configure && make
make install (as root)and then build FFmpeg with 
libutvideo support.
The resulting binary played the sample from ticket #4044 
and was at least 10% more efficient than current FFmpeg 
(see ticket #3651).

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-12 Thread Derek Buitenhuis
On 2/12/2016 5:03 PM, Paul B Mahol wrote:
> make install (as root)and then build FFmpeg with
>> libutvideo support.

Last time I tried this, it failed to configure, due to duplicated symbol 'main'.

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


Re: [FFmpeg-devel] [PATCH] fate/source: Attempt to fix BSD sed

2016-02-12 Thread Henrik Gramner
On Fri, Feb 12, 2016 at 7:27 AM, Timothy Gu  wrote:
>  -e 's/[^A-Za-z0-9]\{1\,\}/_/g' \

I don't think the comma is supposed to be escaped.
___
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-12 Thread Stephen Hutchinson

On 2/12/2016 11:51 AM, Carl Eugen Hoyos wrote:

Derek Buitenhuis  gmail.com> writes:


On 2/10/2016 4:33 PM, Paul B Mahol wrote:

I'm fine by this, but it would be nice to have SIMD and
10 bit support in decoder.


I agree with the latter.

I'd argue, however, we don't actually support 10-bit via the
wrapper anyway, since you can't even build the library. ;)


I tested the following (from scratch):
$ git clone git://github.com/qyot27/libutvideo
$ cd libutvideo
$ ./configure && make
make install (as root)and then build FFmpeg with
libutvideo support.
The resulting binary played the sample from ticket #4044
and was at least 10% more efficient than current FFmpeg
(see ticket #3651).



That's because I've set the default branch to the last
good version.  If you want to see what prompted that
decision nearly a year ago, try using the buildsystem
branch.

Beyond that, even the 'good version' 15.1.0 has also been
broken for ages on OSX, with or without asm enabled, and may
not even compile anymore with Clang.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter/avf_showcqt: improve pts handling

2016-02-12 Thread Paul B Mahol
Hi,

patch attached.
From 77075d790275f1d3728890c1ef82e89345490966 Mon Sep 17 00:00:00 2001
From: Paul B Mahol 
Date: Fri, 12 Feb 2016 18:17:30 +0100
Subject: [PATCH] avfilter/avf_showcqt: improve pts handling

Makes seeking possible with mpv.

Signed-off-by: Paul B Mahol 
---
 libavfilter/avf_showcqt.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index 712a999..2d60279 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -989,7 +989,7 @@ static void process_cqt(ShowCQTContext *s)
 yuv_from_cqt(s->c_buf, s->cqt_result, s->sono_g, s->width);
 }
 
-static int plot_cqt(AVFilterContext *ctx)
+static int plot_cqt(AVFilterContext *ctx, int64_t pts)
 {
 AVFilterLink *outlink = ctx->outputs[0];
 ShowCQTContext *s = ctx->priv;
@@ -1013,9 +1013,8 @@ static int plot_cqt(AVFilterContext *ctx)
 s->draw_axis(out, s->axis_frame, s->c_buf, s->bar_h);
 if (s->sono_h)
 s->draw_sono(out, s->sono_frame, s->bar_h + s->axis_h, s->sono_idx);
-out->pts = s->frame_count;
+out->pts = pts;
 ret = ff_filter_frame(outlink, out);
-s->frame_count++;
 }
 s->sono_count = (s->sono_count + 1) % s->count;
 if (s->sono_h)
@@ -1133,7 +1132,7 @@ static int config_output(AVFilterLink *outlink)
 s->format = outlink->format;
 outlink->sample_aspect_ratio = av_make_q(1, 1);
 outlink->frame_rate = s->rate;
-outlink->time_base = av_inv_q(s->rate);
+outlink->time_base = inlink->time_base;
 av_log(ctx, AV_LOG_INFO, "video: %dx%d %s %d/%d fps, bar_h = %d, axis_h = %d, sono_h = %d.\n",
s->width, s->height, av_get_pix_fmt_name(s->format), s->rate.num, s->rate.den,
s->bar_h, s->axis_h, s->sono_h);
@@ -1209,7 +1208,6 @@ static int config_output(AVFilterLink *outlink)
 return AVERROR(ENOMEM);
 
 s->sono_count = 0;
-s->frame_count = 0;
 s->sono_idx = 0;
 s->remaining_fill = s->fft_len / 2;
 s->remaining_frac = 0;
@@ -1239,7 +1237,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
 if (!insamples) {
 while (s->remaining_fill < s->fft_len / 2) {
 memset(>fft_data[s->fft_len - s->remaining_fill], 0, sizeof(*s->fft_data) * s->remaining_fill);
-ret = plot_cqt(ctx);
+ret = plot_cqt(ctx, AV_NOPTS_VALUE);
 if (ret < 0)
 return ret;
 
@@ -1263,7 +1261,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
 s->fft_data[j+m].re = audio_data[2*(i+m)];
 s->fft_data[j+m].im = audio_data[2*(i+m)+1];
 }
-ret = plot_cqt(ctx);
+ret = plot_cqt(ctx, insamples->pts + i);
 if (ret < 0) {
 av_frame_free();
 return ret;
-- 
1.9.1

___
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-12 Thread Carl Eugen Hoyos
Derek Buitenhuis  gmail.com> writes:

> On 2/12/2016 2:24 PM, Carl Eugen Hoyos wrote:
> > It works here with a repo I found on my hard disc 
> 
> This means nothing to users, unless you want to mail
> your harddisk to each user.

It works fine after "git pull".
How do I ask git where it pulled from?

Carl Eugen

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


[FFmpeg-devel] [PATCH] alac: allow extra data without the ATOM header

2016-02-12 Thread Steve Lhomme
From: Steve Lhomme 

--
can be found in such sample 
http://streams.videolan.org/issues/16620/VLCSupportsample.mkv
---
 libavcodec/alac.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index fc8bc96..9c9df8f 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -60,6 +60,7 @@
 #include "alacdsp.h"
 
 #define ALAC_EXTRADATA_SIZE 36
+#define ALAC_EXTRADATA_SIZE_NO_ATOM 24
 
 typedef struct ALACContext {
 AVClass *class;
@@ -513,7 +514,8 @@ static int alac_set_info(ALACContext *alac)
 bytestream2_init(, alac->avctx->extradata,
  alac->avctx->extradata_size);
 
-bytestream2_skipu(, 12); // size:4, alac:4, version:4
+if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE_NO_ATOM)
+bytestream2_skipu(, 12); // size:4, alac:4, version:4
 
 alac->max_samples_per_frame = bytestream2_get_be32u();
 if (!alac->max_samples_per_frame ||
@@ -544,7 +546,8 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
 alac->avctx = avctx;
 
 /* initialize from the extradata */
-if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE) {
+if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE ||
+alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE_NO_ATOM) {
 av_log(avctx, AV_LOG_ERROR, "extradata is too small\n");
 return AVERROR_INVALIDDATA;
 }
-- 
2.7.0.windows.1

___
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-12 Thread Stephen Hutchinson

On 2/12/2016 9:24 AM, Carl Eugen Hoyos wrote:

Derek Buitenhuis  gmail.com> writes:


On 2/10/2016 4:33 PM, Paul B Mahol wrote:

I'm fine by this, but it would be nice to have SIMD
and 10 bit support in decoder.


I agree with the latter.

I'd argue, however, we don't actually support 10-bit via the
wrapper anyway, since you can't even build the library. ;)


It works here with a repo I found on my hard disc
for the sample from ticket #4044:

$ ffplay utvideo-yuv422p10le_UQY2_crc32-A431CD5F.avi -autoexit
ffplay version N-78396-g0abdf70 Copyright (c) 2003-2016 the FFmpeg developers
   built with gcc 4.7 (SUSE Linux)
   configuration: --enable-libutvideo --enable-gpl --disable-decoder=utvideo
   libavutil  55. 17.100 / 55. 17.100
   libavcodec 57. 24.102 / 57. 24.102
   libavformat57. 25.100 / 57. 25.100
   libavdevice57.  0.101 / 57.  0.101
   libavfilter 6. 31.100 /  6. 31.100
   libswscale  4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc54.  0.100 / 54.  0.100
Input #0, avi, from 'utvideo-yuv422p10le_UQY2_crc32-A431CD5F.avi':
   Metadata:
 encoder : Lavf56.7.104
   Duration: 00:00:05.00, start: 0.00, bitrate: 9131 kb/s
 Stream #0:0: Video: utvideo (UQY2 / 0x32595155), yuv422p10le(8 bpc),
320x240, 9186 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 25 tbn, 25 tbc
4.96 M-V:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0

$ git status
# On branch 15.1.0
$ git describe
v14.2.0-69-g36eb60c

Carl Eugen



The nastiness of libutvideo's breakage from 15.2.0 onward was
detailed here:

https://github.com/qyot27/libutvideo/issues/6

While 15.1.0 still works and is what I've set as the default
branch when cloning, it's now several versions out of date
with upstream Ut Video (which dropped Linux support a long long
time ago).  What I did was simply use my fork to keep the ability
to build it as a lib and for Linux...until deeper changes finally
broke that too.

I'd much rather see the native utvideo decoder and encoder get
updated to support the pixfmts it currently doesn't support than
have to continue to support a permanently frozen old version
through the wrapper (that also won't be able to support any newer
pixfmts that get added to upstream).  The only thing that the
wrapper can currently do that the native codec can't is decode
the 10-bit pixfmts, but it can't encode to them.

So my position isn't a 'doesn't care' anymore.  I fully support
removing the wrapper.
___
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-12 Thread Ronald S. Bultje
Hi,

On Fri, Feb 12, 2016 at 11:24 AM, Carl Eugen Hoyos  wrote:

> Derek Buitenhuis  gmail.com> writes:
>
> > On 2/12/2016 2:24 PM, Carl Eugen Hoyos wrote:
> > > It works here with a repo I found on my hard disc
> >
> > This means nothing to users, unless you want to mail
> > your harddisk to each user.
>
> It works fine after "git pull".
> How do I ask git where it pulled from?


git remote
git remote show origin

Ronald
___
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-12 Thread Γιώργος Μεταξάκης
checked with patcheck also.
only "problem" is
"Missing changelog entry (ignore if minor change)'

On Fri, Feb 12, 2016 at 11:51 AM Moritz Barsnick  wrote:

> On Fri, Feb 12, 2016 at 09:25:54 +0100, Hendrik Leppkes wrote:
> > On Fri, Feb 12, 2016 at 9:21 AM, Γιώργος Μεταξάκης 
> wrote:
> > > i'm very sorry for those mistakes
> > That looks much better already, unfortunately there is still tabs in the
> patch.
>
> A good hint for new contributors is to use:
> ./tools/patcheck
>
> Moritz
> ___
> 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


0001-mouse-dpi-awareness.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH][RFC/UNTESTED] swscale/slice: Actually use the buffers' strides

2016-02-12 Thread Derek Buitenhuis
Signed-off-by: Derek Buitenhuis 
---
I don't know how this could ever have worked, but I also am having a hard time
testing the sliced path in swscale... has it even ever been run?

I have CC'd the original author of this code in the hopes that he
can confirm or deny that this is a correct "fix".
---
diff --git a/libswscale/slice.c b/libswscale/slice.c
index 66fe413..a701487 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -159,9 +159,9 @@ int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], 
int stride[4], int src
 lumY + lumH};
 
 const uint8_t *src_[4] = {src[0] + (relative ? 0 : start[0]) * stride[0],
-  src[1] + (relative ? 0 : start[1]) * stride[0],
-  src[2] + (relative ? 0 : start[2]) * stride[0],
-  src[3] + (relative ? 0 : start[3]) * stride[0]};
+  src[1] + (relative ? 0 : start[1]) * stride[1],
+  src[2] + (relative ? 0 : start[2]) * stride[2],
+  src[3] + (relative ? 0 : start[3]) * stride[3]};
 
 s->width = srcW;
 
-- 
2.7.0

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


Re: [FFmpeg-devel] [PATCH] doc/filters: add geq diagonal split screen example

2016-02-12 Thread Lou Logan
On Fri, 12 Feb 2016 14:49:32 +0100, Michael Niedermayer wrote:

> On Thu, Feb 11, 2016 at 03:51:34PM -0900, Lou Logan wrote:
> > Signed-off-by: Lou Logan 
> > ---
> >  doc/filters.texi | 7 +++
> >  1 file changed, 7 insertions(+)  
> 
> LGTM
> 
> thx

Pushed. Also removed a somewhat similar but useless and confusing
example that I made earlier.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:44 AM, Mats Peterson wrote:

ill try to split out some trivial parts from this patch and apply
them as seperate commits after some testing though



Alright.

It shouldn't be that hard. Everything works just fine except that 
non-AVPALETTE_SIZE thing.


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:39 AM, Mats Peterson wrote:

On 02/13/2016 12:51 AM, Michael Niedermayer wrote:


+if (context->has_pkt_pal) {
+memcpy(context->palette->data,
+   avpkt->data + avpkt->size - AVPALETTE_SIZE,
AVPALETTE_SIZE);


This is incorrect, the 8bit palette in nut can have any number of
entries up to 256, this assumes its fixed 256



I had absolutely no idea, Michael. I'm doing my best ;) It would be much
easier and more consequent if it used AVPALETTE_SIZE, though.



Once again, how are we supposed to know how many colors the palette 
consists of at the end of avpkt->data?


Mats

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


[FFmpeg-devel] [PATCH] lavc/rawdec: Remove monowhite switching code (and only that)

2016-02-12 Thread Mats Peterson

What it sound like.

Mats
>From 59572f63d94bab07ab392be344c9cde7368fa33a Mon Sep 17 00:00:00 2001
From: Mats Peterson 
Date: Sat, 13 Feb 2016 06:45:02 +0100
Subject: [PATCH] lavc/rawdec: Remove monowhite switching code (and only that)

---
 libavcodec/rawdec.c |   19 ---
 1 file changed, 19 deletions(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 287be96..10bca05 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -128,10 +128,6 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 avctx->pix_fmt   == AV_PIX_FMT_YUYV422)
 context->is_yuv2 = 1;
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (context->is_pal8 && avctx->bits_per_coded_sample == 1)
-avctx->pix_fmt = AV_PIX_FMT_NONE;
-
 return 0;
 }
 
@@ -206,21 +202,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 return AVERROR_INVALIDDATA;
 }
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (avctx->pix_fmt == AV_PIX_FMT_NONE &&
-avctx->bits_per_coded_sample == 1 &&
-avctx->frame_number == 0 &&
-context->palette &&
-AV_RB64(context->palette->data) == 0x
-) {
-const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
-if (!pal) {
-avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
-context->is_pal8 = 0;
-context->is_mono = 1;
-} else
-avctx->pix_fmt = AV_PIX_FMT_PAL8;
-}
 desc = av_pix_fmt_desc_get(avctx->pix_fmt);
 
 if ((avctx->bits_per_coded_sample == 8 || avctx->bits_per_coded_sample == 4
-- 
1.7.10.4

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:44 AM, Mats Peterson wrote:



again, if you could help fix the bugs (which are not caused by your
patch but which interact with these changes in nasty ways)
that would be great



The rawvideo muxing bugs (incorrect stride for AVI and QuickTime files
produced with "-vcodec rawvideo", and weird storage of the palette in
the frames for AVI and QuickTime) once again have nothing to do with my
patch. They've been there for a long time. It's up to someone else to
fix these, since I'm not confident on the muxer side.



These musing bugs don't interact anymore than before the patch, at that.
They were just as nasty back then (not being able to produce a standards
compliant file with "-vcodec rawvideo").

Mats

___
ffmpeg-devel mailing list


MUXING, not musing.

Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:39 AM, Mats Peterson wrote:

On 02/13/2016 12:51 AM, Michael Niedermayer wrote:


+if (context->has_pkt_pal) {
+memcpy(context->palette->data,
+   avpkt->data + avpkt->size - AVPALETTE_SIZE,
AVPALETTE_SIZE);


This is incorrect, the 8bit palette in nut can have any number of
entries up to 256, this assumes its fixed 256



I had absolutely no idea, Michael. I'm doing my best ;) It would be much
easier and more consequent if it used AVPALETTE_SIZE, though.


ill try to split out some trivial parts from this patch and apply
them as seperate commits after some testing though



Alright.


again, if you could help fix the bugs (which are not caused by your
patch but which interact with these changes in nasty ways)
that would be great



The rawvideo muxing bugs (incorrect stride for AVI and QuickTime files
produced with "-vcodec rawvideo", and weird storage of the palette in
the frames for AVI and QuickTime) once again have nothing to do with my
patch. They've been there for a long time. It's up to someone else to
fix these, since I'm not confident on the muxer side.



These musing bugs don't interact anymore than before the patch, at that. 
They were just as nasty back then (not being able to produce a standards 
compliant file with "-vcodec rawvideo").


Mats

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 12:51 AM, Michael Niedermayer wrote:


+if (context->has_pkt_pal) {
+memcpy(context->palette->data,
+   avpkt->data + avpkt->size - AVPALETTE_SIZE, AVPALETTE_SIZE);


This is incorrect, the 8bit palette in nut can have any number of
entries up to 256, this assumes its fixed 256



I had absolutely no idea, Michael. I'm doing my best ;) It would be much 
easier and more consequent if it used AVPALETTE_SIZE, though.



ill try to split out some trivial parts from this patch and apply
them as seperate commits after some testing though



Alright.


again, if you could help fix the bugs (which are not caused by your
patch but which interact with these changes in nasty ways)
that would be great



The rawvideo muxing bugs (incorrect stride for AVI and QuickTime files 
produced with "-vcodec rawvideo", and weird storage of the palette in 
the frames for AVI and QuickTime) once again have nothing to do with my 
patch. They've been there for a long time. It's up to someone else to 
fix these, since I'm not confident on the muxer side.


Mts

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:48 AM, Mats Peterson wrote:



It shouldn't be that hard. Everything works just fine except that
non-AVPALETTE_SIZE thing.



And how are we supposed to solve that? Knowing how many colors there are 
in the palette in the nut packets?


Mats

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


Re: [FFmpeg-devel] [PATCH] lavc/rawdec: Remove monowhite switching code (and only that)

2016-02-12 Thread Mats Peterson

On 02/13/2016 06:46 AM, Mats Peterson wrote:

What it sound like.

Mats


Forget this one. I forgot to update the FATE test files.

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


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

2016-02-12 Thread Mats Peterson

On 02/13/2016 05:39 AM, Mats Peterson wrote:

ill try to split out some trivial parts from this patch and apply
them as seperate commits after some testing though



Alright.


You could start with removing the monowhite switching code.

Mats

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


[FFmpeg-devel] [PATCH] lavc/rawdec: Remove temporary monowhite switching code for 1 bpp raw AVI

2016-02-12 Thread Mats Peterson
What it sounds like. Remove the temporary monowhite switching code for 1 
bpp raw AVI.


--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 470961cfde11ea31f4b00b2aad4f43caea0a Mon Sep 17 00:00:00 2001
From: Mats Peterson 
Date: Sat, 13 Feb 2016 07:23:19 +0100
Subject: [PATCH] lavc/rawdec: Remove temporary monowhite switching code for 1 bpp raw AVI

---
 libavcodec/rawdec.c   |   19 ---
 tests/ref/vsynth/vsynth1-bpp1 |4 ++--
 tests/ref/vsynth/vsynth2-bpp1 |4 ++--
 tests/ref/vsynth/vsynth3-bpp1 |4 ++--
 tests/ref/vsynth/vsynth_lena-bpp1 |4 ++--
 5 files changed, 8 insertions(+), 27 deletions(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 287be96..10bca05 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -128,10 +128,6 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
 avctx->pix_fmt   == AV_PIX_FMT_YUYV422)
 context->is_yuv2 = 1;
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (context->is_pal8 && avctx->bits_per_coded_sample == 1)
-avctx->pix_fmt = AV_PIX_FMT_NONE;
-
 return 0;
 }
 
@@ -206,21 +202,6 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
 return AVERROR_INVALIDDATA;
 }
 
-/* Temporary solution until PAL8 is implemented in nut */
-if (avctx->pix_fmt == AV_PIX_FMT_NONE &&
-avctx->bits_per_coded_sample == 1 &&
-avctx->frame_number == 0 &&
-context->palette &&
-AV_RB64(context->palette->data) == 0x
-) {
-const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
-if (!pal) {
-avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
-context->is_pal8 = 0;
-context->is_mono = 1;
-} else
-avctx->pix_fmt = AV_PIX_FMT_PAL8;
-}
 desc = av_pix_fmt_desc_get(avctx->pix_fmt);
 
 if ((avctx->bits_per_coded_sample == 8 || avctx->bits_per_coded_sample == 4
diff --git a/tests/ref/vsynth/vsynth1-bpp1 b/tests/ref/vsynth/vsynth1-bpp1
index 0bd1a77..0abadd6 100644
--- a/tests/ref/vsynth/vsynth1-bpp1
+++ b/tests/ref/vsynth/vsynth1-bpp1
@@ -1,4 +1,4 @@
 611de0803ff6bd0ef385dde59964a105 *tests/data/fate/vsynth1-bpp1.avi
 640452 tests/data/fate/vsynth1-bpp1.avi
-576b690e8a8921c54d777463b63a8307 *tests/data/fate/vsynth1-bpp1.out.rawvideo
-stddev:   97.41 PSNR:  8.36 MAXDIFF:  238 bytes:  7603200/  7603200
+cd1e1448d9895561347ceb66d0add34d *tests/data/fate/vsynth1-bpp1.out.rawvideo
+stddev:   84.48 PSNR:  9.60 MAXDIFF:  218 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth2-bpp1 b/tests/ref/vsynth/vsynth2-bpp1
index d283d6c..38e745f 100644
--- a/tests/ref/vsynth/vsynth2-bpp1
+++ b/tests/ref/vsynth/vsynth2-bpp1
@@ -1,4 +1,4 @@
 b51ad49892eb8f8912c5a983718a17bb *tests/data/fate/vsynth2-bpp1.avi
 640452 tests/data/fate/vsynth2-bpp1.avi
-338fb9039a4564e471bf8179f0c48a95 *tests/data/fate/vsynth2-bpp1.out.rawvideo
-stddev:   80.40 PSNR: 10.02 MAXDIFF:  238 bytes:  7603200/  7603200
+f0dfc0e87e5d96bce29a5944b1bd7471 *tests/data/fate/vsynth2-bpp1.out.rawvideo
+stddev:   68.98 PSNR: 11.36 MAXDIFF:  218 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth3-bpp1 b/tests/ref/vsynth/vsynth3-bpp1
index 5a65728..b4267cf 100644
--- a/tests/ref/vsynth/vsynth3-bpp1
+++ b/tests/ref/vsynth/vsynth3-bpp1
@@ -1,4 +1,4 @@
 98852649c5201df7d85d0e9b5a5b9f15 *tests/data/fate/vsynth3-bpp1.avi
 15352 tests/data/fate/vsynth3-bpp1.avi
-0b1ea21b69d384564dd3a978065443b2 *tests/data/fate/vsynth3-bpp1.out.rawvideo
-stddev:   97.64 PSNR:  8.34 MAXDIFF:  248 bytes:86700/86700
+52ae74ef7910e5b603c12288d425b9ae *tests/data/fate/vsynth3-bpp1.out.rawvideo
+stddev:   84.76 PSNR:  9.57 MAXDIFF:  232 bytes:86700/86700
diff --git a/tests/ref/vsynth/vsynth_lena-bpp1 b/tests/ref/vsynth/vsynth_lena-bpp1
index 63ab9e1..2577733 100644
--- a/tests/ref/vsynth/vsynth_lena-bpp1
+++ b/tests/ref/vsynth/vsynth_lena-bpp1
@@ -1,4 +1,4 @@
 2859022fac452b59e49a1189c4fbb3ec *tests/data/fate/vsynth_lena-bpp1.avi
 640452 tests/data/fate/vsynth_lena-bpp1.avi
-3be3497f8ca548c9196dcecc5bc7cb2b *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
-stddev:   96.52 PSNR:  8.44 MAXDIFF:  231 bytes:  7603200/  7603200
+6183ba861d4e48d4aaefc514fde270e5 *tests/data/fate/vsynth_lena-bpp1.out.rawvideo
+stddev:   83.28 PSNR:  9.72 MAXDIFF:  215 bytes:  7603200/  7603200
-- 
1.7.10.4

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


Re: [FFmpeg-devel] [PATCH] alac: allow extra data without the ATOM header

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 05:05:00PM +0100, Steve Lhomme wrote:
> From: Steve Lhomme 
> 
> --
> can be found in such sample 
> http://streams.videolan.org/issues/16620/VLCSupportsample.mkv
> ---
>  libavcodec/alac.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)

this breaks fate

make fate-alac
TESTalac-16-level-0
Test alac-16-level-0 failed. Look at tests/data/fate/alac-16-level-0.err for 
details.
make: *** [fate-alac-16-level-0] Error 1

[alac @ 0x2a75120] extradata is too small
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2a73fe0] Failed to open codec in 
av_find_stream_info
[alac @ 0x2a75120] extradata is too small
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 
'/home/michael/ffmpeg-git/ffmpeg/tests/data/fate/alac-16-level-0.mov':
  Metadata:
major_brand : qt
minor_version   : 512
compatible_brands: qt
encoder : Lavf57.25.100
  Duration: 00:00:09.50, start: 0.00, bitrate: 1412 kb/s
Stream #0:0(eng): Audio: alac (alac / 0x63616C61), 44100 Hz, stereo, 1411 
kb/s (default)
Metadata:
  handler_name: DataHandler
[abuffer @ 0x2a8eae0] Unable to parse option value "(null)" as sample format
Last message repeated 1 times
[abuffer @ 0x2a8eae0] Error setting option sample_fmt to value (null).
[graph 0 input from stream 0:0 @ 0x2a73a60] Error applying options to the 
filter.
Error opening filters!

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


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


Re: [FFmpeg-devel] [PATCH] fate/source: Do not use GNU extensions in sed

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 05:07:20PM -0800, Timothy Gu wrote:
> ---
> 
> Tested on FreeBSD 10.2.

patch should be ok

[...]
-- 
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][RFC/UNTESTED] swscale/slice: Actually use the buffers' strides

2016-02-12 Thread Pedro Arthur
Hi Derek,

Indeed it is a bug and that is the correct fix. The function
ff_init_slice_from_src is used
for initializing the source data but as it is always 'relative' it starts
at 0. It is also used
to initialize the destination slice but my guess is that usually the
destination stride is
equal, and thus it went unnoticed.

Do you have a sample which make this bug evident?
I think the new slice code is enabled by default since the end of last
year's GSoC.
If you find any bug or have questions about the new swscale slice code,
feel free to contact me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat/img2enc: disable atomic file creation by default

2016-02-12 Thread Marton Balint


On Thu, 11 Feb 2016, Marton Balint wrote:


Currently it is broken when explicitly using the file protocol, it uses an
insecure temporary file name, and in commit b4431c80 disabling the option by
default was already considered. Also it is not very consistent to have such an
option for one particular muxer.


Is there anybody against this patch?

I will apply it soon if I get no feedback.

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


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

2016-02-12 Thread Michael Niedermayer
On Fri, Feb 12, 2016 at 11:26:02AM +0100, Mats Peterson wrote:
> Now handles non-standard 8 bpp raw AVI files created with "-vcodec
> rawvideo" that contain the palette at the end of each frame, like
> nut.
> 
> 8 bpp raw QuickTime files created with "-vcodec rawvideo" won't work
> quite right, because they contain a palette both in the video sample
> description and at the end of each frame, which currently causes the
> stride to be calculated incorrectly. They are hugely non-standard
> anyway.
> 
> Original description follows:
> 
> This patch removes the monowhite switching code for 1 bpp raw AVI
> without a palette. I don't see any reason to keep it, since it's
> semantically incorrect to use monowhite for palettized data in my
> book, it adds unnecessary noise to the code, and it's inconsistent
> with the rest of the code in FFmpeg.
> 
> For black & white AVI or QuickTime files, in order to produce a
> monochrome nut file, force the pixel format with "-pix_fmt monow" or
> "-pix_fmt monob".
> 
> Another way is to use "ffmpeg -i 1bpp.avi -vcodec copy -vtag B1W0
> 1bpp.nut". The "-vtag" option is currently needed, otherwise FFmpeg
> will use a RGB[15] codec tag for some reason.
> 
> I have also updated the 1 bpp FATE test files (once again).
> 
> Mats
> 
> -- 
> Mats Peterson
> http://matsp888.no-ip.org/~mats/

>  libavcodec/rawdec.c   |   68 
> --
>  tests/ref/vsynth/vsynth1-bpp1 |4 +-
>  tests/ref/vsynth/vsynth2-bpp1 |4 +-
>  tests/ref/vsynth/vsynth3-bpp1 |4 +-
>  tests/ref/vsynth/vsynth_lena-bpp1 |4 +-
>  5 files changed, 37 insertions(+), 47 deletions(-)
> 2023febf5ae59cd14dd658c30cebeab2e10519fe  
> 0001-lavc-rawdec-Remove-monowhite-switching-code-for-1-bp.patch
> From 1600eeb442b1ebfd56a7f8882b93db3f2076b006 Mon Sep 17 00:00:00 2001
> From: Mats Peterson 
> Date: Fri, 12 Feb 2016 11:24:30 +0100
> Subject: [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp 
> AVI without a palette
[...]

> @@ -380,18 +365,23 @@ 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);
> -if (!context->palette) {
> -av_buffer_unref(>buf[0]);
> -return AVERROR(ENOMEM);
> -}
> -memcpy(context->palette->data, pal, AVPALETTE_SIZE);

> +if (context->has_pkt_pal) {
> +memcpy(context->palette->data,
> +   avpkt->data + avpkt->size - AVPALETTE_SIZE, 
> AVPALETTE_SIZE);

This is incorrect, the 8bit palette in nut can have any number of
entries up to 256, this assumes its fixed 256

ill try to split out some trivial parts from this patch and apply
them as seperate commits after some testing though

again, if you could help fix the bugs (which are not caused by your
patch but which interact with these changes in nasty ways)
that would be great

Thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


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


[FFmpeg-devel] [PATCH] fate/source: Do not use GNU extensions in sed

2016-02-12 Thread Timothy Gu
---

Tested on FreeBSD 10.2.

---
 cmdutils.h | 4 ++--
 tests/fate/source-check.sh | 8 +---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cmdutils.h b/cmdutils.h
index 7f3db2a..83ea4ad 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef FFMPEG_CMDUTILS_H
-#define FFMPEG_CMDUTILS_H
+#ifndef CMDUTILS_H
+#define CMDUTILS_H
 
 #include 
 
diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh
index 1947b52..33affae 100755
--- a/tests/fate/source-check.sh
+++ b/tests/fate/source-check.sh
@@ -19,10 +19,12 @@ git grep -L -E "This file is part of FFmpeg|This file is 
part of libswresample|"
 echo Headers without standard inclusion guards:
 for f in `git ls-files | grep '\.h$'` ; do
 macro="`echo $f | sed \
--e '/\/\|^ff/!{s/\(.*\)/ffmpeg\/\1/}' \
 -e 's/^lib//' \
--e 's/[^A-Za-z0-9]\{1\,\}/_/g' \
--e 's/_\(a\|v\|av\)f_/_/' \
+-e 's/[^A-Za-z0-9]\{1,\}/_/g' \
+-e 's/_af_/_/' \
+-e 's/_vf_/_/' \
+-e 's/_avf_/_/' \
+-e 's/_vaf_/_/' \
 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
 
 grep -L "^#define $macro$" $f
-- 
2.1.4

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