Re: [FFmpeg-devel] PATCH: dshow: don't add two instances of same device to graphs

2016-06-22 Thread Michael Niedermayer
On Tue, Jun 21, 2016 at 08:06:09AM -0600, Roger Pack wrote:
> On 6/17/16, Roger Pack  wrote:
> > On 6/15/16, Clément Bœsch  wrote:
> >> On Wed, Jun 15, 2016 at 02:54:09AM -0600, Roger Pack wrote:
> >>> A handful of devices don't support this, and the rest work fine with it
> >>> :)
> >>>
> >>> -roger-
> >>
> >>> From e724d7f169bcae3217455cd88f9c023d275d367a Mon Sep 17 00:00:00 2001
> >>> From: rogerdpack 
> >>> Date: Wed, 15 Jun 2016 02:17:11 -0600
> >>> Subject: [PATCH] dshow: don't add two instances of same device to graphs
> >>>
> >>> Signed-off-by: rogerdpack 
> >>> ---
> >>>  libavdevice/dshow.c | 37 ++---
> >>>  libavdevice/dshow_capture.h |  2 ++
> >>>  2 files changed, 32 insertions(+), 7 deletions(-)
> >>>
> >>> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> >>> index 5f2cad7..e1ac855 100644
> >>> --- a/libavdevice/dshow.c
> >>> +++ b/libavdevice/dshow.c
> >>> @@ -108,6 +108,10 @@ dshow_read_close(AVFormatContext *s)
> >>>  av_freep(>device_name[0]);
> >>>  if (ctx->device_name[1])
> >>>  av_freep(>device_name[1]);
> >>
> >>> +if (ctx->device_unique_name[0])
> >>> +av_freep(>device_unique_name[0]);
> >>> +if (ctx->device_unique_name[1])
> >>> +av_freep(>device_unique_name[1]);
> >>
> >> I can't comment the rest of the patch, but please remove the ifs. They
> >> are,
> >> and always were, totally useless. Just like those above.
> >
> > OK see also attached patch, to be applied after patch 1.
> > Thanks, will wait three days and if no objections, request these
> > patches be committed.
> 
> OK would some kind soul please commit these for me?

applied

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


Re: [FFmpeg-devel] [PATCH] libavformat/matroskaenc: omit segment UID for webm

2016-06-22 Thread Michael Niedermayer
On Tue, Jun 21, 2016 at 04:38:55PM -0400, Dave Rice wrote:
> 
> > On Jun 21, 2016, at 3:22 PM, Michael Niedermayer  
> > wrote:
> > 
> > On Mon, Jun 20, 2016 at 08:20:47PM -0700, Michael Bradshaw wrote:
> >> Hi,
> >> 
> >> Attached patch removes SegmentUID element from WebM files, as it's
> >> unsupported in WebM[1].
> >> 
> >> Please review/apply.
> >> 
> >> Thanks,
> >> 
> >> Michael
> >> 
> >> [1]: https://www.webmproject.org/docs/container/#SegmentUID
> > 
> > what does "supported" / "unsupported" mean, is this defined somewhere ?
> > 
> > In a format something can be
> > Forbidden, aka
> >you write it you are buggy, you see it you can bail out
> > 
> > Required, aka
> >you dont write it you are buggy, you dont see it you can bail out
> > 
> > Optional-Ignore, aka
> >you may write it if you like, you may ignore it if you like, you must 
> > not bail out
> > 
> > Optional-Fail, aka
> >you may write it if you like, you may bail out if you see it
> > 
> > Undefined-Ignore
> >you write it you are buggy, you may ignore it if you like, you must not 
> > bail out
> > 
> > 
> > The reason why this question matters is because
> > If its forbidden to be written then the patch is correct and the
> > only option, OTOH
> > if its allowed to be written but the demuxer can ignore it there may
> > or may not be arguments to write it anyway
> 
> [...]
> 
> From my reading of the current EBML specification this is "Undefined-Ignore", 
> but is also something that should not be done. The closest sentence on this 
> from the EBML specification seems to be: "Element Data stored within 
> Master-elements SHOULD only consist of EBML Elements and SHOULD NOT contain 
> any data that is not part of an EBML Element." I think "EBML Element" in this 
> case should be considered to mean "EBML Elements as defined by the EBML 
> DocType". The webm EBML Schema does not define a SegmentUID Element as 
> Matroska does, so the Element is meaningless in webm. It may happen to follow 
> the EBML Header pattern but in the context of webm it is junk data.

applied

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus


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


[FFmpeg-devel] [PATCH 7/8] avdevice/decklink: add support for audio and video input selection

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 doc/indevs.texi | 10 ++
 libavdevice/decklink_common.cpp | 43 +
 libavdevice/decklink_common.h   | 21 
 libavdevice/decklink_common_c.h |  2 ++
 libavdevice/decklink_dec.cpp|  5 +
 libavdevice/decklink_dec_c.c| 16 +++
 6 files changed, 97 insertions(+)

diff --git a/doc/indevs.texi b/doc/indevs.texi
index 479932a..5239287 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -255,6 +255,16 @@ Defaults to @samp{2}.
 Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or 
@samp{full}.
 Defaults to @samp{unset}.
 
+@item video_input
+Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi},
+@samp{optical_sdi}, @samp{component}, @samp{composite} or @samp{s_video}.
+Defaults to @samp{unset}.
+
+@item audio_input
+Sets the audio input source. Must be @samp{unset}, @samp{embedded},
+@samp{aes_ebu}, @samp{analog}, @samp{analog_xlr}, @samp{analog_rca} or
+@samp{microphone}. Defaults to @samp{unset}.
+
 @end table
 
 @subsection Examples
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index c6e127e..1ef521b 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -98,6 +98,35 @@ HRESULT ff_decklink_get_display_name(IDeckLink *This, const 
char **displayName)
 return hr;
 }
 
