[FFmpeg-devel] [PATCH] h264: remove useless assignment.

2014-07-31 Thread Benoit Fouet
source index, as well as dest one, is unconditionnaly set afterwards,
before being effectively used.
---
 libavcodec/h264.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 10905db..8fa35c7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -296,7 +296,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const 
uint8_t *src,
 // use second escape buffer for inter data
 bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0;
 
-si = h->rbsp_buffer_size[bufidx];
 av_fast_padded_malloc(&h->rbsp_buffer[bufidx], 
&h->rbsp_buffer_size[bufidx], length+MAX_MBPAIR_SIZE);
 dst = h->rbsp_buffer[bufidx];
 
-- 
2.0.1.442.g7fe6834

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


[FFmpeg-devel] [PATCH] avcodec/dvbsubdec: Fix 8bit non_mod case

2014-07-31 Thread Michael Niedermayer
Untested, i failed to find a sample which triggers this case

Signed-off-by: Michael Niedermayer 
---
 libavcodec/dvbsubdec.c |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index a40da76..1e1cc7e 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -747,11 +747,13 @@ static int dvbsub_read_8bit_string(uint8_t *destbuf, int 
dbuf_len,
 
 if (non_mod == 1 && bits == 1)
 pixels_read += run_length;
-if (map_table)
-bits = map_table[bits];
-else while (run_length-- > 0 && pixels_read < dbuf_len) {
-*destbuf++ = bits;
-pixels_read++;
+else {
+if (map_table)
+bits = map_table[bits];
+while (run_length-- > 0 && pixels_read < dbuf_len) {
+*destbuf++ = bits;
+pixels_read++;
+}
 }
 }
 }
-- 
1.7.9.5

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


[FFmpeg-devel] [PATCH] New p2p mode for showwaves filter

2014-07-31 Thread mrskman
A few months ago I sent this patch and got some comments, which helped me
to understand how this filter works. Thank you for that and I'm sorry it
took me so long to reply. Here is a better version (atleast for me).

Problem with the current mode=point is, you can get almost invisible wave
when you set higher resolution output or when there are high amplitudes
in audio stream.

With this new mode additional points are drawn to make a line between
points and output is readable regardless of the resolution or amplitudes.

Please review and comment.

---
 doc/filters.texi|3 +++
 libavfilter/avf_showwaves.c |   38 +-
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index a7919a3..145acbf 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10698,6 +10698,9 @@ Draw a point for each sample.
 
 @item line
 Draw a vertical line for each sample.
+
+@item p2p
+Draw a point for each sample and a line between them.
 @end table
 
 Default value is @code{point}.
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 0b45bd0..48e61d1 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -35,6 +35,7 @@
 enum ShowWavesMode {
 MODE_POINT,
 MODE_LINE,
+MODE_P2P,
 MODE_NB,
 };
 