+static int decklink_select_input(AVFormatContext *avctx, 
BMDDeckLinkConfigurationID cfg_id)
+{
+struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
+struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
+BMDDeckLinkAttributeID attr_id = (cfg_id == 
bmdDeckLinkConfigAudioInputConnection) ? BMDDeckLinkAudioInputConnections : 
BMDDeckLinkVideoInputConnections;
+int64_t bmd_input  = (cfg_id == 
bmdDeckLinkConfigAudioInputConnection) ? ctx->audio_input : ctx->video_input;
+const char *type_name  = (cfg_id == 
bmdDeckLinkConfigAudioInputConnection) ? "audio" : "video";
+int64_t supported_connections = 0;
+HRESULT res;
+
+if (bmd_input) {
+res = ctx->attr->GetInt(attr_id, _connections);
+if (res != S_OK) {
+av_log(avctx, AV_LOG_ERROR, "Failed to query supported %s 
inputs.\n", type_name);
+return AVERROR_EXTERNAL;
+}
+if ((supported_connections & bmd_input) != bmd_input) {
+av_log(avctx, AV_LOG_ERROR, "Device does not support selected %s 
input.\n", type_name);
+return AVERROR(ENOSYS);
+}
+res = ctx->cfg->SetInt(cfg_id, bmd_input);
+if (res != S_OK) {
+av_log(avctx, AV_LOG_WARNING, "Failed to select %s input.\n", 
type_name);
+return AVERROR_EXTERNAL;
+}
+}
+return 0;
+}
+
 int ff_decklink_set_format(AVFormatContext *avctx,
int width, int height,
int tb_num, int tb_den,
@@ -129,6 +158,13 @@ int ff_decklink_set_format(AVFormatContext *avctx,
 }
 
 if (direction == DIRECTION_IN) {
+int ret;
+ret = decklink_select_input(avctx, 
bmdDeckLinkConfigAudioInputConnection);
+if (ret < 0)
+return ret;
+ret = decklink_select_input(avctx, 
bmdDeckLinkConfigVideoInputConnection);
+if (ret < 0)
+return ret;
 res = ctx->dli->GetDisplayModeIterator ();
 } else {
 res = ctx->dlo->GetDisplayModeIterator ();
@@ -224,6 +260,13 @@ int ff_decklink_list_formats(AVFormatContext *avctx, 
decklink_direction_t direct
 HRESULT res;
 
 if (direction == DIRECTION_IN) {
+int ret;
+ret = decklink_select_input(avctx, 
bmdDeckLinkConfigAudioInputConnection);
+if (ret < 0)
+return ret;
+ret = decklink_select_input(avctx, 
bmdDeckLinkConfigVideoInputConnection);
+if (ret < 0)
+return ret;
 res = ctx->dli->GetDisplayModeIterator ();
 } else {
 res = ctx->dlo->GetDisplayModeIterator ();
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 201eb15..44edf19 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -53,6 +53,8 @@ struct decklink_ctx {
 BMDTimeValue bmd_tb_den;
 BMDTimeValue bmd_tb_num;
 BMDDisplayMode bmd_mode;
+BMDVideoConnection video_input;
+BMDAudioConnection audio_input;
 int bmd_width;
 int bmd_height;
 int bmd_field_dominance;
@@ -102,6 +104,25 @@ IDeckLinkIterator *CreateDeckLinkIteratorInstance(void);
 typedef uint32_t buffercount_type;
 #endif
 
+static const BMDAudioConnection decklink_audio_connection_map[] = {
+0,
+bmdAudioConnectionEmbedded,
+bmdAudioConnectionAESEBU,
+bmdAudioConnectionAnalog,
+bmdAudioConnectionAnalogXLR,
+bmdAudioConnectionAnalogRCA,
+bmdAudioConnectionMicrophone,
+};
+
+static const BMDVideoConnection 

[FFmpeg-devel] [PATCH 6/8] avdevice/decklink: add support for setting duplex mode

2016-06-22 Thread Marton Balint
This patch also makes BlackMagic drivers v10.6.1 a hard requirement.

Signed-off-by: Marton Balint 
---
 configure   |  3 ++-
 doc/indevs.texi |  4 
 libavdevice/decklink_common.cpp | 33 +
 libavdevice/decklink_common.h   |  3 +++
 libavdevice/decklink_common_c.h |  1 +
 libavdevice/decklink_dec.cpp|  1 +
 libavdevice/decklink_dec_c.c|  4 
 7 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index e6ebd3b..4028cd1 100755
--- a/configure
+++ b/configure
@@ -5619,7 +5619,8 @@ enabled cuvid && { check_lib cuviddec.h 
cuvidCreateDecoder -lnvcuvid
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
 enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled coreimagesrc_filter && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimagesrc_filter; }
-enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
+enabled decklink  && { { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; } &&
+   { check_cpp_condition DeckLinkAPIVersion.h 
"BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API 
version must be >= 10.6.1."; } }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
 enabled gnutls&& require_pkg_config gnutls gnutls/gnutls.h 
gnutls_global_init
diff --git a/doc/indevs.texi b/doc/indevs.texi
index 3fb852b..479932a 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -251,6 +251,10 @@ To use this option, ffmpeg needs to be compiled with 
@code{--enable-libzvbi}.
 Defines number of audio channels to capture. Must be @samp{2}, @samp{8} or 
@samp{16}.
 Defaults to @samp{2}.
 
+@item duplex_mode
+Sets the decklink device duplex mode. Must be @samp{unset}, @samp{half} or 
@samp{full}.
+Defaults to @samp{unset}.
+
 @end table
 
 @subsection Examples
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 2711fc1..c6e127e 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -111,6 +111,23 @@ int ff_decklink_set_format(AVFormatContext *avctx,
 int i = 1;
 HRESULT res;
 
+if (ctx->duplex_mode) {
+bool duplex_supported = false;
+
+if (ctx->attr->GetFlag(BMDDeckLinkSupportsDuplexModeConfiguration, 
_supported) != S_OK)
+duplex_supported = false;
+
+if (duplex_supported) {
+res = ctx->cfg->SetInt(bmdDeckLinkConfigDuplexMode, 
ctx->duplex_mode == 2 ? bmdDuplexModeFull : bmdDuplexModeHalf);
+if (res != S_OK)
+av_log(avctx, AV_LOG_WARNING, "Setting duplex mode failed.\n");
+else
+av_log(avctx, AV_LOG_VERBOSE, "Succesfully set duplex mode to 
%s duplex.\n", ctx->duplex_mode == 2 ? "full" : "half");
+} else {
+av_log(avctx, AV_LOG_WARNING, "Unable to set duplex mode, because 
it is not supported.\n");
+}
+}
+
 if (direction == DIRECTION_IN) {
 res = ctx->dli->GetDisplayModeIterator ();
 } else {
@@ -249,6 +266,10 @@ void ff_decklink_cleanup(AVFormatContext *avctx)
 ctx->dli->Release();
 if (ctx->dlo)
 ctx->dlo->Release();
+if (ctx->attr)
+ctx->attr->Release();
+if (ctx->cfg)
+ctx->cfg->Release();
 if (ctx->dl)
 ctx->dl->Release();
 }
@@ -279,5 +300,17 @@ int ff_decklink_init_device(AVFormatContext *avctx, const 
char* name)
 if (!ctx->dl)
 return AVERROR(ENXIO);
 
+if (ctx->dl->QueryInterface(IID_IDeckLinkConfiguration, (void 
**)>cfg) != S_OK) {
+av_log(avctx, AV_LOG_ERROR, "Could not get configuration interface for 
'%s'\n", name);
+ff_decklink_cleanup(avctx);
+return AVERROR_EXTERNAL;
+}
+
+if (ctx->dl->QueryInterface(IID_IDeckLinkAttributes, (void **)>attr) 
!= S_OK) {
+av_log(avctx, AV_LOG_ERROR, "Could not get attributes interaface for 
'%s'\n", name);
+ff_decklink_cleanup(avctx);
+return AVERROR_EXTERNAL;
+}
+
 return 0;
 }
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index ee39ff2..201eb15 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -44,6 +44,8 @@ struct decklink_ctx {
 IDeckLink *dl;
 IDeckLinkOutput *dlo;
 IDeckLinkInput *dli;
+IDeckLinkConfiguration *cfg;
+IDeckLinkAttributes *attr;
 decklink_output_callback *output_callback;
 decklink_input_callback *input_callback;
 
@@ -77,6 +79,7 @@ struct decklink_ctx {
 int list_formats;
 int64_t teletext_lines;
 double preroll;
+int duplex_mode;
 
 int frames_preroll;
 int frames_buffer;

[FFmpeg-devel] [PATCH 8/8] avdevice/decklink: add support for setting input packet timestamp source

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 doc/indevs.texi |  8 ++
 libavdevice/decklink_common.h   |  2 ++
 libavdevice/decklink_common_c.h |  9 ++
 libavdevice/decklink_dec.cpp| 62 +++--
 libavdevice/decklink_dec_c.c|  6 
 5 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/doc/indevs.texi b/doc/indevs.texi
index 5239287..9e91455 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -265,6 +265,14 @@ Sets the audio input source. Must be @samp{unset}, 
@samp{embedded},
 @samp{aes_ebu}, @samp{analog}, @samp{analog_xlr}, @samp{analog_rca} or
 @samp{microphone}. Defaults to @samp{unset}.
 
+@item video_pts
+Sets the video packet timestamp source. Must @samp{video}, @samp{audio},
+@samp{reference} or @samp{wallclock}. Defaults to @samp{video}.
+
+@item audio_pts
+Sets the audio packet timestamp source. Must @samp{video}, @samp{audio},
+@samp{reference} or @samp{wallclock}. Defaults to @samp{audio}.
+
 @end table
 
 @subsection Examples
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 44edf19..a4ac303 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -82,6 +82,8 @@ struct decklink_ctx {
 int64_t teletext_lines;
 double preroll;
 int duplex_mode;
+DecklinkPtsSource audio_pts_source;
+DecklinkPtsSource video_pts_source;
 
 int frames_preroll;
 int frames_buffer;
diff --git a/libavdevice/decklink_common_c.h b/libavdevice/decklink_common_c.h
index 8de853d..3c5f218 100644
--- a/libavdevice/decklink_common_c.h
+++ b/libavdevice/decklink_common_c.h
@@ -22,6 +22,13 @@
 #ifndef AVDEVICE_DECKLINK_COMMON_C_H
 #define AVDEVICE_DECKLINK_COMMON_C_H
 
+typedef enum DecklinkPtsSource {
+PTS_SRC_AUDIO = 1,
+PTS_SRC_VIDEO = 2,
+PTS_SRC_REFERENCE = 3,
+PTS_SRC_WALLCLOCK = 4,
+} DecklinkPtsSource;
+
 struct decklink_cctx {
 const AVClass *cclass;
 
@@ -35,6 +42,8 @@ struct decklink_cctx {
 int v210;
 int audio_channels;
 int duplex_mode;
+DecklinkPtsSource audio_pts_source;
+DecklinkPtsSource video_pts_source;
 int audio_input;
 int video_input;
 };
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 7f45224..fcb024e 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -28,8 +28,11 @@ extern "C" {
 #include "config.h"
 #include "libavformat/avformat.h"
 #include "libavformat/internal.h"
+#include "libavutil/avutil.h"
 #include "libavutil/common.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/time.h"
+#include "libavutil/mathematics.h"
 #if CONFIG_LIBZVBI
 #include 
 #endif
@@ -237,6 +240,44 @@ ULONG decklink_input_callback::Release(void)
 return (ULONG)m_refCount;
 }
 
+static int64_t get_pkt_pts(IDeckLinkVideoInputFrame *videoFrame,
+   IDeckLinkAudioInputPacket *audioFrame,
+   int64_t wallclock,
+   DecklinkPtsSource pts_src,
+   AVRational time_base, int64_t *initial_pts)
+{
+int64_t pts = AV_NOPTS_VALUE;
+BMDTimeValue bmd_pts;
+BMDTimeValue bmd_duration;
+HRESULT res = E_INVALIDARG;
+switch (pts_src) {
+case PTS_SRC_AUDIO:
+if (audioFrame)
+res = audioFrame->GetPacketTime(_pts, time_base.den);
+break;
+case PTS_SRC_VIDEO:
+if (videoFrame)
+res = videoFrame->GetStreamTime(_pts, _duration, 
time_base.den);
+break;
+case PTS_SRC_REFERENCE:
+if (videoFrame)
+res = videoFrame->GetHardwareReferenceTimestamp(time_base.den, 
_pts, _duration);
+break;
+case PTS_SRC_WALLCLOCK:
+pts = av_rescale_q(wallclock, AV_TIME_BASE_Q, time_base);
+break;
+}
+if (res == S_OK)
+pts = bmd_pts / time_base.num;
+
+if (pts != AV_NOPTS_VALUE && *initial_pts == AV_NOPTS_VALUE)
+*initial_pts = pts;
+if (*initial_pts != AV_NOPTS_VALUE)
+pts -= *initial_pts;
+
+return pts;
+}
+
 HRESULT decklink_input_callback::VideoInputFrameArrived(
 IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket 
*audioFrame)
 {
@@ -244,8 +285,11 @@ HRESULT decklink_input_callback::VideoInputFrameArrived(
 void *audioFrameBytes;
 BMDTimeValue frameTime;
 BMDTimeValue frameDuration;
+int64_t wallclock = 0;
 
 ctx->frameCount++;
+if (ctx->audio_pts_source == PTS_SRC_WALLCLOCK || ctx->video_pts_source == 
PTS_SRC_WALLCLOCK)
+wallclock = av_gettime_relative();
 
 // Handle Video Frame
 if (videoFrame) {
@@ -292,13 +336,7 @@ HRESULT decklink_input_callback::VideoInputFrameArrived(
 no_video = 0;
 }
 
-pkt.pts = frameTime / ctx->video_st->time_base.num;
-
-if (initial_video_pts == AV_NOPTS_VALUE) {
-initial_video_pts = pkt.pts;
-}
-
-

[FFmpeg-devel] [PATCH 5/8] avdevice/decklink: always free decklink resources on error

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavdevice/decklink_dec.cpp | 18 --
 libavdevice/decklink_enc.cpp | 12 ++--
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 0d78942..371be20 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -486,21 +486,21 @@ av_cold int ff_decklink_read_header(AVFormatContext 
*avctx)
 if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) >dli) != 
S_OK) {
 av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n",
avctx->filename);
-ctx->dl->Release();
-return AVERROR(EIO);
+ret = AVERROR(EIO);
+goto error;
 }
 
 /* List supported formats. */
 if (ctx->list_formats) {
 ff_decklink_list_formats(avctx, DIRECTION_IN);
-ctx->dli->Release();
-ctx->dl->Release();
-return AVERROR_EXIT;
+ret = AVERROR_EXIT;
+goto error;
 }
 
 if (mode_num > 0) {
 if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) {
 av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", 
mode_num, fname);
+ret = AVERROR(EIO);
 goto error;
 }
 }
@@ -509,6 +509,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 st = avformat_new_stream(avctx, NULL);
 if (!st) {
 av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n");
+ret = AVERROR(ENOMEM);
 goto error;
 }
 st->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
@@ -521,6 +522,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 st = avformat_new_stream(avctx, NULL);
 if (!st) {
 av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n");
+ret = AVERROR(ENOMEM);
 goto error;
 }
 st->codecpar->codec_type  = AVMEDIA_TYPE_VIDEO;
@@ -549,6 +551,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 st = avformat_new_stream(avctx, NULL);
 if (!st) {
 av_log(avctx, AV_LOG_ERROR, "Cannot add stream\n");
+ret = AVERROR(ENOMEM);
 goto error;
 }
 st->codecpar->codec_type  = AVMEDIA_TYPE_SUBTITLE;
@@ -564,6 +567,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 
 if (result != S_OK) {
 av_log(avctx, AV_LOG_ERROR, "Cannot enable audio input\n");
+ret = AVERROR(EIO);
 goto error;
 }
 
@@ -573,6 +577,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 
 if (result != S_OK) {
 av_log(avctx, AV_LOG_ERROR, "Cannot enable video input\n");
+ret = AVERROR(EIO);
 goto error;
 }
 
@@ -580,6 +585,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 
 if (decklink_start_input (avctx) != S_OK) {
 av_log(avctx, AV_LOG_ERROR, "Cannot start input stream\n");
+ret = AVERROR(EIO);
 goto error;
 }
 
@@ -587,7 +593,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 
 error:
 ff_decklink_cleanup(avctx);
-return AVERROR(EIO);
+return ret;
 }
 
 int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt)
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index f59bd82..5e796fa 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -337,19 +337,19 @@ av_cold int ff_decklink_write_header(AVFormatContext 
*avctx)
 if (ctx->dl->QueryInterface(IID_IDeckLinkOutput, (void **) >dlo) != 
S_OK) {
 av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n",
avctx->filename);
-ctx->dl->Release();
-return AVERROR(EIO);
+ret = AVERROR(EIO);
+goto error;
 }
 
 /* List supported formats. */
 if (ctx->list_formats) {
 ff_decklink_list_formats(avctx);
-ctx->dlo->Release();
-ctx->dl->Release();
-return AVERROR_EXIT;
+ret = AVERROR_EXIT;
+goto error;
 }
 
 /* Setup streams. */
+ret = AVERROR(EIO);
 for (n = 0; n < avctx->nb_streams; n++) {
 AVStream *st = avctx->streams[n];
 AVCodecContext *c = st->codec;
@@ -369,7 +369,7 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
 
 error:
 ff_decklink_cleanup(avctx);
-return AVERROR(EIO);
+return ret;
 }
 
 int ff_decklink_write_packet(AVFormatContext *avctx, AVPacket *pkt)
-- 
2.6.6

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


[FFmpeg-devel] [PATCH 2/8] avdevice/decklink: factorize cleanup function to common code

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavdevice/decklink_common.cpp | 13 +
 libavdevice/decklink_common.h   |  1 +
 libavdevice/decklink_dec.cpp| 11 ++-
 libavdevice/decklink_enc.cpp| 10 ++
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index ac7964c..43599b6 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -239,3 +239,16 @@ int ff_decklink_list_formats(AVFormatContext *avctx, 
decklink_direction_t direct
 
 return 0;
 }
+
+void ff_decklink_cleanup(AVFormatContext *avctx)
+{
+struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
+struct decklink_ctx *ctx = (struct decklink_ctx *) cctx->ctx;
+
+if (ctx->dli)
+ctx->dli->Release();
+if (ctx->dlo)
+ctx->dlo->Release();
+if (ctx->dl)
+ctx->dl->Release();
+}
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index dff4fc1..1a9feeb 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -105,5 +105,6 @@ int ff_decklink_set_format(AVFormatContext *avctx, int 
width, int height, int tb
 int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t 
direction, int num);
 int ff_decklink_list_devices(AVFormatContext *avctx);
 int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t 
direction = DIRECTION_OUT);
+void ff_decklink_cleanup(AVFormatContext *avctx);
 
 #endif /* AVDEVICE_DECKLINK_COMMON_H */
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 3b5d4be..8b57e0c 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -419,11 +419,7 @@ av_cold int ff_decklink_read_close(AVFormatContext *avctx)
 ctx->dli->DisableAudioInput();
 }
 
-if (ctx->dli)
-ctx->dli->Release();
-if (ctx->dl)
-ctx->dl->Release();
-
+ff_decklink_cleanup(avctx);
 avpacket_queue_end(>queue);
 
 av_freep(>ctx);
@@ -620,10 +616,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 return 0;
 
 error:
-
-ctx->dli->Release();
-ctx->dl->Release();
-
+ff_decklink_cleanup(avctx);
 return AVERROR(EIO);
 }
 
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 6c5450f..4d00a53 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -193,10 +193,7 @@ av_cold int ff_decklink_write_trailer(AVFormatContext 
*avctx)
 ctx->dlo->DisableAudioOutput();
 }
 
-if (ctx->dlo)
-ctx->dlo->Release();
-if (ctx->dl)
-ctx->dl->Release();
+ff_decklink_cleanup(avctx);
 
 if (ctx->output_callback)
 delete ctx->output_callback;
@@ -400,10 +397,7 @@ av_cold int ff_decklink_write_header(AVFormatContext 
*avctx)
 return 0;
 
 error:
-
-ctx->dlo->Release();
-ctx->dl->Release();
-
+ff_decklink_cleanup(avctx);
 return AVERROR(EIO);
 }
 
-- 
2.6.6

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


[FFmpeg-devel] [PATCH 1/8] avdevice/decklink_dec: fix bitrate calculations

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavdevice/decklink_dec.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 1c305f3..3b5d4be 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -563,15 +563,16 @@ av_cold int ff_decklink_read_header(AVFormatContext 
*avctx)
 
 st->time_base.den  = ctx->bmd_tb_den;
 st->time_base.num  = ctx->bmd_tb_num;
-st->codecpar->bit_rate= 
av_image_get_buffer_size((AVPixelFormat)st->codecpar->format, ctx->bmd_width, 
ctx->bmd_height, 1) * 1/av_q2d(st->time_base) * 8;
 
 if (cctx->v210) {
 st->codecpar->codec_id= AV_CODEC_ID_V210;
 st->codecpar->codec_tag   = MKTAG('V', '2', '1', '0');
+st->codecpar->bit_rate= av_rescale(ctx->bmd_width * 
ctx->bmd_height * 64, st->time_base.den, st->time_base.num * 3);
 } else {
 st->codecpar->codec_id= AV_CODEC_ID_RAWVIDEO;
 st->codecpar->format  = AV_PIX_FMT_UYVY422;
 st->codecpar->codec_tag   = MKTAG('U', 'Y', 'V', 'Y');
+st->codecpar->bit_rate= av_rescale(ctx->bmd_width * 
ctx->bmd_height * 16, st->time_base.den, st->time_base.num);
 }
 
 avpriv_set_pts_info(st, 64, 1, 100);  /* 64 bits pts in us */
-- 
2.6.6

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


[FFmpeg-devel] [PATCH 4/8] avdevice/decklink: factorize device finder function

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavdevice/decklink_common.cpp | 29 +
 libavdevice/decklink_common.h   |  1 +
 libavdevice/decklink_dec.cpp| 29 -
 libavdevice/decklink_enc.cpp| 29 -
 4 files changed, 38 insertions(+), 50 deletions(-)

diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index 43599b6..2711fc1 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -252,3 +252,32 @@ void ff_decklink_cleanup(AVFormatContext *avctx)
 if (ctx->dl)
 ctx->dl->Release();
 }
+
+int ff_decklink_init_device(AVFormatContext *avctx, const char* name)
+{
+struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
+struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
+IDeckLink *dl = NULL;
+IDeckLinkIterator *iter = CreateDeckLinkIteratorInstance();
+if (!iter) {
+av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n");
+return AVERROR_EXTERNAL;
+}
+
+while (iter->Next() == S_OK) {
+const char *displayName;
+ff_decklink_get_display_name(dl, );
+if (!strcmp(name, displayName)) {
+av_free((void *)displayName);
+ctx->dl = dl;
+break;
+}
+av_free((void *)displayName);
+dl->Release();
+}
+iter->Release();
+if (!ctx->dl)
+return AVERROR(ENXIO);
+
+return 0;
+}
diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h
index 1a9feeb..ee39ff2 100644
--- a/libavdevice/decklink_common.h
+++ b/libavdevice/decklink_common.h
@@ -106,5 +106,6 @@ int ff_decklink_set_format(AVFormatContext *avctx, 
decklink_direction_t directio
 int ff_decklink_list_devices(AVFormatContext *avctx);
 int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t 
direction = DIRECTION_OUT);
 void ff_decklink_cleanup(AVFormatContext *avctx);
+int ff_decklink_init_device(AVFormatContext *avctx, const char* name);
 
 #endif /* AVDEVICE_DECKLINK_COMMON_H */
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 0d652bc..0d78942 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -431,13 +431,12 @@ av_cold int ff_decklink_read_header(AVFormatContext 
*avctx)
 {
 struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
 struct decklink_ctx *ctx;
-IDeckLinkIterator *iter;
-IDeckLink *dl = NULL;
 AVStream *st;
 HRESULT result;
 char fname[1024];
 char *tmp;
 int mode_num = 0;
+int ret;
 
 ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx));
 if (!ctx)
@@ -466,12 +465,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 return AVERROR(EINVAL);
 }
 
-iter = CreateDeckLinkIteratorInstance();
-if (!iter) {
-av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n");
-return AVERROR(EIO);
-}
-
 /* List available devices. */
 if (ctx->list_devices) {
 ff_decklink_list_devices(avctx);
@@ -485,23 +478,9 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 *tmp = 0;
 }
 
-/* Open device. */
-while (iter->Next() == S_OK) {
-const char *displayName;
-ff_decklink_get_display_name(dl, );
-if (!strcmp(fname, displayName)) {
-av_free((void *) displayName);
-ctx->dl = dl;
-break;
-}
-av_free((void *) displayName);
-dl->Release();
-}
-iter->Release();
-if (!ctx->dl) {
-av_log(avctx, AV_LOG_ERROR, "Could not open '%s'\n", fname);
-return AVERROR(EIO);
-}
+ret = ff_decklink_init_device(avctx, fname);
+if (ret < 0)
+return ret;
 
 /* Get input device. */
 if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) >dli) != 
S_OK) {
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 3f4b22c..f59bd82 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -312,9 +312,8 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
 {
 struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
 struct decklink_ctx *ctx;
-IDeckLinkIterator *iter;
-IDeckLink *dl = NULL;
 unsigned int n;
+int ret;
 
 ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx));
 if (!ctx)
@@ -324,35 +323,15 @@ av_cold int ff_decklink_write_header(AVFormatContext 
*avctx)
 ctx->preroll  = cctx->preroll;
 cctx->ctx = ctx;
 
-iter = CreateDeckLinkIteratorInstance();
-if (!iter) {
-av_log(avctx, AV_LOG_ERROR, "Could not create DeckLink iterator\n");
-return AVERROR(EIO);
-}
-
 /* List available devices. */
 if (ctx->list_devices) {
 ff_decklink_list_devices(avctx);
 return 

[FFmpeg-devel] [PATCH 3/8] avdevice/decklink: remove unused itermode iterators

2016-06-22 Thread Marton Balint
Signed-off-by: Marton Balint 
---
 libavdevice/decklink_dec.cpp | 9 -
 libavdevice/decklink_enc.cpp | 8 
 2 files changed, 17 deletions(-)

diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 8b57e0c..0d652bc 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -431,7 +431,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 {
 struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
 struct decklink_ctx *ctx;
-IDeckLinkDisplayModeIterator *itermode;
 IDeckLinkIterator *iter;
 IDeckLink *dl = NULL;
 AVStream *st;
@@ -520,12 +519,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 return AVERROR_EXIT;
 }
 
-if (ctx->dli->GetDisplayModeIterator() != S_OK) {
-av_log(avctx, AV_LOG_ERROR, "Could not get Display Mode Iterator\n");
-ctx->dl->Release();
-return AVERROR(EIO);
-}
-
 if (mode_num > 0) {
 if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) {
 av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", 
mode_num, fname);
@@ -533,8 +526,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
 }
 }
 
-itermode->Release();
-
 /* Setup streams. */
 st = avformat_new_stream(avctx, NULL);
 if (!st) {
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 4d00a53..3f4b22c 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -312,7 +312,6 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
 {
 struct decklink_cctx *cctx = (struct decklink_cctx *) avctx->priv_data;
 struct decklink_ctx *ctx;
-IDeckLinkDisplayModeIterator *itermode;
 IDeckLinkIterator *iter;
 IDeckLink *dl = NULL;
 unsigned int n;
@@ -371,12 +370,6 @@ av_cold int ff_decklink_write_header(AVFormatContext 
*avctx)
 return AVERROR_EXIT;
 }
 
-if (ctx->dlo->GetDisplayModeIterator() != S_OK) {
-av_log(avctx, AV_LOG_ERROR, "Could not get Display Mode Iterator\n");
-ctx->dl->Release();
-return AVERROR(EIO);
-}
-
 /* Setup streams. */
 for (n = 0; n < avctx->nb_streams; n++) {
 AVStream *st = avctx->streams[n];
@@ -392,7 +385,6 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
 goto error;
 }
 }
-itermode->Release();
 
 return 0;
 
-- 
2.6.6

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


[FFmpeg-devel] [PATCH] Changed metadata print option to accept general urls

2016-06-22 Thread sami . hult
From: Sami Hult 

I changed output=print file handling of metadata filter to accept any ffmpeg 
url. This way multiple streams can for example be silencedetected and the 
result directed to different outputs.

Example:

ffmpeg -i test.wav -filter_complex 
"silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null - 4> 
test.txt

should have the same effect as

ffmpeg -i test.wav -filter_complex 
"silencedetect=n=-40dB:d=0.1,ametadata=mode=print:test.txt" -f null -


Signed-off-by: Sami Hult 
---
 Changelog|  1 +
 libavfilter/f_metadata.c | 43 +++
 2 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/Changelog b/Changelog
index f6016f4..778ad29 100644
--- a/Changelog
+++ b/Changelog
@@ -42,6 +42,7 @@ version :
 - OpenExr improvements (tile data and B44/B44A support)
 - BitJazz SheerVideo decoder
 - CUDA CUVID H264/HEVC decoder
+- Changed metadata print option to accept general urls
 
 
 version 3.0:
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c
index ab07ccf..8a16db9 100644
--- a/libavfilter/f_metadata.c
+++ b/libavfilter/f_metadata.c
@@ -31,6 +31,7 @@
 #include "libavutil/internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/timestamp.h"
+#include "libavformat/avio.h"
 #include "avfilter.h"
 #include "audio.h"
 #include "formats.h"
@@ -80,7 +81,7 @@ typedef struct MetadataContext {
 AVExpr *expr;
 double var_values[VAR_VARS_NB];
 
-FILE *file;
+AVIOContext* avio_context;
 char *file_str;
 
 int (*compare)(struct MetadataContext *s,
@@ -180,8 +181,11 @@ static void print_file(AVFilterContext *ctx, const char 
*msg, ...)
 va_list argument_list;
 
 va_start(argument_list, msg);
-if (msg)
-vfprintf(s->file, msg, argument_list);
+if (msg) {
+char buf[128];
+vsnprintf(buf, sizeof(buf), msg, argument_list);
+avio_printf(s->avio_context, buf);
+}
 va_end(argument_list);
 }
 
@@ -236,25 +240,24 @@ static av_cold int init(AVFilterContext *ctx)
 }
 }
 
-if (s->file_str) {
-if (!strcmp(s->file_str, "-")) {
-s->file = stdout;
-} else {
-s->file = fopen(s->file_str, "w");
-if (!s->file) {
-int err = AVERROR(errno);
-char buf[128];
-av_strerror(err, buf, sizeof(buf));
-av_log(ctx, AV_LOG_ERROR, "Could not open file %s: %s\n",
-   s->file_str, buf);
-return err;
-}
-}
+if (s->mode == METADATA_PRINT) {
 s->print = print_file;
 } else {
 s->print = print_log;
 }
 
+s->avio_context = NULL;
+if (s->file_str) {
+ret = avio_open(>avio_context, s->file_str, AVIO_FLAG_WRITE);
+if (ret < 0) {
+char buf[128];
+av_strerror(ret, buf, sizeof(buf));
+av_log(ctx, AV_LOG_ERROR, "Could not open %s: %s\n",
+   s->file_str, buf);
+return ret;
+}
+}
+
 return 0;
 }
 
@@ -262,9 +265,9 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
 MetadataContext *s = ctx->priv;
 
-if (s->file && s->file != stdout)
-fclose(s->file);
-s->file = NULL;
+if (s->avio_context) {
+avio_closep(>avio_context);
+}
 }
 
 static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
-- 
2.1.4

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


Re: [FFmpeg-devel] [FFmpeg-cvslog] MAINTAINERS: Remove Linux / PowerPC maintainer

2016-06-22 Thread Michael Niedermayer
On Thu, Jun 23, 2016 at 01:01:41AM +0200, Clément Bœsch wrote:
> On Thu, Jun 23, 2016 at 12:57:44AM +0200, Michael Niedermayer wrote:
> > ffmpeg | branch: master | Michael Niedermayer  | 
> > Thu Jun 23 00:49:29 2016 +0200| [18f687f73709a3ad5bb6b6fbbdbbce6dc8a91036] 
> > | committer: Michael Niedermayer
> > 
> > MAINTAINERS: Remove Linux / PowerPC maintainer
> > 
> > See: [FFmpeg-devel] PPC64: PowerPC Maintainer information is incorrect
> > 
> > Signed-off-by: Michael Niedermayer 
> > 
> > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18f687f73709a3ad5bb6b6fbbdbbce6dc8a91036
> > ---
> > 
> >  MAINTAINERS |1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 24145da..b9fa0c5 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -552,7 +552,6 @@ AVR32   Mans Rullgard
> >  MIPSMans Rullgard, Nedeljko Babic
> >  Mac OS X / PowerPC  Romain Dolbeau, Guillaume Poirier
> >  Amiga / PowerPC Colin Ward
> > -Linux / PowerPC Luca Barbato
> >  Windows MinGW   Alex Beregszaszi, Ramiro Polla
> >  Windows Cygwin  Victor Paesa
> >  Windows MSVCMatthew Oliver, Hendrik Leppkes
> 
> Don't you think you should remove Diego, Måns, Kostya, ... as well?

They didnt ask me to remove them, they didnt remove themselfs even
though they could, they didnt post a patch to remove themselfs.
No contributor said that he contacted them and they no longer maintain
the code they are listed for. (or i missed that)

If you know that some entries are incorrect, please correct them.

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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


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


Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread James Almer
On 6/22/2016 8:15 PM, Dan Parrot wrote:
> On Thu, 2016-06-23 at 01:03 +0200, Michael Niedermayer wrote:
>> On Tue, Jun 21, 2016 at 12:04:42AM -0500, Dan Parrot wrote:
>>> On Tue, 2016-06-21 at 02:22 +0200, Michael Niedermayer wrote:
 On Mon, Jun 20, 2016 at 06:38:18PM -0500, Dan Parrot wrote:
> On Tue, 2016-06-21 at 01:06 +0200, Michael Niedermayer wrote:
>> On Mon, Jun 20, 2016 at 05:55:47PM -0500, Dan Parrot wrote:
>>> On Tue, 2016-06-21 at 00:45 +0200, Michael Niedermayer wrote:
 On Sun, Jun 19, 2016 at 09:57:42PM +, Dan Parrot wrote:
> First commit addressing Trac ticket #5570. Functions defined in 
> libswscale/input.c
> have corresponding SIMD definitions in libswscale/ppc/input_vsx.c
> ---
>  libswscale/ppc/Makefile   |1 +
>  libswscale/ppc/input_vsx.c| 1070 
> +
>  libswscale/swscale.c  |3 +
>  libswscale/swscale_internal.h |1 +
>  4 files changed, 1075 insertions(+)
>  create mode 100644 libswscale/ppc/input_vsx.c
>
> diff --git a/libswscale/ppc/Makefile b/libswscale/ppc/Makefile
> index d1b596e..2482893 100644
> --- a/libswscale/ppc/Makefile
> +++ b/libswscale/ppc/Makefile
> @@ -1,3 +1,4 @@
>  OBJS += ppc/swscale_altivec.o
>\
> +ppc/input_vsx.o  
>\
>  ppc/yuv2rgb_altivec.o
>\
>  ppc/yuv2yuv_altivec.o
>\
> diff --git a/libswscale/ppc/input_vsx.c b/libswscale/ppc/input_vsx.c
> new file mode 100644
> index 000..adb0e38
> --- /dev/null
> +++ b/libswscale/ppc/input_vsx.c
> @@ -0,0 +1,1070 @@
> +/*
> + * Copyright (C) 2016 Dan Parrot 
> + *
> + * 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 
> +#include 
> +#include 
> +#include 
> +
> +#include "libavutil/avutil.h"
> +#include "libavutil/bswap.h"
> +#include "libavutil/cpu.h"
> +#include "libavutil/intreadwrite.h"
> +#include "libavutil/mathematics.h"
> +#include "libavutil/pixdesc.h"
> +#include "libavutil/avassert.h"
> +#include "config.h"
> +#include "libswscale/rgb2rgb.h"
> +#include "libswscale/swscale.h"
> +#include "libswscale/swscale_internal.h"
> +
> +#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos))
> +
> +#define r ((origin == AV_PIX_FMT_BGR48BE || origin == 
> AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == 
> AV_PIX_FMT_BGRA64LE) ? b_r : r_b)
> +#define b ((origin == AV_PIX_FMT_BGR48BE || origin == 
> AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == 
> AV_PIX_FMT_BGRA64LE) ? r_b : b_r)
> +
> +#if HAVE_VSX
> +
> +// This is a SIMD version for IBM POWER8 of function 
> rgb64ToY_c_template
> +// in file libswscale/input.c
> +static av_always_inline void
> +rgb64ToY_c_template_vsx(uint16_t *dst, const uint16_t *src, int 
> width,
> +enum AVPixelFormat origin, int32_t *rgb2yuv)
> +{
> +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = 
> rgb2yuv[BY_IDX];
> +int i, j;
> +int num_vec, frag;
> +
> +num_vec = width / 8;
> +frag= width % 8;
> +
> +vector int v_ry = vec_splats((int)ry);
> +vector int v_gy = vec_splats((int)gy);
> +vector int v_by = vec_splats((int)by);
> +
> +int s_opr2;
> +s_opr2 = (int)(0x2001 << (RGB2YUV_SHIFT-1));

Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Carl Eugen Hoyos
Dan Parrot  mail.com> writes:

> > Did you already test the TIMER macros?
> 
> No I did not test with the TIMER macros.

If you refuse to run the requested performance test, please at 
least post your patch, maybe others find the necessary time.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Dan Parrot
On Thu, 2016-06-23 at 01:03 +0200, Michael Niedermayer wrote:
> On Tue, Jun 21, 2016 at 12:04:42AM -0500, Dan Parrot wrote:
> > On Tue, 2016-06-21 at 02:22 +0200, Michael Niedermayer wrote:
> > > On Mon, Jun 20, 2016 at 06:38:18PM -0500, Dan Parrot wrote:
> > > > On Tue, 2016-06-21 at 01:06 +0200, Michael Niedermayer wrote:
> > > > > On Mon, Jun 20, 2016 at 05:55:47PM -0500, Dan Parrot wrote:
> > > > > > On Tue, 2016-06-21 at 00:45 +0200, Michael Niedermayer wrote:
> > > > > > > On Sun, Jun 19, 2016 at 09:57:42PM +, Dan Parrot wrote:
> > > > > > > > First commit addressing Trac ticket #5570. Functions defined in 
> > > > > > > > libswscale/input.c
> > > > > > > > have corresponding SIMD definitions in 
> > > > > > > > libswscale/ppc/input_vsx.c
> > > > > > > > ---
> > > > > > > >  libswscale/ppc/Makefile   |1 +
> > > > > > > >  libswscale/ppc/input_vsx.c| 1070 
> > > > > > > > +
> > > > > > > >  libswscale/swscale.c  |3 +
> > > > > > > >  libswscale/swscale_internal.h |1 +
> > > > > > > >  4 files changed, 1075 insertions(+)
> > > > > > > >  create mode 100644 libswscale/ppc/input_vsx.c
> > > > > > > > 
> > > > > > > > diff --git a/libswscale/ppc/Makefile b/libswscale/ppc/Makefile
> > > > > > > > index d1b596e..2482893 100644
> > > > > > > > --- a/libswscale/ppc/Makefile
> > > > > > > > +++ b/libswscale/ppc/Makefile
> > > > > > > > @@ -1,3 +1,4 @@
> > > > > > > >  OBJS += ppc/swscale_altivec.o  
> > > > > > > >  \
> > > > > > > > +ppc/input_vsx.o
> > > > > > > >  \
> > > > > > > >  ppc/yuv2rgb_altivec.o  
> > > > > > > >  \
> > > > > > > >  ppc/yuv2yuv_altivec.o  
> > > > > > > >  \
> > > > > > > > diff --git a/libswscale/ppc/input_vsx.c 
> > > > > > > > b/libswscale/ppc/input_vsx.c
> > > > > > > > new file mode 100644
> > > > > > > > index 000..adb0e38
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/libswscale/ppc/input_vsx.c
> > > > > > > > @@ -0,0 +1,1070 @@
> > > > > > > > +/*
> > > > > > > > + * Copyright (C) 2016 Dan Parrot 
> > > > > > > > + *
> > > > > > > > + * 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 
> > > > > > > > +#include 
> > > > > > > > +#include 
> > > > > > > > +#include 
> > > > > > > > +
> > > > > > > > +#include "libavutil/avutil.h"
> > > > > > > > +#include "libavutil/bswap.h"
> > > > > > > > +#include "libavutil/cpu.h"
> > > > > > > > +#include "libavutil/intreadwrite.h"
> > > > > > > > +#include "libavutil/mathematics.h"
> > > > > > > > +#include "libavutil/pixdesc.h"
> > > > > > > > +#include "libavutil/avassert.h"
> > > > > > > > +#include "config.h"
> > > > > > > > +#include "libswscale/rgb2rgb.h"
> > > > > > > > +#include "libswscale/swscale.h"
> > > > > > > > +#include "libswscale/swscale_internal.h"
> > > > > > > > +
> > > > > > > > +#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : 
> > > > > > > > AV_RL16(pos))
> > > > > > > > +
> > > > > > > > +#define r ((origin == AV_PIX_FMT_BGR48BE || origin == 
> > > > > > > > AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin 
> > > > > > > > == AV_PIX_FMT_BGRA64LE) ? b_r : r_b)
> > > > > > > > +#define b ((origin == AV_PIX_FMT_BGR48BE || origin == 
> > > > > > > > AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin 
> > > > > > > > == AV_PIX_FMT_BGRA64LE) ? r_b : b_r)
> > > > > > > > +
> > > > > > > > +#if HAVE_VSX
> > > > > > > > +
> > > > > > > > +// This is a SIMD version for IBM POWER8 of function 
> > > > > > > > rgb64ToY_c_template
> > > > > > > > +// in file libswscale/input.c
> > > > > > > > +static av_always_inline void
> > > > > > > > +rgb64ToY_c_template_vsx(uint16_t *dst, const uint16_t *src, 
> > > > > > > > 

Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread James Almer
On 6/22/2016 7:36 PM, Carl Eugen Hoyos wrote:
> Dan Parrot  mail.com> writes:
> 
> [...]
> 
> Did you already test the TIMER macros?
> 
> I don't know if they work on ppc64le but we won't know 
> until you tested them.
> 
> Thank you, Carl Eugen

If this patch works (FATE passes on ppc64) and is faster than
the plain c functions then it can be committed as is.

Micro-optimizations like modulo/dev vs shift can follow in a
separate patch after enough testing. No point in delaying this
any further.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Michael Niedermayer
On Tue, Jun 21, 2016 at 12:04:42AM -0500, Dan Parrot wrote:
> On Tue, 2016-06-21 at 02:22 +0200, Michael Niedermayer wrote:
> > On Mon, Jun 20, 2016 at 06:38:18PM -0500, Dan Parrot wrote:
> > > On Tue, 2016-06-21 at 01:06 +0200, Michael Niedermayer wrote:
> > > > On Mon, Jun 20, 2016 at 05:55:47PM -0500, Dan Parrot wrote:
> > > > > On Tue, 2016-06-21 at 00:45 +0200, Michael Niedermayer wrote:
> > > > > > On Sun, Jun 19, 2016 at 09:57:42PM +, Dan Parrot wrote:
> > > > > > > First commit addressing Trac ticket #5570. Functions defined in 
> > > > > > > libswscale/input.c
> > > > > > > have corresponding SIMD definitions in libswscale/ppc/input_vsx.c
> > > > > > > ---
> > > > > > >  libswscale/ppc/Makefile   |1 +
> > > > > > >  libswscale/ppc/input_vsx.c| 1070 
> > > > > > > +
> > > > > > >  libswscale/swscale.c  |3 +
> > > > > > >  libswscale/swscale_internal.h |1 +
> > > > > > >  4 files changed, 1075 insertions(+)
> > > > > > >  create mode 100644 libswscale/ppc/input_vsx.c
> > > > > > > 
> > > > > > > diff --git a/libswscale/ppc/Makefile b/libswscale/ppc/Makefile
> > > > > > > index d1b596e..2482893 100644
> > > > > > > --- a/libswscale/ppc/Makefile
> > > > > > > +++ b/libswscale/ppc/Makefile
> > > > > > > @@ -1,3 +1,4 @@
> > > > > > >  OBJS += ppc/swscale_altivec.o
> > > > > > >\
> > > > > > > +ppc/input_vsx.o  
> > > > > > >\
> > > > > > >  ppc/yuv2rgb_altivec.o
> > > > > > >\
> > > > > > >  ppc/yuv2yuv_altivec.o
> > > > > > >\
> > > > > > > diff --git a/libswscale/ppc/input_vsx.c 
> > > > > > > b/libswscale/ppc/input_vsx.c
> > > > > > > new file mode 100644
> > > > > > > index 000..adb0e38
> > > > > > > --- /dev/null
> > > > > > > +++ b/libswscale/ppc/input_vsx.c
> > > > > > > @@ -0,0 +1,1070 @@
> > > > > > > +/*
> > > > > > > + * Copyright (C) 2016 Dan Parrot 
> > > > > > > + *
> > > > > > > + * 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 
> > > > > > > +#include 
> > > > > > > +#include 
> > > > > > > +#include 
> > > > > > > +
> > > > > > > +#include "libavutil/avutil.h"
> > > > > > > +#include "libavutil/bswap.h"
> > > > > > > +#include "libavutil/cpu.h"
> > > > > > > +#include "libavutil/intreadwrite.h"
> > > > > > > +#include "libavutil/mathematics.h"
> > > > > > > +#include "libavutil/pixdesc.h"
> > > > > > > +#include "libavutil/avassert.h"
> > > > > > > +#include "config.h"
> > > > > > > +#include "libswscale/rgb2rgb.h"
> > > > > > > +#include "libswscale/swscale.h"
> > > > > > > +#include "libswscale/swscale_internal.h"
> > > > > > > +
> > > > > > > +#define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : 
> > > > > > > AV_RL16(pos))
> > > > > > > +
> > > > > > > +#define r ((origin == AV_PIX_FMT_BGR48BE || origin == 
> > > > > > > AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == 
> > > > > > > AV_PIX_FMT_BGRA64LE) ? b_r : r_b)
> > > > > > > +#define b ((origin == AV_PIX_FMT_BGR48BE || origin == 
> > > > > > > AV_PIX_FMT_BGR48LE || origin == AV_PIX_FMT_BGRA64BE || origin == 
> > > > > > > AV_PIX_FMT_BGRA64LE) ? r_b : b_r)
> > > > > > > +
> > > > > > > +#if HAVE_VSX
> > > > > > > +
> > > > > > > +// This is a SIMD version for IBM POWER8 of function 
> > > > > > > rgb64ToY_c_template
> > > > > > > +// in file libswscale/input.c
> > > > > > > +static av_always_inline void
> > > > > > > +rgb64ToY_c_template_vsx(uint16_t *dst, const uint16_t *src, int 
> > > > > > > width,
> > > > > > > +enum AVPixelFormat origin, int32_t 
> > > > > > > *rgb2yuv)
> > > > > > > +{
> > > > > > > +int32_t ry = rgb2yuv[RY_IDX], gy = rgb2yuv[GY_IDX], by = 
> > > > > > > rgb2yuv[BY_IDX];
> > > > > > > +int i, j;
> > > > > > > +int num_vec, frag;
> > > > > 

Re: [FFmpeg-devel] [FFmpeg-cvslog] MAINTAINERS: Remove Linux / PowerPC maintainer

2016-06-22 Thread Clément Bœsch
On Thu, Jun 23, 2016 at 12:57:44AM +0200, Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer  | Thu 
> Jun 23 00:49:29 2016 +0200| [18f687f73709a3ad5bb6b6fbbdbbce6dc8a91036] | 
> committer: Michael Niedermayer
> 
> MAINTAINERS: Remove Linux / PowerPC maintainer
> 
> See: [FFmpeg-devel] PPC64: PowerPC Maintainer information is incorrect
> 
> Signed-off-by: Michael Niedermayer 
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18f687f73709a3ad5bb6b6fbbdbbce6dc8a91036
> ---
> 
>  MAINTAINERS |1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 24145da..b9fa0c5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -552,7 +552,6 @@ AVR32   Mans Rullgard
>  MIPSMans Rullgard, Nedeljko Babic
>  Mac OS X / PowerPC  Romain Dolbeau, Guillaume Poirier
>  Amiga / PowerPC Colin Ward
> -Linux / PowerPC Luca Barbato
>  Windows MinGW   Alex Beregszaszi, Ramiro Polla
>  Windows Cygwin  Victor Paesa
>  Windows MSVCMatthew Oliver, Hendrik Leppkes

Don't you think you should remove Diego, Måns, Kostya, ... as well?

-- 
Clément B.


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


Re: [FFmpeg-devel] PPC64: PowerPC Maintainer information is incorrect

2016-06-22 Thread Michael Niedermayer
On Wed, Jun 22, 2016 at 11:13:17AM -0500, Dan Parrot wrote:
> The MAINTAINERS file lists Luca Barbato for Linux/PowerPC. You can see
> from his response below how he feels about that.

removed the the incorrect Linux/PowerPC entry

Thanks


> 
>  Forwarded Message 
> > From: Luca Barbato 
> > To: Dan Parrot 
> > Subject: Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD
> > Implementation
> > Date: Tue, 21 Jun 2016 00:56:20 +0200
> > 
> > On 21/06/16 00:42, Dan Parrot wrote:
> > > You are listed as the responsible party in ffmpeg MAINTAINERS. Could you
> > > please indicate whether or not the patch is acceptable?
> > > 
> > 
> > I have no idea why FFmpeg people keep that, I contribute to Libav[1].
> > 
> > You are more than welcome to send the patches and to contribute to it if
> > you like =)
> > 
> > lu
> > 
> > [1]: http://libav.org
> > 
> 
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- 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] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Dan Parrot
On Wed, 2016-06-22 at 22:36 +, Carl Eugen Hoyos wrote:
> Dan Parrot  mail.com> writes:
> 
> [...]
> 
> Did you already test the TIMER macros?

No I did not test with the TIMER macros. I don't see what that has to do
with Trac ticket #5570.

> I don't know if they work on ppc64le but we won't know 
> until you tested them.
> 
> Thank you, Carl Eugen
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



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


Re: [FFmpeg-devel] [PATCH] fate: add apad test

2016-06-22 Thread Michael Niedermayer
On Wed, Jun 22, 2016 at 01:29:38PM +, Petru Rares Sincraian wrote:
> Hi,
> 
> 
> Here is another test. In this case for apad filter.

>  fate/filter-audio.mak |5 
>  ref/fate/filter-apad  |  265 
> ++
>  2 files changed, 270 insertions(+)
> ef7ce7b727eb4e80c82b6de2a170a8dd29858644  0001-fate-add-apad-test.patch
> From 7fc05fd4e3bd7d610189e14e3cfd4968bc570a65 Mon Sep 17 00:00:00 2001
> From: Petru Rares Sincraian 
> Date: Wed, 22 Jun 2016 15:24:26 +0200
> Subject: [PATCH] fate: add apad test

applied

thanks

[...]

-- 
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] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Carl Eugen Hoyos
Dan Parrot  mail.com> writes:

[...]

Did you already test the TIMER macros?

I don't know if they work on ppc64le but we won't know 
until you tested them.

Thank you, Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Dan Parrot
On Wed, 2016-06-22 at 21:02 +, Carl Eugen Hoyos wrote:
> Dan Parrot  mail.com> writes:
> 
> > Could I get a yes or no answer on whether the patch will be applied?
> 
> Please comment on my email: time make fate can be used to show 
> large performance changes (although it isn't optimal), I don't 
> think it can show the difference between a division and a shift.

I was not trying to show the difference in relative cost between a
division and a shift using "time make fate". What I was trying to show
is that ffmpeg compiled with code that uses the division versus ffmpeg
compiled with code that uses shifts resulted in running times for fate
that were essentially equal.

Now, if you want me to demonstrate the relative speeds of the division
and shift, I can do that. I admit to not seeing the point in the
exercise, but if that is what is holding up patch acceptance, I will do
it. And yes, the "time" utility is imperfect, but so is any technique
which does not turn off all hardware interrupts in order to guarantee
that the code being timed runs to completion without ever being paused.

The goal of Trac ticket #5570 as best I understand it is to use SIMD
hardware on PPC64 to reduce execution time of the functions in
libswscale/input.c. Right? So, the comparison we should be talking about
is whether ffmpeg currently in the repository is faster/slower than
ffmpeg compiled using the patch. Timing fate suite when run with the two
different versions of ffmpeg should be an acceptable indicator of which
is faster.

If I mistaken in any of the above, I am always willing to learn.


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


Re: [FFmpeg-devel] PPC64: PowerPC Maintainer information is incorrect

2016-06-22 Thread Carl Eugen Hoyos
Dan Parrot  mail.com> writes:

> The MAINTAINERS file lists Luca Barbato for Linux/PowerPC. You 
> can see from his response below how he feels about that.

He regularly posts about his feelings towards us, no need to 
remind us.

Carl Eugen

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


Re: [FFmpeg-devel] [PATCH] fate: add test for amerge

2016-06-22 Thread Michael Niedermayer
On Wed, Jun 22, 2016 at 01:08:03PM +, Petru Rares Sincraian wrote:
> Upps, solved.
> 
> 
> Thanks,
> 
> Petru Rares.
> 
> 
> From: ffmpeg-devel  on behalf of Michael 
> Niedermayer 
> Sent: Tuesday, June 21, 2016 7:06:27 PM
> To: FFmpeg development discussions and patches
> Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for amerge
> 
> On Tue, Jun 21, 2016 at 12:53:05PM +, Petru Rares Sincraian wrote:
> >
> > Hi there,
> >
> > Here is test for amerge.
> >
> >
> > Regards,
> > Petru Rares.
> 
> >  fate/filter-audio.mak  |5 +
> >  ref/fate/filter-amerge |  135 
> > +
> >  2 files changed, 140 insertions(+)
> > 1bb444a73dd174a82d8ff3c13171d0805e48aead  
> > 0001-fate-add-test-for-amerge.patch
> > From 4882601b6eb5a825bd5ddf837b1dce3977496314 Mon Sep 17 00:00:00 2001
> > From: Petru Rares Sincraian 
> > Date: Tue, 21 Jun 2016 14:43:01 +0200
> > Subject: [PATCH] fate: add test for amerge
> >
> > ---
> >  tests/fate/filter-audio.mak  |   5 ++
> >  tests/ref/fate/filter-amerge | 135 
> > +++
> >  2 files changed, 140 insertions(+)
> >  create mode 100644 tests/ref/fate/filter-amerge
> >
> > diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> > index 7c903b7..ea47961 100644
> > --- a/tests/fate/filter-audio.mak
> > +++ b/tests/fate/filter-audio.mak
> > @@ -63,6 +63,11 @@ fate-filter-agate: tests/data/asynth-44100-2.wav
> >  fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
> >  fate-filter-agate: CMD = framecrc -i $(SRC) -af 
> > agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4
> >
> > +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, 
> > WAV) += fate-filter-amerge
>^
> shouldnt this be AMERGE ?
> 
> [...]
> 
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Those who would give up essential Liberty, to purchase a little
> temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin

>  fate/filter-audio.mak  |5 +
>  ref/fate/filter-amerge |  135 
> +
>  2 files changed, 140 insertions(+)
> 14b29a7d344c105ac456f52141a18d972fea98cd  0001-fate-add-test-for-amerge.patch
> From 9a6e91851eecce7b527c4ab003ac4f54f29461a4 Mon Sep 17 00:00:00 2001
> From: Petru Rares Sincraian 
> Date: Tue, 21 Jun 2016 14:43:01 +0200
> Subject: [PATCH] fate: add test for amerge

applied

thanks

[...]

-- 
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] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Carl Eugen Hoyos
Dan Parrot  mail.com> writes:

> Could I get a yes or no answer on whether the patch will be applied?

Please comment on my email: time make fate can be used to show 
large performance changes (although it isn't optimal), I don't 
think it can show the difference between a division and a shift.

Carl Eugen

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


Re: [FFmpeg-devel] [GSoC] Motion Interpolation

2016-06-22 Thread Davinder Singh
On Mon, Jun 20, 2016 at 4:33 PM Michael Niedermayer 
wrote:

> On Mon, Jun 20, 2016 at 09:54:15AM +, Davinder Singh wrote:
> > On Sat, Jun 18, 2016 at 3:16 AM Michael Niedermayer
> 
> > wrote:
> >
> > > On Fri, Jun 17, 2016 at 08:19:00AM +, Davinder Singh wrote:
> > > [...]
> > > > Yes, I did that, after understanding it completely. It now works
> with the
> > > > motion vectors generated by mEstimate filter. Now I’m trying to
> improve
> > > it
> > > > based on this paper: Overlapped Block Motion Compensation: An
> > > > Estimation-Theoretic Approach
> > >
> > > > <
> > >
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.112.8359=rep1=pdf
> > > >
> > >
> > > this is 22 years old
> > >
> > >
> > > > and
> > > > this one: Window Motion Compensation
> > > > .Takes a lot of
> time
> > >
> > > this is 25 years old
> > >
> > > not saying old papers are bad, just that this represents the knowledge
> > > of 20 years ago
> > >
> > > also its important to keep in mind that blind block matching of any
> > > metric will not be enough. To find true motion the whole motion
> > > vector fields of multiple frames will need to be considered
> > >
> > > For example a ball thrown accross the field of view entering and
> > > exiting the picture needs to move smoothly and at the ends (in time)
> > > there are frames without the ball then a frame with the ball
> > > these 2 are not enough to interpolate the frames between as we have
> > > just one location where the ball is. With the next frames though
> > > we can find the motion trajectory of the ball and interpolate it end
> > > to end
> > >
> > > I think papers which work on problems like this and also interpolation
> > > of all the areas that end up overlapping and covering each other
> > > like the backgroud behind the ball in that example would be better
> > > starting points for implementing motion estiation because ultimatly
> > > that is the kind of ME code we would like to have.
> > > Block matching with various windows, OBMC, ... are all good but
> > > if in our example the vectors for the ball or background are off that
> > > will look rather bad with any motion compensation
> > > So trying to move a bit toward this would make sense but first
> > > having some motion estimation even really basic and dumb with
> > > mc working in a testable filter (pair) should probably be done.
> > > Iam just mentioning this as a bit of a preview of what i hope could
> > > eventually be implemented, maybe this would be after GSoC but its
> > > the kind of code needed to have really usable frame interpolation
> > >
> > >
> > >
> > > > reading them. I think we need to add new Raised Cosine window
> (weights)
> > > > along with Linear Window (currently implemented). What do you say?
> > >
> > > i dont know, the windows used in snow are already the best of several
> > > tried (for snow).
> > > no great gains will be found by changing the OBMC window from snow.
> > >
> > >
> > > >
> > > > Also making mInterpolate work with variable macroblock size MC. The
> > > current
> > > > interpolation works without half pel accuracy, though.
> > >
> > > mcfps has fully working 1/4 pel OBMC code, that should be fine to be
> > > used as is i think unless i miss something
> > >
> > > half pel is 20 years old, it is not usefull
> > > multiple block sizes on the MC side should not really matter ATM
> > > smaller blocks are a bit slower but first we should get the code
> > > working, then working with good quality and then working fast.
> > >
> > > multiple block sizes may be usefull for the estimation side if it
> > > improves estimation somehow.
> > >
> > > Can i see your current "work in progress" ?
> > >
> > >
> > > [...]
> > > > I’m moving estimation code to some new file motion_est.c file and the
> > > > methods are shared by both mEstimate and mInterpolate filters.
> mEstimate
> > > > store the MVs in frame’s side data for any other filter. Moreover,
> any
> > > > other filter if need post processing on MVs it can directly use the
> > > shared
> > > > methods. But, mInterpolate use them internally, no saving in
> sidedata,
> > > and
> > > > saving unnecessary processing.
> > >
> > > This design sounds good
> > >
> > >
> > > >
> > > >
> > > > Also, Paper [1] doesn’t uses window with OBMC at all. It just find
> normal
> > > > average without weight. Perhaps to compare papers I either need to
> add
> > > > multiple option for each setting or need to assign the algorithm as
> > > > researcher’s name in filter options.
> > >
> > >
> > >
> > Paper [1] and [2] uses functions or do post processing on motion vectors,
> > so needs fast ME algorithms, which currently I’m working on. [*M]
> >
> > Let me summarize the papers (from Email 1, this thread):
> >
> > Paper [1]: Zhai et al. (2005) A Low Complexity Motion Compensated Frame
> > Interpolation Method
> >
> > [Quote]
> > This paper 

Re: [FFmpeg-devel] [PATCH] libavformat/matroskaenc: omit segment UID for webm

2016-06-22 Thread Dave Rice

> On Jun 22, 2016, at 10:16 AM, Michael Bradshaw  wrote:
> 
> On Tue, Jun 21, 2016 at 12:22 PM, Michael Niedermayer
>  wrote:
>> what does "supported" / "unsupported" mean, is this defined somewhere ?
> 
> As far as WebM is concerned, SegmentUID doesn't exist.
> 
> In this situation, writing SegmentUID is Undefined-Ignore or
> Optional-Fail/Forbidden, depending on the file. I concur with Dave's
> analysis, but parsing may fail if SegmentUID is written and the master
> element has an unknown size (which will be the case if ffmpeg is
> writing to an unseakable output, like pipes). This is because master
> elements with unknown size are terminated by the first unrecognized
> would-be-child element[1], which would cause the parser to terminate
> the Info element.

I don’t quite think that the EBML specification agrees with this explanation. 
See:

"When EBML is used in transmission or streaming, data that is not part of an 
EBML Element is permitted to be present within a Master-element if 
`unknownsizeallowed` is enabled within that Master-element's definition. In 
this case, the reader should skip data until a valid Element ID of the same 
level or the next greater level of the Master-element is found. What Element 
IDs are considered valid within a Master-element is identified by the EBML 
Schema for that version of the EBML Document Type. Any data contained with a 
Master-element that is not part of an Element SHOULD be ignored."

In this case a SegmentUID Element (undefined in webm) should be skipped be the 
reader rather than cause the termination of the reader.

The end of an unknown-sized Element is determined by the beginning of the next 
known Element that is not a valid sub-element rather than the first unknown 
Element.

> This would continue to screw up parsing, because now
> there could be other children of Info (like DateUTC) after the
> SegmentUID, and since the Info element has terminated and those aren't
> valid children of Segment, it would cause the Segment element to
> terminate. At that point, the file is pretty broken because now there
> is no Segment element containing the Clusters and other elements.
> 
> [1]: "The end of a Master-element with unknown size is determined by
> the beginning of the next element that is not a valid sub-element of
> that Master-element" (from the current EBML spec)

Best Regards,
Dave Rice

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


Re: [FFmpeg-devel] [PATCH] added support for hardware assist H264 video encoding for the Raspberry Pi

2016-06-22 Thread Amancio Hasty

> On Jun 22, 2016, at 10:20 AM, Aman Gupta  wrote:
> 
> This patch should fix the assertion failure you see:
> https://github.com/FFmpeg/FFmpeg/commit/1087f0dc172a9adf779e41bf2dc82639fb04ebd4
>  
> 
> 
> Aman
> On Sat, Jun 18, 2016 at 8:43 AM Amancio Hasty  > wrote:
> 
>> 
>>> On Jun 16, 2016, at 11:16 AM, Aman Gupta  wrote:
>>> 
>>> The patchset that was merged into libav is now available in ffmpeg as
>> well:
>>> https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/omx.c
>>> 
>>> You can compile ffmpeg from the master branch
>>> with --enable-omx --enable-omx-rpi
>>> 
>>> Aman
>>> 
>>> On Thu, Jun 16, 2016 at 2:16 AM, Amancio Hasty  wrote:
>>> 
 
> On May 9, 2016, at 7:55 AM, Amancio Hasty  wrote:
> 
> Hi,
> 
> So what is the next step?
> 
> If you want testers I suggest posting to ccrisan’s motionpie mailing
 list.
> Cheers
> Amancio
> 
> 
>> On Mar 31, 2016, at 7:27 PM, Amancio Hasty  wrote:
>> 
>> I am not a lawyer…
>> 
>> 
>> I updated the patch.  vc264.c now has a the copyright notice embedded
>> in
>> a volatile global so if a binary is compiled against vc264.o , the
 copyright notice
>> can be displayed by:
>> strings ffmpeg | grep -i copyright
>> 
>> LICENSE.md has been updated to include Broadcom’s copyright notice.
>> 
>> A distribution of a  binary that includes vc264.o should include
 LICENSE.md and if
>> that is missing,  the copyright notice can be displayed via the shell
>> command ‘strings’ .
>> 
>> Amancio
>> 
>>> On Mar 22, 2016, at 12:12 PM, Lou Logan  wrote:
>>> 
>>> On Mon, 21 Mar 2016 20:07:01 -0700, Amancio Hasty wrote:
>>> 
 From 874a72eec2a78f4935fea091003e534b5f8d5413 Mon Sep 17 00:00:00
>> 2001
 From: Amancio Hasty 
 Date: Mon, 21 Mar 2016 18:56:05 -0700
 Subject: [PATCH] added support for hardware assist H264  video
 encoding for
 the Raspberry Pi
 
 ---
 configure  |  12 ++
 libavcodec/Makefile|   1 +
 libavcodec/allcodecs.c |   2 +
 libavcodec/vc264.c | 387
 +
 4 files changed, 402 insertions(+)
 create mode 100644 libavcodec/vc264.c
 
>>> [...]
 diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
 index 2a25d66..3c7bd9b 100644
 --- a/libavcodec/allcodecs.c
 +++ b/libavcodec/allcodecs.c
 @@ -74,6 +74,7 @@ void avcodec_register_all(void)
 initialized = 1;
 
>>> 
>>> Nit: Whitespace on the line above should be removed.
>>> 
>>> [...]
 --- /dev/null
 +++ b/libavcodec/vc264.c
 @@ -0,0 +1,387 @@
 +/*  H.264 hardware assist video encoding code taken from
 + * raspberry's os :
 + *   /opt/vc/src/hello_pi/hello_encode/encode.c
 + */
 +
 +/*
 +Copyright (c) 2012, Broadcom Europe Ltd
 +Copyright (c) 2012, Kalle Vahlman 
 +Tuomas Kulve 
 +All rights reserved.
 +
 +Redistribution and use in source and binary forms, with or without
 +modification, are permitted provided that the following conditions
 are met:
 +* Redistributions of source code must retain the above copyright
 +  notice, this list of conditions and the following disclaimer.
 +  * Redistributions in binary form must reproduce the above
 copyright
 +  notice, this list of conditions and the following disclaimer
 in the
 +  documentation and/or other materials provided with the
 distribution.
 +  * Neither the name of the copyright holder nor the
 +  names of its contributors may be used to endorse or promote
 products
 +  derived from this software without specific prior written
 permission.
 +
 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 "AS IS" AND
 +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED
 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE
 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
 BE LIABLE FOR ANY
 +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 DAMAGES
 +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 SERVICES;
 +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 CAUSED AND
 +ON ANY THEORY OF LIABILITY, 

[FFmpeg-devel] [PATCH 1/2] avformat/mov: add more datatypes in metadata handling

2016-06-22 Thread David Murmann


0001-avformat-mov-add-more-datatypes-in-metadata-handling.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] avformat/movenc: add option to use keys/mdta atoms for metadata

2016-06-22 Thread David Murmann


0002-avformat-movenc-add-option-to-use-keys-mdta-atoms-fo.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] avformat/mov: improve qt metadata reading and writing

2016-06-22 Thread David Murmann
Hi all,

this has been brought up before, the MOV muxer/demuxer currently does not 
support all
possible datatypes that are allowed in keys/mdta style metadata. This is 
specified here:
https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP4939-CH1-SW35

At the moment only data types 1 (UTF-8) and 23 (Float32) work. I have a patch 
that adds
support for 21 and 22, as I have found those in actual files produced by ARRI 
cameras.

I have a second patch that adds a flag to the muxer to output keys/mdta style 
metadata,
to be able to keep the metadata while transcoding camera files.

This patch tries to do something similar, but is mine is shorter (though not as 
complete)
so hopefully easy to review:
https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2015-September/178347.html
(I actually found this only after writing my patches.)

Patchset is in the next mails.

till then, David.

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


Re: [FFmpeg-devel] [PATCH] added support for hardware assist H264 video encoding for the Raspberry Pi

2016-06-22 Thread Aman Gupta
This patch should fix the assertion failure you see:
https://github.com/FFmpeg/FFmpeg/commit/1087f0dc172a9adf779e41bf2dc82639fb04ebd4

Aman
On Sat, Jun 18, 2016 at 8:43 AM Amancio Hasty  wrote:

>
> > On Jun 16, 2016, at 11:16 AM, Aman Gupta  wrote:
> >
> > The patchset that was merged into libav is now available in ffmpeg as
> well:
> > https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/omx.c
> >
> > You can compile ffmpeg from the master branch
> > with --enable-omx --enable-omx-rpi
> >
> > Aman
> >
> > On Thu, Jun 16, 2016 at 2:16 AM, Amancio Hasty  wrote:
> >
> >>
> >>> On May 9, 2016, at 7:55 AM, Amancio Hasty  wrote:
> >>>
> >>> Hi,
> >>>
> >>> So what is the next step?
> >>>
> >>> If you want testers I suggest posting to ccrisan’s motionpie mailing
> >> list.
> >>> Cheers
> >>> Amancio
> >>>
> >>>
>  On Mar 31, 2016, at 7:27 PM, Amancio Hasty  wrote:
> 
>  I am not a lawyer…
> 
> 
>  I updated the patch.  vc264.c now has a the copyright notice embedded
> in
>  a volatile global so if a binary is compiled against vc264.o , the
> >> copyright notice
>  can be displayed by:
>  strings ffmpeg | grep -i copyright
> 
>  LICENSE.md has been updated to include Broadcom’s copyright notice.
> 
>  A distribution of a  binary that includes vc264.o should include
> >> LICENSE.md and if
>  that is missing,  the copyright notice can be displayed via the shell
>  command ‘strings’ .
> 
>  Amancio
>  
> > On Mar 22, 2016, at 12:12 PM, Lou Logan  wrote:
> >
> > On Mon, 21 Mar 2016 20:07:01 -0700, Amancio Hasty wrote:
> >
> >> From 874a72eec2a78f4935fea091003e534b5f8d5413 Mon Sep 17 00:00:00
> 2001
> >> From: Amancio Hasty 
> >> Date: Mon, 21 Mar 2016 18:56:05 -0700
> >> Subject: [PATCH] added support for hardware assist H264  video
> >> encoding for
> >> the Raspberry Pi
> >>
> >> ---
> >> configure  |  12 ++
> >> libavcodec/Makefile|   1 +
> >> libavcodec/allcodecs.c |   2 +
> >> libavcodec/vc264.c | 387
> >> +
> >> 4 files changed, 402 insertions(+)
> >> create mode 100644 libavcodec/vc264.c
> >>
> > [...]
> >> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> >> index 2a25d66..3c7bd9b 100644
> >> --- a/libavcodec/allcodecs.c
> >> +++ b/libavcodec/allcodecs.c
> >> @@ -74,6 +74,7 @@ void avcodec_register_all(void)
> >>  initialized = 1;
> >>
> >
> > Nit: Whitespace on the line above should be removed.
> >
> > [...]
> >> --- /dev/null
> >> +++ b/libavcodec/vc264.c
> >> @@ -0,0 +1,387 @@
> >> +/*  H.264 hardware assist video encoding code taken from
> >> + * raspberry's os :
> >> + *   /opt/vc/src/hello_pi/hello_encode/encode.c
> >> + */
> >> +
> >> +/*
> >> +Copyright (c) 2012, Broadcom Europe Ltd
> >> +Copyright (c) 2012, Kalle Vahlman 
> >> +Tuomas Kulve 
> >> +All rights reserved.
> >> +
> >> +Redistribution and use in source and binary forms, with or without
> >> +modification, are permitted provided that the following conditions
> >> are met:
> >> +* Redistributions of source code must retain the above copyright
> >> +  notice, this list of conditions and the following disclaimer.
> >> +  * Redistributions in binary form must reproduce the above
> >> copyright
> >> +  notice, this list of conditions and the following disclaimer
> >> in the
> >> +  documentation and/or other materials provided with the
> >> distribution.
> >> +  * Neither the name of the copyright holder nor the
> >> +  names of its contributors may be used to endorse or promote
> >> products
> >> +  derived from this software without specific prior written
> >> permission.
> >> +
> >> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> >> "AS IS" AND
> >> +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> >> THE IMPLIED
> >> +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> >> ARE
> >> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
> >> BE LIABLE FOR ANY
> >> +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> >> DAMAGES
> >> +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> >> SERVICES;
> >> +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> >> CAUSED AND
> >> +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> >> OR TORT
> >> +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> >> USE OF THIS
> >> +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> >
> > I 

Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD Implementation

2016-06-22 Thread Dan Parrot
Could I get a yes or no answer on whether the patch will be applied?

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


[FFmpeg-devel] PPC64: PowerPC Maintainer information is incorrect

2016-06-22 Thread Dan Parrot
The MAINTAINERS file lists Luca Barbato for Linux/PowerPC. You can see
from his response below how he feels about that.

 Forwarded Message 
> From: Luca Barbato 
> To: Dan Parrot 
> Subject: Re: [FFmpeg-devel] [PATCH] PPC64: Add IBM POWER8 SIMD
> Implementation
> Date: Tue, 21 Jun 2016 00:56:20 +0200
> 
> On 21/06/16 00:42, Dan Parrot wrote:
> > You are listed as the responsible party in ffmpeg MAINTAINERS. Could you
> > please indicate whether or not the patch is acceptable?
> > 
> 
> I have no idea why FFmpeg people keep that, I contribute to Libav[1].
> 
> You are more than welcome to send the patches and to contribute to it if
> you like =)
> 
> lu
> 
> [1]: http://libav.org
> 


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


Re: [FFmpeg-devel] [PATCH] libavformat/matroskaenc: omit segment UID for webm

2016-06-22 Thread Michael Bradshaw
On Tue, Jun 21, 2016 at 12:22 PM, Michael Niedermayer
 wrote:
> what does "supported" / "unsupported" mean, is this defined somewhere ?

As far as WebM is concerned, SegmentUID doesn't exist.

In this situation, writing SegmentUID is Undefined-Ignore or
Optional-Fail/Forbidden, depending on the file. I concur with Dave's
analysis, but parsing may fail if SegmentUID is written and the master
element has an unknown size (which will be the case if ffmpeg is
writing to an unseakable output, like pipes). This is because master
elements with unknown size are terminated by the first unrecognized
would-be-child element[1], which would cause the parser to terminate
the Info element. This would continue to screw up parsing, because now
there could be other children of Info (like DateUTC) after the
SegmentUID, and since the Info element has terminated and those aren't
valid children of Segment, it would cause the Segment element to
terminate. At that point, the file is pretty broken because now there
is no Segment element containing the Clusters and other elements.

[1]: "The end of a Master-element with unknown size is determined by
the beginning of the next element that is not a valid sub-element of
that Master-element" (from the current EBML spec)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added pipe output to metadata filter

2016-06-22 Thread Sami Hult
On 22 Jun 2016 16:57, "Paul B Mahol"  wrote:
>
> On 6/22/16, sami.h...@gmail.com  wrote:
> > From: Sami Hult 
> >
> > I added option mode=pipe which accepts file=(file descriptor) option.
This
> > way multiple streams can for example be silencedetected and the result
> > directed to different outputs.
> >
> > Example:
> >
> > ffmpeg -i test.wav -filter_complex
> > "silencedetect=n=-40dB:d=0.1,ametadata=mode=pipe:file=4" -f null - 4>
> > test.txt
> >
> > Also at the same time I converted mode=file output to avio.
>
> Can't file option be extended to support pipe: and other stuff?

Sure. I made this ad hoc for own needs, and tried to keep it minimal, but
could easily rework. So ignore this patch, if there aren't any opposing
opinions.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added pipe output to metadata filter

2016-06-22 Thread Paul B Mahol
On 6/22/16, sami.h...@gmail.com  wrote:
> From: Sami Hult 
>
> I added option mode=pipe which accepts file=(file descriptor) option. This
> way multiple streams can for example be silencedetected and the result
> directed to different outputs.
>
> Example:
>
> ffmpeg -i test.wav -filter_complex
> "silencedetect=n=-40dB:d=0.1,ametadata=mode=pipe:file=4" -f null - 4>
> test.txt
>
> Also at the same time I converted mode=file output to avio.

Can't file option be extended to support pipe: and other stuff?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] fate: add apad test

2016-06-22 Thread Petru Rares Sincraian
Hi,


Here is another test. In this case for apad filter.
From 7fc05fd4e3bd7d610189e14e3cfd4968bc570a65 Mon Sep 17 00:00:00 2001
From: Petru Rares Sincraian 
Date: Wed, 22 Jun 2016 15:24:26 +0200
Subject: [PATCH] fate: add apad test

---
 tests/fate/filter-audio.mak |   5 +
 tests/ref/fate/filter-apad  | 265 
 2 files changed, 270 insertions(+)
 create mode 100644 tests/ref/fate/filter-apad

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 2bdb644..ede9105 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -68,6 +68,11 @@ fate-filter-alimiter: tests/data/asynth-44100-2.wav
 fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
 fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2
 
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, APAD, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-apad
+fate-filter-apad: tests/data/asynth-44100-2.wav
+fate-filter-apad: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
+fate-filter-apad: CMD = framecrc -i $(SRC) -af apad=pad_len=10
+
 tests/data/hls-list.m3u8: TAG = GEN
 tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
 	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
diff --git a/tests/ref/fate/filter-apad b/tests/ref/fate/filter-apad
new file mode 100644
index 000..194a459
--- /dev/null
+++ b/tests/ref/fate/filter-apad
@@ -0,0 +1,265 @@
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+0,  0,  0, 1024, 4096, 0x29e3eecf
+0,   1024,   1024, 1024, 4096, 0x18390b96
+0,   2048,   2048, 1024, 4096, 0xc477fa99
+0,   3072,   3072, 1024, 4096, 0x3bc0f14f
+0,   4096,   4096, 1024, 4096, 0x2379ed91
+0,   5120,   5120, 1024, 4096, 0xfd6a0070
+0,   6144,   6144, 1024, 4096, 0x0b01f4cf
+0,   7168,   7168, 1024, 4096, 0x6716fd93
+0,   8192,   8192, 1024, 4096, 0x1840f25b
+0,   9216,   9216, 1024, 4096, 0x9c1ffaf1
+0,  10240,  10240, 1024, 4096, 0xcbedefaf
+0,  11264,  11264, 1024, 4096, 0x3e050390
+0,  12288,  12288, 1024, 4096, 0xb30e0090
+0,  13312,  13312, 1024, 4096, 0x26b8f75b
+0,  14336,  14336, 1024, 4096, 0xd706e311
+0,  15360,  15360, 1024, 4096, 0x0c480138
+0,  16384,  16384, 1024, 4096, 0x6c9a0216
+0,  17408,  17408, 1024, 4096, 0x7abce54f
+0,  18432,  18432, 1024, 4096, 0xda45f63f
+0,  19456,  19456, 1024, 4096, 0x50d5ff87
+0,  20480,  20480, 1024, 4096, 0x59be0352
+0,  21504,  21504, 1024, 4096, 0xa61af077
+0,  22528,  22528, 1024, 4096, 0x84c4fc07
+0,  23552,  23552, 1024, 4096, 0x4a35f345
+0,  24576,  24576, 1024, 4096, 0xbb65fa81
+0,  25600,  25600, 1024, 4096, 0xf6c7f5e5
+0,  26624,  26624, 1024, 4096, 0xd3270138
+0,  27648,  27648, 1024, 4096, 0x4782ed53
+0,  28672,  28672, 1024, 4096, 0xe308f055
+0,  29696,  29696, 1024, 4096, 0x7d33f97d
+0,  30720,  30720, 1024, 4096, 0xb8b00dd4
+0,  31744,  31744, 1024, 4096, 0x7ff7efab
+0,  32768,  32768, 1024, 4096, 0x29e3eecf
+0,  33792,  33792, 1024, 4096, 0x18390b96
+0,  34816,  34816, 1024, 4096, 0xc477fa99
+0,  35840,  35840, 1024, 4096, 0x3bc0f14f
+0,  36864,  36864, 1024, 4096, 0x2379ed91
+0,  37888,  37888, 1024, 4096, 0xfd6a0070
+0,  38912,  38912, 1024, 4096, 0x0b01f4cf
+0,  39936,  39936, 1024, 4096, 0x6716fd93
+0,  40960,  40960, 1024, 4096, 0x1840f25b
+0,  41984,  41984, 1024, 4096, 0x9c1ffaf1
+0,  43008,  43008, 1024, 4096, 0xcbedefaf
+0,  44032,  44032, 1024, 4096, 0xda37d691
+0,  45056,  45056, 1024, 4096, 0x7193ecbf
+0,  46080,  46080, 1024, 4096, 0x6e4a0a36
+0,  47104,  47104, 1024, 4096, 0x61cfe70d
+0,  48128,  48128, 1024, 4096, 0xc19ffa15
+0,  49152,  49152, 1024, 4096, 0x7b32fb3d
+0,  50176,  50176, 1024, 4096, 0xdacefd3f
+0,  51200,  51200, 1024, 4096, 0x3964f64d
+0,  52224,  52224, 1024, 4096, 0xdcf2edad
+0,  53248,  53248, 1024, 4096, 0x1367f69b
+0,  54272,  54272, 1024, 4096, 0xd4c6f7b9
+0,  55296,  55296, 1024, 4096, 0x9e041186
+0,  56320,  56320, 1024, 4096, 0xe939edd7
+0,  57344,  57344, 1024, 4096, 0xa932336a
+0,  58368,  58368, 1024, 4096, 

Re: [FFmpeg-devel] [PATCH] lavf/img2dec: add pnm pipe demuxers

2016-06-22 Thread Clément Bœsch
On Wed, Jun 22, 2016 at 11:56:43AM +0200, Michael Niedermayer wrote:
> On Wed, Jun 22, 2016 at 10:28:14AM +0200, Clément Bœsch wrote:
> > On Mon, Jun 20, 2016 at 04:39:47PM +0200, Michael Niedermayer wrote:
> > [...]
> > > > +static inline int pnm_probe(const AVProbeData *p)
> > > > +{
> > > > +const uint8_t *b = p->buf;
> > > > +
> > > > +while (b[2] == '\r')
> > > > +b++;
> > > 
> > > shouldnt this check buf_size ?
> > > 
> > 
> > Inside AVProbeData struct declaration:
> >   unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra 
> > allocated bytes filled with zero. */
> > 
> > So in the worst case it will reach a zero, and then bail out because it's
> > not a '\n'
> 
> patch ok
> 