@@ -43,6 +44,8 @@ typedef struct {
 int w, h;
 AVRational rate;
 int buf_idx;
+int *buf_idy;/* y coordinate of previous sample for each channel */
+int nb_channels;
 AVFrame *outpicref;
 int req_fullfilled;
 int n;
@@ -59,6 +62,7 @@ static const AVOption showwaves_options[] = {
 { "mode", "select display mode", OFFSET(mode), AV_OPT_TYPE_INT, 
{.i64=MODE_POINT}, 0, MODE_NB-1, FLAGS, "mode"},
 { "point", "draw a point for each sample", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_POINT}, .flags=FLAGS, .unit="mode"},
 { "line",  "draw a line for each sample",  0, AV_OPT_TYPE_CONST, 
{.i64=MODE_LINE},  .flags=FLAGS, .unit="mode"},
+{ "p2p", "draw a line between samples", 0, AV_OPT_TYPE_CONST, 
{.i64=MODE_P2P}, .flags=FLAGS, .unit="mode"},
 { "n","set how many samples to show in the same point", OFFSET(n), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
 { "rate", "set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
 { "r","set video rate", OFFSET(rate), AV_OPT_TYPE_VIDEO_RATE, {.str = 
"25"}, 0, 0, FLAGS },
@@ -72,6 +76,8 @@ static av_cold void uninit(AVFilterContext *ctx)
 ShowWavesContext *showwaves = ctx->priv;
 
 av_frame_free(&showwaves->outpicref);
+if (showwaves->buf_idy)
+av_freep(showwaves->buf_idy);
 }
 
 static int query_formats(AVFilterContext *ctx)
@@ -110,6 +116,7 @@ static int query_formats(AVFilterContext *ctx)
 
 static int config_output(AVFilterLink *outlink)
 {
+int i;
 AVFilterContext *ctx = outlink->src;
 AVFilterLink *inlink = ctx->inputs[0];
 ShowWavesContext *showwaves = ctx->priv;
@@ -117,7 +124,14 @@ static int config_output(AVFilterLink *outlink)
 if (!showwaves->n)
 showwaves->n = FFMAX(1, ((double)inlink->sample_rate / (showwaves->w * 
av_q2d(showwaves->rate))) + 0.5);
 
+showwaves->nb_channels = inlink->channels;
 showwaves->buf_idx = 0;
+if (!(showwaves->buf_idy = av_malloc_array(showwaves->nb_channels, 1))) {
+av_log(NULL, AV_LOG_ERROR, "Could not allocate showwaves buffer\n");
+return AVERROR(ENOMEM);
+}
+for (i = 0; i <= showwaves->nb_channels; i++)
+showwaves->buf_idy[i] = 0;
 outlink->w = showwaves->w;
 outlink->h = showwaves->h;
 outlink->sample_aspect_ratio = (AVRational){1,1};
@@ -133,12 +147,14 @@ static int config_output(AVFilterLink *outlink)
 inline static int push_frame(AVFilterLink *outlink)
 {
 ShowWavesContext *showwaves = outlink->src->priv;
-int ret;
+int ret, i;
 
 if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) >= 0)
 showwaves->req_fullfilled = 1;
 showwaves->outpicref = NULL;
 showwaves->buf_idx = 0;
+for (i = 0; i <= showwaves->nb_channels; i++)
+showwaves->buf_idy[i] = 0;
 return ret;
 }
 
@@ -169,10 +185,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 AVFrame *outpicref = showwaves->outpicref;
 int linesize = outpicref ? outpicref->linesize[0] : 0;
 int16_t *p = (int16_t *)insamples->data[0];
-int nb_channels = inlink->channels;
 int i, j, k, h, ret = 0;
 const int n = showwaves->n;
-const int x = 255 / (nb_channels * n); /* multiplication factor, 
pre-computed to avoid in-loop divisions */
+const int x = 255 / (showwaves->nb_channels * n); /* multiplication 
factor, pre-computed to avoid in-loop divisions */
 
 /* draw data in the buffer */
 for (i = 0; i < nb_samples; i++) {
@@ -184,14 +199,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*insamples)
 outpicref->width  = outli

[FFmpeg-devel] [PATCH] h264_mp4toannexb_bsf: account for consecutive IDR pictures.

2014-07-31 Thread Benoit Fouet
If there are consecutive IDR pictures, then SPS/PPS should be prepended
to all of them, not only the first one.
---
 libavcodec/h264_mp4toannexb_bsf.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/h264_mp4toannexb_bsf.c 
b/libavcodec/h264_mp4toannexb_bsf.c
index a7b4f41..a003a1d 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -179,6 +179,11 @@ static int 
h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
 if (ctx->first_idr && (unit_type == 7 || unit_type == 8))
 ctx->idr_sps_pps_seen = 1;
 
+/* if this is a new IDR picture following an IDR picture, reset the 
idr flag.
+ * Just check first_mb_in_slice to be 0 as this is the simplest 
solution.
+ * This could be checking idr_pic_id instead, but would complexify the 
parsing. */
+if (!ctx->first_idr && unit_type == 5 && (buf[1] & 0x80))
+ctx->first_idr = 1;
 
 /* prepend only to the first type 5 NAL unit of an IDR picture, if no 
sps/pps are already present */
 if (ctx->first_idr && unit_type == 5 && !ctx->idr_sps_pps_seen) {
-- 
2.0.1.442.g7fe6834

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


[FFmpeg-devel] [PATCH] h264_mp4toannexb_bsf: always set idr_sps_pps_seen when SPS/PPS is seen.

2014-07-31 Thread Benoit Fouet
In order not to break a sequence like "SPS IDR SPS IDR", the boolean
telling that the SPS/PPS has been seen should always be set.
---
 libavcodec/h264_mp4toannexb_bsf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_mp4toannexb_bsf.c 
b/libavcodec/h264_mp4toannexb_bsf.c
index a003a1d..e0c1385 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -176,7 +176,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext 
*bsfc,
 if (buf + nal_size > buf_end || nal_size < 0)
 goto fail;
 
-if (ctx->first_idr && (unit_type == 7 || unit_type == 8))
+if (unit_type == 7 || unit_type == 8)
 ctx->idr_sps_pps_seen = 1;
 
 /* if this is a new IDR picture following an IDR picture, reset the 
idr flag.
-- 
2.0.1.442.g7fe6834

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


Re: [FFmpeg-devel] [PATCH] h264_mp4toannexb_bsf: account for consecutive IDR pictures.

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 03:32:14PM +0200, Benoit Fouet wrote:
> If there are consecutive IDR pictures, then SPS/PPS should be prepended
> to all of them, not only the first one.
> ---
>  libavcodec/h264_mp4toannexb_bsf.c | 5 +
>  1 file changed, 5 insertions(+)

tested, works, LGTM

applied

thanks

[...]
-- 
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.


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


Re: [FFmpeg-devel] [PATCH] x86: hevc: adding transform_add

2014-07-31 Thread Pierre Edouard Lepere
Hi,
Here's a new version of the patch with the feedback provided.

Best Regards,

Pierre-Edouard Leperecommit 38d7e6679adfab1bd9f488e1406125baf8e57a3a
Author: plepere 
Date:   Wed Jul 30 10:31:49 2014 +0200

adding ASM transform_add functions for HEVC

diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 7469293..658ad5e 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -117,7 +117,8 @@ YASM-OBJS-$(CONFIG_AAC_DECODER)+= x86/sbrdsp.o
 YASM-OBJS-$(CONFIG_DCA_DECODER)+= x86/dcadsp.o
 YASM-OBJS-$(CONFIG_HEVC_DECODER)   += x86/hevc_mc.o \
   x86/hevc_deblock.o\
-  x86/hevc_idct.o
+  x86/hevc_idct.o   \
+  x86/hevc_res_add.o
 YASM-OBJS-$(CONFIG_PNG_DECODER)+= x86/pngdsp.o
 YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o
 YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o
diff --git a/libavcodec/x86/hevc_res_add.asm b/libavcodec/x86/hevc_res_add.asm
new file mode 100644
index 000..2bfd35d
--- /dev/null
+++ b/libavcodec/x86/hevc_res_add.asm
@@ -0,0 +1,396 @@
+; /*
+; * Provide SSE optimizations for transform_add functions for HEVC decoding
+; * Copyright (c) 2014 Pierre-Edouard LEPERE
+; *
+; * 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/x86/x86util.asm"
+
+SECTION_RODATA 32
+max_pixels_10:  times 16  dw ((1 << 10)-1)
+tr_add_10:  times 4 dd ((1 << 14-10) + 1)
+
+
+SECTION .text
+
+;the tr_add macros and functions were largely inspired by x264 project's code in the h264_idct.asm file
+%macro TR_ADD_MMX_4_8 0
+mova  m2, [r1]
+mova  m4, [r1+8]
+pxor  m3, m3
+psubw m3, m2
+packuswb  m2, m2
+packuswb  m3, m3
+pxor  m5, m5
+psubw m5, m4
+packuswb  m4, m4
+packuswb  m5, m5
+
+movh  m0, [r0 ]
+movh  m1, [r0+r2  ]
+paddusb   m0, m2
+paddusb   m1, m4
+psubusb   m0, m3
+psubusb   m1, m5
+movh   [r0 ], m0
+movh   [r0+r2  ], m1
+%endmacro
+
+
+INIT_MMX mmxext
+; void ff_hevc_tranform_add_8_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride)
+cglobal hevc_transform_add4_8, 3, 4, 6
+TR_ADD_MMX_4_8
+add   r1, 16
+lea   r0, [r0+r2*2]
+TR_ADD_MMX_4_8
+RET
+
+%macro TR_ADD_SSE_8_8 0
+pxor  m3, m3
+mova  m4, [r1]
+mova  m6, [r1+16]
+mova  m0, [r1+32]
+mova  m2, [r1+48]
+psubw m5, m3, m4
+psubw m7, m3, m6
+psubw m1, m3, m0
+packuswb  m4, m0
+packuswb  m5, m1
+psubw m3, m2
+packuswb  m6, m2
+packuswb  m7, m3
+
+movqm0, [r0 ]
+movqm1, [r0+r2  ]
+movhps  m0, [r0+r2*2]
+movhps  m1, [r0+r3  ]
+paddusb m0, m4
+paddusb m1, m6
+psubusb m0, m5
+psubusb m1, m7
+movq [r0 ], m0
+movq [r0+r2  ], m1
+movhps   [r0+2*r2], m0
+movhps   [r0+r3  ], m1
+%endmacro
+
+%macro TR_ADD_INIT_SSE_8 0
+pxor  m0, m0
+
+mova  m4, [r1]
+mova  m1, [r1+16]
+psubw m2, m0, m1
+psubw m5, m0, m4
+packuswb  m4, m1
+packuswb  m5, m2
+
+mova  m6, [r1+32]
+mova  m1, [r1+48]
+psubw m2, m0, m1
+psubw m7, m0, m6
+packuswb  m6, m1
+packuswb  m7, m2
+
+mova  m8, [r1+64]
+mova  m1, [r1+80]
+psubw m2, m0, m1
+psubw m9, m0, m8
+packuswb  m8, m1
+packuswb  m9, m2
+
+mova m10, [r1+96]
+mova  m1, [r1+112]
+psubw m2, m0, m1
+psubwm11, m0

[FFmpeg-devel] Adding AVClass in v4l2enc

2014-07-31 Thread Anshul Maheshwari
Because of no AVClass.I was getting segmentation fault.

FFmpeg Cmd that I was using is given below.
./ffmpeg -re -i ~/test_videos/dvbsubtest.ts -f v4l2 /dev/video0

-Anshul
From df27814e31a29624f69b23e9790ae6ab42817d8b Mon Sep 17 00:00:00 2001
From: Anshul Maheswhwari 
Date: Thu, 31 Jul 2014 20:59:59 +0530
Subject: [PATCH] v4l2enc: adding AVClass

---
 libavdevice/v4l2enc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c
index efe08b5..c9f8d92 100644
--- a/libavdevice/v4l2enc.c
+++ b/libavdevice/v4l2enc.c
@@ -22,6 +22,7 @@
 #include "avdevice.h"
 
 typedef struct {
+AVClass *class;
 int fd;
 } V4L2Context;
 
-- 
1.8.1.4

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


Re: [FFmpeg-devel] Adding AVClass in v4l2enc

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 09:17:20PM +0530, Anshul Maheshwari wrote:
> Because of no AVClass.I was getting segmentation fault.
> 
> FFmpeg Cmd that I was using is given below.
> ./ffmpeg -re -i ~/test_videos/dvbsubtest.ts -f v4l2 /dev/video0
> 
> -Anshul

>  v4l2enc.c |1 +
>  1 file changed, 1 insertion(+)
> 2e2ebb43fbbf62e6bbc1cc337ad30ac31fc795a9  0001-v4l2enc-adding-AVClass.patch
> From df27814e31a29624f69b23e9790ae6ab42817d8b Mon Sep 17 00:00:00 2001
> From: Anshul Maheswhwari 
> Date: Thu, 31 Jul 2014 20:59:59 +0530
> Subject: [PATCH] v4l2enc: adding AVClass

applied

thanks

[...]

-- 
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] Adding AVClass in v4l2enc

2014-07-31 Thread Clément Bœsch
On Thu, Jul 31, 2014 at 09:17:20PM +0530, Anshul Maheshwari wrote:
> Because of no AVClass.I was getting segmentation fault.
> 
> FFmpeg Cmd that I was using is given below.
> ./ffmpeg -re -i ~/test_videos/dvbsubtest.ts -f v4l2 /dev/video0
> 
> -Anshul

> From df27814e31a29624f69b23e9790ae6ab42817d8b Mon Sep 17 00:00:00 2001
> From: Anshul Maheswhwari 
> Date: Thu, 31 Jul 2014 20:59:59 +0530
> Subject: [PATCH] v4l2enc: adding AVClass
> 
> ---
>  libavdevice/v4l2enc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavdevice/v4l2enc.c b/libavdevice/v4l2enc.c
> index efe08b5..c9f8d92 100644
> --- a/libavdevice/v4l2enc.c
> +++ b/libavdevice/v4l2enc.c
> @@ -22,6 +22,7 @@
>  #include "avdevice.h"
>  
>  typedef struct {
> +AVClass *class;
>  int fd;
>  } V4L2Context;
>  

Note: this looks like a regression from f607767d. I quickly checked ALSA,
OSS and sndio which might have been affected by the issue but they seem
fine.

[...]

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] Add support for Opus in MPEG-TS

2014-07-31 Thread Michael Niedermayer
On Mon, Jul 28, 2014 at 02:41:54PM +0100, Kieran Kunhya wrote:
> ---
>  libavcodec/opus.c|   11 +---
>  libavcodec/opus.h|9 +++
>  libavcodec/opus_parser.c |  138 
> +-
>  libavcodec/opusdec.c |1 +
>  libavformat/mpegts.c |   54 ++
>  5 files changed, 192 insertions(+), 21 deletions(-)

how can this be tested ? / do you have a sample ?

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

Avoid a single point of failure, be that a person or equipment.


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


Re: [FFmpeg-devel] [FATESERVER/PATCH] Update to new website style

2014-07-31 Thread Michael Niedermayer
On Wed, Jul 30, 2014 at 03:20:54PM -0700, Timothy Gu wrote:
> Signed-off-by: Timothy Gu 
> ---
>  FATE.pm | 130 --
>  fate.css| 154 
> ++--
>  history.cgi |  32 +++--
>  index.cgi   | 117 -
>  report.cgi  |  46 ++
>  5 files changed, 226 insertions(+), 253 deletions(-)

the bright yellow and green background in the colored table cells
doesnt harmonize that well with the surrounding dark cells
also light gray text on yellow/green is rather hard to read
and theres somethng wrong with the heart icon its much smaller and
unrecognizeable

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

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes


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


Re: [FFmpeg-devel] [PATCH] x86: hevc: adding transform_add

2014-07-31 Thread James Almer
On 31/07/14 11:58 AM, Pierre Edouard Lepere wrote:
> Hi,
> Here's a new version of the patch with the feedback provided.
> 
> Best Regards,
> 
> Pierre-Edouard Lepere

> diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
> index 7469293..658ad5e 100644
> --- a/libavcodec/x86/Makefile
> +++ b/libavcodec/x86/Makefile
> @@ -117,7 +117,8 @@ YASM-OBJS-$(CONFIG_AAC_DECODER)+= x86/sbrdsp.o
>  YASM-OBJS-$(CONFIG_DCA_DECODER)+= x86/dcadsp.o
>  YASM-OBJS-$(CONFIG_HEVC_DECODER)   += x86/hevc_mc.o \
>x86/hevc_deblock.o\
> -  x86/hevc_idct.o
> +  x86/hevc_idct.o   \
> +  x86/hevc_res_add.o
>  YASM-OBJS-$(CONFIG_PNG_DECODER)+= x86/pngdsp.o
>  YASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o
>  YASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o
> diff --git a/libavcodec/x86/hevc_res_add.asm b/libavcodec/x86/hevc_res_add.asm
> new file mode 100644
> index 000..2bfd35d
> --- /dev/null
> +++ b/libavcodec/x86/hevc_res_add.asm
> @@ -0,0 +1,396 @@
> +; /*
> +; * Provide SSE optimizations for transform_add functions for HEVC decoding

nit: SIMD instead of SSE.

> +; * Copyright (c) 2014 Pierre-Edouard LEPERE
> +; *
> +; * 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/x86/x86util.asm"
> +
> +SECTION_RODATA 32
> +max_pixels_10:  times 16  dw ((1 << 10)-1)
> +tr_add_10:  times 4 dd ((1 << 14-10) + 1)

This constant seems unused.

> +
> +
> +SECTION .text
> +
> +;the tr_add macros and functions were largely inspired by x264 project's 
> code in the h264_idct.asm file
> +%macro TR_ADD_MMX_4_8 0
> +mova  m2, [r1]
> +mova  m4, [r1+8]
> +pxor  m3, m3
> +psubw m3, m2
> +packuswb  m2, m2
> +packuswb  m3, m3
> +pxor  m5, m5
> +psubw m5, m4
> +packuswb  m4, m4
> +packuswb  m5, m5
> +
> +movh  m0, [r0 ]
> +movh  m1, [r0+r2  ]
> +paddusb   m0, m2
> +paddusb   m1, m4
> +psubusb   m0, m3
> +psubusb   m1, m5
> +movh   [r0 ], m0
> +movh   [r0+r2  ], m1
> +%endmacro
> +
> +
> +INIT_MMX mmxext
> +; void ff_hevc_tranform_add_8_mmxext(uint8_t *dst, int16_t *coeffs, 
> ptrdiff_t stride)
> +cglobal hevc_transform_add4_8, 3, 4, 6
> +TR_ADD_MMX_4_8
> +add   r1, 16
> +lea   r0, [r0+r2*2]
> +TR_ADD_MMX_4_8
> +RET
> +
> +%macro TR_ADD_SSE_8_8 0
> +pxor  m3, m3
> +mova  m4, [r1]
> +mova  m6, [r1+16]
> +mova  m0, [r1+32]
> +mova  m2, [r1+48]
> +psubw m5, m3, m4
> +psubw m7, m3, m6
> +psubw m1, m3, m0
> +packuswb  m4, m0
> +packuswb  m5, m1
> +psubw m3, m2
> +packuswb  m6, m2
> +packuswb  m7, m3
> +
> +movqm0, [r0 ]
> +movqm1, [r0+r2  ]
> +movhps  m0, [r0+r2*2]
> +movhps  m1, [r0+r3  ]
> +paddusb m0, m4
> +paddusb m1, m6
> +psubusb m0, m5
> +psubusb m1, m7
> +movq [r0 ], m0
> +movq [r0+r2  ], m1
> +movhps   [r0+2*r2], m0
> +movhps   [r0+r3  ], m1
> +%endmacro
> +
> +%macro TR_ADD_INIT_SSE_8 0
> +pxor  m0, m0
> +
> +mova  m4, [r1]
> +mova  m1, [r1+16]
> +psubw m2, m0, m1
> +psubw m5, m0, m4

Add avx versions of add16 and add32 like you originally did for the 10bit 
functions (also with different instruction order depending on avx_enabled if 
possible).
This macro is used up to 16 times in a single function, so all the saved movas 
will make a difference.

> +packuswb  m4, m1
> +packuswb  m5, m2
> +
> +mova  m6, [r1+32]
> +

Re: [FFmpeg-devel] [FATESERVER/PATCH] Update to new website style

2014-07-31 Thread Timothy Gu
On Thu, Jul 31, 2014 at 12:54 PM, Michael Niedermayer  wrote:

> also light gray text on yellow/green is rather hard to read

where? on index page yellow corresponds to black text color, while
green corresponds to white.

> and theres somethng wrong with the heart icon its much smaller and
> unrecognizeable

I can't reproduce this on Chrome, but I can on Firefox. The problem is
that web browsers are supposed to block cross-origin font requests.
Chrome doesn't block it yet, but in Developers Console it outputs a
message:

Blink is considering rejecting non spec-compliant cross-origin web
font requests: https://ffmpeg.org/fonts/fontawesome-webfont.woff?v=4.1.0.
Please use Access-Control-Allow-Origin to make these requests
spec-compliant.

In contrast Firefox blocks it by default, and that's what is causing
the distorted shapes.

While I did add Access-Control-Allow-Origin HTTP header to index.cgi,
as an attempt to silence the warning, it didn't work because the
header is supposed to be outputted by ffmpeg.org.

So there are two options:
- bundle Font Awesome with fateserver (both CSS and font), or
- adding "Access-Control-Allow-Origin: *" or
"Access-Control-Allow-Origin: http://fate.ffmpeg.org"; to the
ffmpeg.org server HTTP header

Which one do you think is better?

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


Re: [FFmpeg-devel] [PATCH] x86/hevc_deblock: use existing x86util transpose macro in chroma_{10, 12}

2014-07-31 Thread Michael Niedermayer
On Tue, Jul 29, 2014 at 06:07:27PM -0300, James Almer wrote:
> Cosmetic change. No measurable difference in speed.
> 
> Signed-off-by: James Almer 
> ---
>  libavcodec/x86/hevc_deblock.asm | 25 -
>  1 file changed, 8 insertions(+), 17 deletions(-)

applied

thanks

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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates


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


Re: [FFmpeg-devel] [FATESERVER/PATCH] Update to new website style

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 02:11:25PM -0700, Timothy Gu wrote:
> On Thu, Jul 31, 2014 at 12:54 PM, Michael Niedermayer  
> wrote:
> 
> > also light gray text on yellow/green is rather hard to read
> 
> where? on index page yellow corresponds to black text color, while
> green corresponds to white.

index, see attached
(was with firefox)
if you cant reproduce, then ill retry and restart firefox to make
sure it doest cache anything


[...]
> While I did add Access-Control-Allow-Origin HTTP header to index.cgi,
> as an attempt to silence the warning, it didn't work because the
> header is supposed to be outputted by ffmpeg.org.
> 
> So there are two options:
> - bundle Font Awesome with fateserver (both CSS and font), or
> - adding "Access-Control-Allow-Origin: *" or
> "Access-Control-Allow-Origin: http://fate.ffmpeg.org"; to the
> ffmpeg.org server HTTP header
> 
> Which one do you think is better?

just putting it on the fate server seems easier, and also might be
more secure

[...]

-- 
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] [FATESERVER/PATCH] Update to new website style

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 11:55:59PM +0200, Michael Niedermayer wrote:
> On Thu, Jul 31, 2014 at 02:11:25PM -0700, Timothy Gu wrote:
> > On Thu, Jul 31, 2014 at 12:54 PM, Michael Niedermayer  
> > wrote:
> > 
> > > also light gray text on yellow/green is rather hard to read
> > 
> > where? on index page yellow corresponds to black text color, while
> > green corresponds to white.
> 
> index, see attached
> (was with firefox)
> if you cant reproduce, then ill retry and restart firefox to make
> sure it doest cache anything

was a firefox cache issue

applied

thanks

[...]

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


[FFmpeg-devel] [PATCH] doc/indevs: mention required configure options

2014-07-31 Thread Lou Logan
For x11grab, libcdio, and libdc1394 input devices.

Signed-off-by: Lou Logan 
---
 doc/indevs.texi | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/indevs.texi b/doc/indevs.texi
index e0e7e67..ce409b9 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -488,7 +488,8 @@ ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
 Audio-CD input device based on cdio.
 
 To enable this input device during configuration you need libcdio
-installed on your system.
+installed on your system. Requires the configure option
+@code{--enable-libcdio}.
 
 This device allows playing and grabbing from an Audio-CD.
 
@@ -502,6 +503,8 @@ ffmpeg -f libcdio -i /dev/sr0 cd.wav
 
 IIDC1394 input device, based on libdc1394 and libraw1394.
 
+Requires the configure option @code{--enable-libdc1394}.
+
 @section openal
 
 The OpenAL input device provides audio capture on all systems with a
@@ -830,6 +833,9 @@ other filename will be interpreted as device number 0.
 
 X11 video input device.
 
+Depends on X11, Xext, and Xfixes. Requires the configure option
+@code{--enable-x11grab}.
+
 This device allows one to capture a region of an X11 display.
 
 The filename passed as input has the syntax:
-- 
2.0.2

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


Re: [FFmpeg-devel] [PATCH] doc/indevs: mention required configure options

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 03:04:18PM -0800, Lou Logan wrote:
> For x11grab, libcdio, and libdc1394 input devices.
> 
> Signed-off-by: Lou Logan 
> ---
>  doc/indevs.texi | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

LGTM

[...]
-- 
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] h264_mp4toannexb_bsf: always set idr_sps_pps_seen when SPS/PPS is seen.

2014-07-31 Thread Michael Niedermayer
On Thu, Jul 31, 2014 at 03:40:51PM +0200, Benoit Fouet wrote:
> In order not to break a sequence like "SPS IDR SPS IDR", the boolean
> telling that the SPS/PPS has been seen should always be set.
> ---
>  libavcodec/h264_mp4toannexb_bsf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

[...]
-- 
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


[FFmpeg-devel] [PATCH]Do not select a default subtitle output stream with incorrect subtitle type

2014-07-31 Thread Carl Eugen Hoyos
Hi!

When transcoding an input file with subtitles to mkv, ffmpeg by default tries 
to encode the subtitles even if the input contains bitmap subtitles.
Attached patch should fix this issue reported in ticket #3819 (and before 
iirc).

This patch currently does not work correctly for teletext input streams 
because no properties are defined for teletext, I suspect it should be 
(AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB). In any case, this 
corner-case should not affect this patch imo.

Please review, Carl Eugen
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 2adefc5..6e12ab2 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1869,8 +1869,16 @@ static int open_output_file(OptionsContext *o, const 
char *filename)
 if (!o->subtitle_disable && 
(avcodec_find_encoder(oc->oformat->subtitle_codec) || subtitle_codec_name)) {
 for (i = 0; i < nb_input_streams; i++)
 if (input_streams[i]->st->codec->codec_type == 
AVMEDIA_TYPE_SUBTITLE) {
-new_subtitle_stream(o, oc, i);
-break;
+if (subtitle_codec_name ||
+avcodec_find_encoder(oc->oformat->subtitle_codec) &&
+
avcodec_descriptor_get(avcodec_find_encoder(oc->oformat->subtitle_codec)->id) &&
+
avcodec_descriptor_get(input_streams[i]->st->codec->codec_id) &&
+
avcodec_descriptor_get(avcodec_find_encoder(oc->oformat->subtitle_codec)->id)->props
 &
+
avcodec_descriptor_get(input_streams[i]->st->codec->codec_id)->props &
+(AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB)) {
+new_subtitle_stream(o, oc, i);
+break;
+}
 }
 }
 /* do something with data? */
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] doc/indevs: mention required configure options

2014-07-31 Thread Lou Logan
On Fri, 1 Aug 2014 01:42:55 +0200, Michael Niedermayer wrote:

> LGTM

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


Re: [FFmpeg-devel] [PATCH 4/4] lavfi/vf_fps: accept EOF timestamp.

2014-07-31 Thread Carl Eugen Hoyos
Nicolas George  nsup.org> writes:

> This makes the FPS filter duplicate the last frame to take
> its duration into account, exactly like the other ones.
> 
> TODO find corresponding trac ticket(s).

I didn't test but this may be ticket #2674.

Carl Eugen

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


[FFmpeg-devel] FFmpeg and OPW

2014-07-31 Thread Michael Niedermayer
Hi all

OPW (Outreach Program for Women) is twice per year (compared to google
summer of code which is just once a year)

FFmpeg can participate in the next round but we need to fund at least
1 intern/student (6250 USD) for that. OPW is not run by a large
corporation with deep pockets.

Thus my mail here, if you are/represent a company or know one who does
and who uses and benefits from FFmpeg, and has the financial resources,
please consider to donate or ask/forward this mail.

Why should you donate?
Well the money will be used to fund a intern working on and improving
FFmpeg. (assuming there will be a intern who wants to work on FFmpeg
in OPW)
Maybe it will be a failure, maybe it will lead to some minor
improvments in FFmpeg, maybe it will majorly improve FFmpeg. And
maybe we gain a new long term contributor.
And improvments in FFmpeg again benefit you as company or user of
FFmpeg.

Also if you donate 6250$ to OPW for ffmpeg you get your logo at
https://gnome.org/opw/

Either way for FFmpeg to be part of the next OPW round
we need at least 1 payment commitment of 6250 USD by the end of August
at the latest

Please keep o...@ffmpeg.org in CC if you have questions or want to
donate.

PS: there are 2 ways to donate, one is directly to OPW/Gnome, this way
you get your logo at gnome.org/opw if you donate at least 6250USD
or through
https://co.clickandpledge.com/advanced/default.aspx?wid=56226
for smaller sums.

PS2: in case we get more than 6250$, on our SPI (clickandpledge)
account the additional funding may be used for future ffmpeg-OPW
rounds or things similar in spirit to OPW and GSOC.

Thanks!

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