applied, thanks

> maybe the zeroness of the padding should be checked somewhere
> 

-- 
Clément B.


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


[FFmpeg-devel] [PATCH] Added pipe output to metadata filter

2016-06-22 Thread sami . hult
From: Sami Hult 

I added option mode=pipe which accepts file=(file descriptor) option. This way 
multiple streams can for example be silencedetected and the result directed to 
different outputs.

Example:

ffmpeg -i test.wav -filter_complex 
"silencedetect=n=-40dB:d=0.1,ametadata=mode=pipe:file=4" -f null - 4> test.txt

Also at the same time I converted mode=file output to avio.


Signed-off-by: Sami Hult 
---
 Changelog|  1 +
 libavfilter/f_metadata.c | 52 +++-
 2 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/Changelog b/Changelog
index f6016f4..4909abf 100644
--- a/Changelog
+++ b/Changelog
@@ -42,6 +42,7 @@ version :
 - OpenExr improvements (tile data and B44/B44A support)
 - BitJazz SheerVideo decoder
 - CUDA CUVID H264/HEVC decoder
+- Pipe output to metadata filter
 
 
 version 3.0:
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c
index ab07ccf..aa9fb92 100644
--- a/libavfilter/f_metadata.c
+++ b/libavfilter/f_metadata.c
@@ -31,6 +31,7 @@
 #include "libavutil/internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/timestamp.h"
+#include "libavformat/avio.h"
 #include "avfilter.h"
 #include "audio.h"
 #include "formats.h"
@@ -43,6 +44,7 @@ enum MetadataMode {
 METADATA_MODIFY,
 METADATA_DELETE,
 METADATA_PRINT,
+METADATA_PIPE,
 METADATA_NB
 };
 
@@ -80,7 +82,7 @@ typedef struct MetadataContext {
 AVExpr *expr;
 double var_values[VAR_VARS_NB];
 
-FILE *file;
+AVIOContext* avio_context;
 char *file_str;
 
 int (*compare)(struct MetadataContext *s,
@@ -97,6 +99,7 @@ static const AVOption filt_name##_options[] = { \
 {   "modify", "modify metadata", 0,  AV_OPT_TYPE_CONST,  
{.i64 = METADATA_MODIFY }, 0, 0, FLAGS, "mode" }, \
 {   "delete", "delete metadata", 0,  AV_OPT_TYPE_CONST,  
{.i64 = METADATA_DELETE }, 0, 0, FLAGS, "mode" }, \
 {   "print",  "print metadata",  0,  AV_OPT_TYPE_CONST,  
{.i64 = METADATA_PRINT },  0, 0, FLAGS, "mode" }, \
+{   "pipe",   "pipe metadata",   0,  AV_OPT_TYPE_CONST,  
{.i64 = METADATA_PIPE },   0, 0, FLAGS, "mode" }, \
 { "key",   "set metadata key",   OFFSET(key),AV_OPT_TYPE_STRING, 
{.str = NULL }, 0, 0, FLAGS }, \
 { "value", "set metadata value", OFFSET(value),  AV_OPT_TYPE_STRING, 
{.str = NULL }, 0, 0, FLAGS }, \
 { "function", "function for comparing values", OFFSET(function), 
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, METADATAF_NB-1, FLAGS, "function" }, \
@@ -180,17 +183,21 @@ static void print_file(AVFilterContext *ctx, const char 
*msg, ...)
 va_list argument_list;
 
 va_start(argument_list, msg);
-if (msg)
-vfprintf(s->file, msg, argument_list);
+if (msg) {
+char buf[128];
+vsnprintf(buf, sizeof(buf), msg, argument_list);
+avio_printf(s->avio_context, buf);
+}
 va_end(argument_list);
 }
 
 static av_cold int init(AVFilterContext *ctx)
 {
 MetadataContext *s = ctx->priv;
+char *url = NULL;
 int ret;
 
-if (!s->key && s->mode != METADATA_PRINT) {
+if (!s->key && s->mode != METADATA_PRINT && s->mode != METADATA_PIPE) {
 av_log(ctx, AV_LOG_WARNING, "Metadata key must be set\n");
 return AVERROR(EINVAL);
 }
@@ -236,25 +243,33 @@ static av_cold int init(AVFilterContext *ctx)
 }
 }
 
-if (s->file_str) {
+if (s->mode == METADATA_PIPE) {
+url = av_asprintf("pipe:%s", s->file_str);
+s->print = print_file;
+} else if (s->mode == METADATA_PRINT) {
 if (!strcmp(s->file_str, "-")) {
-s->file = stdout;
+url = av_asprintf("pipe:1");
 } else {
-s->file = fopen(s->file_str, "w");
-if (!s->file) {
-int err = AVERROR(errno);
-char buf[128];
-av_strerror(err, buf, sizeof(buf));
-av_log(ctx, AV_LOG_ERROR, "Could not open file %s: %s\n",
-   s->file_str, buf);
-return err;
-}
+url = av_asprintf("file:%s", s->file_str);
 }
 s->print = print_file;
 } else {
 s->print = print_log;
 }
 
+s->avio_context = NULL;
+if (url) {
+ret = avio_open(>avio_context, url, AVIO_FLAG_WRITE);
+if (ret < 0) {
+char buf[128];
+av_strerror(ret, buf, sizeof(buf));
+av_log(ctx, AV_LOG_ERROR, "Could not open %s: %s\n",
+   url, buf);
+return ret;
+}
+av_free(url);
+}
+
 return 0;
 }
 
@@ -262,9 +277,9 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
 MetadataContext *s = ctx->priv;
 
-if (s->file && s->file != stdout)
-fclose(s->file);
-s->file = NULL;
+if (s->avio_context) {
+avio_closep(>avio_context);
+}
 }
 
 static int 

Re: [FFmpeg-devel] [PATCH] lavf/img2dec: add pnm pipe demuxers

2016-06-22 Thread Carl Eugen Hoyos
Clément Bœsch  pkh.me> writes:

> On Mon, Jun 20, 2016 at 01:07:09PM +, Carl Eugen Hoyos wrote:
> > Clément Bœsch  pkh.me> writes:
> > 
> > > +static int pgmyuv_probe(AVProbeData *p)
> > > +{
> > > +int ret = pgmx_probe(p);
> > > +return ret && av_match_ext(p->filename, "pgmyuv") ? ret : 0;
> > 
> > You could add a comment that this format was invented within 
> > FFmpeg, I hadn't realized this.
> 
> I'm not sure the probe code is really the best place to do 
> that but added locally anyway

Thank you!
I was a little surprised why the extension is used to distinguish.

> > And you could check for positive resolutions if you want to 
> > improve probing.
> 
> Yeah, probing could be improved, but it requires some line 
> skipping logic (empty lines, comments, etc) I wasn't that 
> motivated to write (probably due to a traumatic history with 
> text subtitles).

Then please ignore;-)

> > Did you run the probe test for the new functions?
> 
> Should I pass special parameters?

You don't have to (the test passed), if you add the name 
of the demuxer you want to test, it runs faster.

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


Re: [FFmpeg-devel] [PATCH] avcodec: remove libutvideo wrapper support

2016-06-22 Thread Paul B Mahol
On 6/22/16, Carl Eugen Hoyos  wrote:
> Paul B Mahol  gmail.com> writes:
>
>> bziped patch attached.
>
> Is there a reason to bzip this patch?

Yes, its smaller.

>
> Please give me a day or two, Carl Eugen
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] fate: add test for amerge

2016-06-22 Thread Petru Rares Sincraian
Upps, solved.


Thanks,

Petru Rares.


From: ffmpeg-devel  on behalf of Michael 
Niedermayer 
Sent: Tuesday, June 21, 2016 7:06:27 PM
To: FFmpeg development discussions and patches
Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for amerge

On Tue, Jun 21, 2016 at 12:53:05PM +, Petru Rares Sincraian wrote:
>
> Hi there,
>
> Here is test for amerge.
>
>
> Regards,
> Petru Rares.

>  fate/filter-audio.mak  |5 +
>  ref/fate/filter-amerge |  135 
> +
>  2 files changed, 140 insertions(+)
> 1bb444a73dd174a82d8ff3c13171d0805e48aead  0001-fate-add-test-for-amerge.patch
> From 4882601b6eb5a825bd5ddf837b1dce3977496314 Mon Sep 17 00:00:00 2001
> From: Petru Rares Sincraian 
> Date: Tue, 21 Jun 2016 14:43:01 +0200
> Subject: [PATCH] fate: add test for amerge
>
> ---
>  tests/fate/filter-audio.mak  |   5 ++
>  tests/ref/fate/filter-amerge | 135 
> +++
>  2 files changed, 140 insertions(+)
>  create mode 100644 tests/ref/fate/filter-amerge
>
> diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> index 7c903b7..ea47961 100644
> --- a/tests/fate/filter-audio.mak
> +++ b/tests/fate/filter-audio.mak
> @@ -63,6 +63,11 @@ fate-filter-agate: tests/data/asynth-44100-2.wav
>  fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
>  fate-filter-agate: CMD = framecrc -i $(SRC) -af 
> agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4
>
> +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, 
> WAV) += fate-filter-amerge
   ^
shouldnt this be AMERGE ?

[...]

--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
From 9a6e91851eecce7b527c4ab003ac4f54f29461a4 Mon Sep 17 00:00:00 2001
From: Petru Rares Sincraian 
Date: Tue, 21 Jun 2016 14:43:01 +0200
Subject: [PATCH] fate: add test for amerge

---
 tests/fate/filter-audio.mak  |   5 ++
 tests/ref/fate/filter-amerge | 135 +++
 2 files changed, 140 insertions(+)
 create mode 100644 tests/ref/fate/filter-amerge

diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index 2bdb644..3126f84 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -68,6 +68,11 @@ fate-filter-alimiter: tests/data/asynth-44100-2.wav
 fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
 fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2
 
+FATE_AFILTER-$(call FILTERDEMDECENCMUX, AMERGE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-amerge
+fate-filter-amerge: tests/data/asynth-44100-1.wav
+fate-filter-amerge: SRC = $(TARGET_PATH)/tests/data/asynth-44100-1.wav
+fate-filter-amerge: CMD = framecrc -i $(SRC) -i $(SRC) -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]"
+
 tests/data/hls-list.m3u8: TAG = GEN
 tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
 	$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
diff --git a/tests/ref/fate/filter-amerge b/tests/ref/fate/filter-amerge
new file mode 100644
index 000..006383a
--- /dev/null
+++ b/tests/ref/fate/filter-amerge
@@ -0,0 +1,135 @@
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout 0: 3
+0,  0,  0, 2048, 8192, 0x120efa65
+0,   2048,   2048, 2048, 8192, 0x7b3cebf7
+0,   4096,   4096, 2048, 8192, 0x0fb8ee01
+0,   6144,   6144, 2048, 8192, 0x47a9f271
+0,   8192,   8192, 2048, 8192, 0x47a8ed5b
+0,  10240,  10240, 2048, 8192, 0xdab6f33f
+0,  12288,  12288, 2048, 8192, 0xda4df7eb
+0,  14336,  14336, 2048, 8192, 0xc83ce449
+0,  16384,  16384, 2048, 8192, 0x4954e765
+0,  18432,  18432, 2048, 8192, 0x0214f5d5
+0,  20480,  20480, 2048, 8192, 0x2302f3c9
+0,  22528,  22528, 2048, 8192, 0x2b57ef5b
+0,  24576,  24576, 2048, 8192, 0xad22f075
+0,  26624,  26624, 2048, 8192, 0x9bd5ee8b
+0,  28672,  28672, 2048, 8192, 0x91a4e9e1
+0,  30720,  30720, 2048, 8192, 0x85a9fd7f
+0,  32768,  32768, 2048, 8192, 0x120efa65
+0,  34816,  34816, 2048, 8192, 0x7b3cebf7
+0,  36864,  36864, 2048, 8192, 0x0fb8ee01
+0,  38912,  38912, 2048, 8192, 0x47a9f271
+0,  40960,  40960, 2048, 8192, 0x47a8ed5b
+0,  43008,  43008, 2048, 8192, 0x76f7c64f
+0,  45056,  45056, 2048, 8192, 0xade0f6f5
+0,  47104,  

Re: [FFmpeg-devel] [PATCH] avcodec: remove libutvideo wrapper support

2016-06-22 Thread Carl Eugen Hoyos
Paul B Mahol  gmail.com> writes:

> bziped patch attached.

Is there a reason to bzip this patch?

Please give me a day or two, Carl Eugen

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


[FFmpeg-devel] [PATCH] avcodec: remove libutvideo wrapper support

2016-06-22 Thread Paul B Mahol
Hi,

bziped patch attached.


0001-avcodec-remove-libutvideo-wrapper-support.patch.bz2
Description: BZip2 compressed data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] lavc/mediacodec: improve end of stream handling

2016-06-22 Thread Matthieu Bouron
On Tue, Jun 21, 2016 at 02:41:19PM +0200, Matthieu Bouron wrote:
> Hello,
> 
> The following patchset improve handling of EOS (End Of Stream) in the
> mediacodec decoder.
> 
> The decoder now relies on the relevant buffer info flags to detect EOS instead
> of counting queued/dequeued buffers.
> 
> It also fixes a potential loss of frames while flushing (draining) the
> remaining frames from the decoder.

If there is no objection, I will push the patchset in one day.

Matthieu

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


Re: [FFmpeg-devel] [PATCH] lavf/img2dec: add pnm pipe demuxers

2016-06-22 Thread Michael Niedermayer
On Wed, Jun 22, 2016 at 10:28:14AM +0200, Clément Bœsch wrote:
> On Mon, Jun 20, 2016 at 04:39:47PM +0200, Michael Niedermayer wrote:
> [...]
> > > +static inline int pnm_probe(const AVProbeData *p)
> > > +{
> > > +const uint8_t *b = p->buf;
> > > +
> > > +while (b[2] == '\r')
> > > +b++;
> > 
> > shouldnt this check buf_size ?
> > 
> 
> Inside AVProbeData struct declaration:
>   unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra 
> allocated bytes filled with zero. */
> 
> So in the worst case it will reach a zero, and then bail out because it's
> not a '\n'

patch ok

maybe the zeroness of the padding should be checked somewhere


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- 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] lavf/img2dec: add pnm pipe demuxers

2016-06-22 Thread Clément Bœsch
On Mon, Jun 20, 2016 at 04:39:47PM +0200, Michael Niedermayer wrote:
[...]
> > +static inline int pnm_probe(const AVProbeData *p)
> > +{
> > +const uint8_t *b = p->buf;
> > +
> > +while (b[2] == '\r')
> > +b++;
> 
> shouldnt this check buf_size ?
> 

Inside AVProbeData struct declaration:
  unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra 
allocated bytes filled with zero. */

So in the worst case it will reach a zero, and then bail out because it's
not a '\n'

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH] lavc/videotoolbox: fix avcC extradata creation

2016-06-22 Thread Matthieu Bouron
On Tue, Jun 21, 2016 at 12:59:32PM -0400, Richard Kern wrote:
> 
> > On Jun 21, 2016, at 11:48 AM, Matthieu Bouron  
> > wrote:
> > 
> > From: Matthieu Bouron 
> > 
> > Fixes properly ticket #5638.
> > 
> > Since 772ad7142dff590c7bb30370acf5d3c9a8fb512b PPS and SPS contain the
> > nal type byte.
> > 
> > This reverts commit b8d754c5d0a2e99022c27bd1159ea3f597f67452.
> > This reverts commit 8e47a99f576da10b2a36e33b6b9acbf1c2da7485.
> > ---
> > libavcodec/videotoolbox.c | 82 
> > +--
> > 1 file changed, 22 insertions(+), 60 deletions(-)
> > 
> > diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
> > index 7b5245a..c2c621d 100644
> > --- a/libavcodec/videotoolbox.c
> > +++ b/libavcodec/videotoolbox.c
> > @@ -84,7 +84,7 @@ CFDataRef 
> > ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx)
> > H264Context *h = avctx->priv_data;
> > CFDataRef data = NULL;
> > uint8_t *p;
> > -int vt_extradata_size = 6 + 3 + h->ps.sps->data_size + 4 + 
> > h->ps.pps->data_size;
> > +int vt_extradata_size = 6 + 2 + h->ps.sps->data_size + 3 + 
> > h->ps.pps->data_size;
> > uint8_t *vt_extradata = av_malloc(vt_extradata_size);
> > if (!vt_extradata)
> > return NULL;
> > @@ -92,21 +92,19 @@ CFDataRef 
> > ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx)
> > p = vt_extradata;
> > 
> > AV_W8(p + 0, 1); /* version */
> > -AV_W8(p + 1, h->ps.sps->data[0]); /* profile */
> > -AV_W8(p + 2, h->ps.sps->data[1]); /* profile compat */
> > -AV_W8(p + 3, h->ps.sps->data[2]); /* level */
> > +AV_W8(p + 1, h->ps.sps->data[1]); /* profile */
> > +AV_W8(p + 2, h->ps.sps->data[2]); /* profile compat */
> > +AV_W8(p + 3, h->ps.sps->data[3]); /* level */
> > AV_W8(p + 4, 0xff); /* 6 bits reserved (11) + 2 bits nal size 
> > length - 3 (11) */
> > AV_W8(p + 5, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps 
> > (1) */
> > -AV_WB16(p + 6, h->ps.sps->data_size + 1);
> > -AV_W8(p + 8, NAL_SPS | (3 << 5)); // NAL unit header
> > -memcpy(p + 9, h->ps.sps->data, h->ps.sps->data_size);
> > -p += 9 + h->ps.sps->data_size;
> > +AV_WB16(p + 6, h->ps.sps->data_size);
> > +memcpy(p + 8, h->ps.sps->data, h->ps.sps->data_size);
> > +p += 8 + h->ps.sps->data_size;
> > AV_W8(p + 0, 1); /* number of pps */
> > -AV_WB16(p + 1, h->ps.pps->data_size + 1);
> > -AV_W8(p + 3, NAL_PPS | (3 << 5)); // NAL unit header
> > -memcpy(p + 4, h->ps.pps->data, h->ps.pps->data_size);
> > +AV_WB16(p + 1, h->ps.pps->data_size);
> > +memcpy(p + 3, h->ps.pps->data, h->ps.pps->data_size);
> > 
> > -p += 4 + h->ps.pps->data_size;
> > +p += 3 + h->ps.pps->data_size;
> > av_assert0(p - vt_extradata == vt_extradata_size);
> > 
> > data = CFDataCreate(kCFAllocatorDefault, vt_extradata, 
> > vt_extradata_size);
> > @@ -487,58 +485,23 @@ static CFDictionaryRef 
> > videotoolbox_buffer_attributes_create(int width,
> > return buffer_attributes;
> > }
> > 
> > -static CMVideoFormatDescriptionRef 
> > videotoolbox_format_desc_create(AVCodecContext *avctx,
> > -   
> > CMVideoCodecType codec_type,
> > +static CMVideoFormatDescriptionRef 
> > videotoolbox_format_desc_create(CMVideoCodecType codec_type,
> >
> > CFDictionaryRef decoder_spec,
> >int 
> > width,
> >int 
> > height)
> > {
> > -CMFormatDescriptionRef cm_fmt_desc = NULL;
> > -int status;
> > -
> > -#if TARGET_OS_IPHONE || defined(__MAC_10_9)
> > -H264Context *h = codec_type == kCMVideoCodecType_H264 ? 
> > avctx->priv_data : NULL;
> > -
> > -if (h && h->ps.sps->data_size && h->ps.pps->data_size) {
> > -int ps_count = 2;
> > -const uint8_t **ps_data = av_malloc(sizeof(uint8_t*) * ps_count);
> > -size_t *ps_sizes = av_malloc(sizeof(size_t)  * ps_count);
> > -
> > -ps_data[0]  = h->ps.sps->data;
> > -ps_sizes[0] = h->ps.sps->data_size;
> > -
> > -ps_data[1]  = h->ps.pps->data;
> > -ps_sizes[1] = h->ps.pps->data_size;
> > +CMFormatDescriptionRef cm_fmt_desc;
> > +OSStatus status;
> > 
> > -status = CMVideoFormatDescriptionCreateFromH264ParameterSets(NULL,
> > - 
> > ps_count,
> > - 
> > ps_data,
> > - 
> > ps_sizes,
> > - 4,
> > - 
> > _fmt_desc);
> > -

Re: [FFmpeg-devel] [PATCH] lavf/img2dec: add pnm pipe demuxers

2016-06-22 Thread Clément Bœsch
On Mon, Jun 20, 2016 at 01:07:09PM +, Carl Eugen Hoyos wrote:
> Clément Bœsch  pkh.me> writes:
> 
> > +static int pgmyuv_probe(AVProbeData *p)
> > +{
> > +int ret = pgmx_probe(p);
> > +return ret && av_match_ext(p->filename, "pgmyuv") ? ret : 0;
> 
> You could add a comment that this format was invented within 
> FFmpeg, I hadn't realized this.

I'm not sure the probe code is really the best place to do that but added
locally anyway

> And you could check for positive resolutions if you want to 
> improve probing.

Yeah, probing could be improved, but it requires some line skipping logic
(empty lines, comments, etc) I wasn't that motivated to write (probably
due to a traumatic history with text subtitles).

> Did you run the probe test for the new functions?

Should I pass special parameters?

testing size=1
testing size=2
testing size=4
testing size=8
Failure of vqf probing code with score=50 type=3 p=C2A size=8
Failure of mov,mp4,m4a,3gp,3g2,mj2 probing code with score=50 type=3 p=FD1
size=8
Failure of 3dostr probing code with score=66 type=3 p=E2 size=8
Failure of mov,mp4,m4a,3gp,3g2,mj2 probing code with score=100 type=3 p=75
size=8
testing size=16
Failure of musx probing code with score=40 type=3 p=A6A size=16
Failure of alias_pix probing code with score=51 type=0 p=CBA size=16
testing size=32
testing size=64
Failure of mpc8 probing code with score=49 type=3 p=85A size=64
testing size=128
testing size=256
testing size=512
testing size=1024
testing size=2048
testing size=4096
testing size=8192
testing size=16384

-- 
Clément B.


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