[FFmpeg-cvslog] avfilter/vf_histogram: make it possible to pick color components for levels mode

2015-08-19 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Wed Aug 19 10:05:33 
2015 +| [fa95965f5aee9b434fad78860ff7ff1368cb2bac] | committer: Paul B Mahol

avfilter/vf_histogram: make it possible to pick color components for levels mode

Signed-off-by: Paul B Mahol 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa95965f5aee9b434fad78860ff7ff1368cb2bac
---

 doc/filters.texi   |4 
 libavfilter/vf_histogram.c |   19 +++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 7b386ef..e94ec40 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6530,6 +6530,10 @@ Default is @code{parade}.
 @item levels_mode
 Set mode for @code{levels}. Can be either @code{linear}, or @code{logarithmic}.
 Default is @code{linear}.
+
+@item components
+Set what color components to display for mode @code{levels}.
+Default is @code{7}.
 @end table
 
 @subsection Examples
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 31004b7..7c7e26d 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -50,6 +50,7 @@ typedef struct HistogramContext {
 intdisplay_mode;
 intlevels_mode;
 const AVPixFmtDescriptor *desc;
+intcomponents;
 } HistogramContext;
 
 #define OFFSET(x) offsetof(HistogramContext, x)
@@ -74,6 +75,7 @@ static const AVOption histogram_options[] = {
 { "levels_mode", "set levels mode", OFFSET(levels_mode), AV_OPT_TYPE_INT, 
{.i64=0}, 0, 1, FLAGS, "levels_mode"},
 { "linear",  NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
"levels_mode" },
 { "logarithmic", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
"levels_mode" },
+{ "components", "set color components to display", OFFSET(components), 
AV_OPT_TYPE_INT, {.i64=7}, 1, 15, FLAGS},
 { NULL }
 };
 
@@ -158,11 +160,16 @@ static int config_output(AVFilterLink *outlink)
 {
 AVFilterContext *ctx = outlink->src;
 HistogramContext *h = ctx->priv;
+int ncomp = 0, i;
 
 switch (h->mode) {
 case MODE_LEVELS:
+for (i = 0; i < h->ncomp; i++) {
+if ((1 << i) & h->components)
+ncomp++;
+}
 outlink->w = 256;
-outlink->h = (h->level_height + h->scale_height) * FFMAX(h->ncomp * 
h->display_mode, 1);
+outlink->h = (h->level_height + h->scale_height) * FFMAX(ncomp * 
h->display_mode, 1);
 break;
 case MODE_WAVEFORM:
 if (h->waveform_mode)
@@ -238,7 +245,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 AVFrame *out;
 const uint8_t *src;
 uint8_t *dst;
-int i, j, k, l;
+int i, j, k, l, m;
 
 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
 if (!out) {
@@ -260,12 +267,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 
 switch (h->mode) {
 case MODE_LEVELS:
-for (k = 0; k < h->ncomp; k++) {
+for (m = 0, k = 0; k < h->ncomp; k++) {
 const int p = h->desc->comp[k].plane;
-const int start = k * (h->level_height + h->scale_height) * 
h->display_mode;
+int start;
 double max_hval_log;
 unsigned max_hval = 0;
 
+if (!((1 << k) & h->components))
+continue;
+start = m++ * (h->level_height + h->scale_height) * 
h->display_mode;
+
 for (i = 0; i < in->height; i++) {
 src = in->data[p] + i * in->linesize[p];
 for (j = 0; j < in->width; j++)

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


[FFmpeg-cvslog] libavformat/matroskaenc.c: fix small memory leaks on error

2015-08-19 Thread Neil Birkbeck
ffmpeg | branch: master | Neil Birkbeck  | Wed Aug 19 
01:06:56 2015 -0700| [3dabebc272b0ab5455610975a6d75de08b97dc62] | committer: 
Michael Niedermayer

libavformat/matroskaenc.c: fix small memory leaks on error

Fixing small leaks that can occur when mkv_write_tracks fails in 
mkv_write_header
(e.g., if video track has unknown codec). Also changing mkv_write_seekhead to 
take
the MatroskaMuxContext to avoid having dangling pointers.

Signed-off-by: Neil Birkbeck 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3dabebc272b0ab5455610975a6d75de08b97dc62
---

 libavformat/matroskaenc.c |   67 +
 1 file changed, 44 insertions(+), 23 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 7f82804..1325c3f 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -309,6 +309,23 @@ static void put_xiph_size(AVIOContext *pb, int size)
 }
 
 /**
+ * Free the members allocated in the mux context.
+ */
+static void mkv_free(MatroskaMuxContext *mkv) {
+if (mkv->main_seekhead) {
+av_freep(&mkv->main_seekhead->entries);
+av_freep(&mkv->main_seekhead);
+}
+if (mkv->cues) {
+av_freep(&mkv->cues->entries);
+av_freep(&mkv->cues);
+}
+av_freep(&mkv->tracks);
+av_freep(&mkv->stream_durations);
+av_freep(&mkv->stream_duration_offsets);
+}
+
+/**
  * Initialize a mkv_seekhead element to be ready to index level 1 Matroska
  * elements. If a maximum number of elements is specified, enough space
  * will be reserved at the current file location to write a seek head of
@@ -368,8 +385,9 @@ static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, 
unsigned int elementid
  * @return The file offset where the seekhead was written,
  * -1 if an error occurred.
  */
-static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
+static int64_t mkv_write_seekhead(AVIOContext *pb, MatroskaMuxContext *mkv)
 {
+mkv_seekhead *seekhead = mkv->main_seekhead;
 ebml_master metaseek, seekentry;
 int64_t currentpos;
 int i;
@@ -406,8 +424,8 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, 
mkv_seekhead *seekhead)
 currentpos = seekhead->filepos;
 }
 fail:
-av_freep(&seekhead->entries);
-av_free(seekhead);
+av_freep(&mkv->main_seekhead->entries);
+av_freep(&mkv->main_seekhead);
 
 return currentpos;
 }
@@ -1397,9 +1415,10 @@ static int mkv_write_header(AVFormatContext *s)
 }
 
 mkv->tracks = av_mallocz_array(s->nb_streams, sizeof(*mkv->tracks));
-if (!mkv->tracks)
-return AVERROR(ENOMEM);
-
+if (!mkv->tracks) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 ebml_header = start_ebml_master(pb, EBML_ID_HEADER, 0);
 put_ebml_uint   (pb, EBML_ID_EBMLVERSION,   1);
 put_ebml_uint   (pb, EBML_ID_EBMLREADVERSION,   1);
@@ -1419,11 +1438,13 @@ static int mkv_write_header(AVFormatContext *s)
 // isn't more than 10 elements if we only write one of each other
 // currently defined level 1 element
 mkv->main_seekhead= mkv_start_seekhead(pb, mkv->segment_offset, 10);
-if (!mkv->main_seekhead)
-return AVERROR(ENOMEM);
+if (!mkv->main_seekhead) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 
 ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_INFO, 
avio_tell(pb));
-if (ret < 0) return ret;
+if (ret < 0) goto fail;
 
 segment_info = start_ebml_master(pb, MATROSKA_ID_INFO, 0);
 put_ebml_uint(pb, MATROSKA_ID_TIMECODESCALE, 100);
@@ -1472,7 +1493,7 @@ static int mkv_write_header(AVFormatContext *s)
 
 ret = mkv_write_tracks(s);
 if (ret < 0)
-return ret;
+goto fail;
 
 for (i = 0; i < s->nb_chapters; i++)
 mkv->chapter_id_offset = FFMAX(mkv->chapter_id_offset, 1LL - 
s->chapters[i]->id);
@@ -1480,24 +1501,25 @@ static int mkv_write_header(AVFormatContext *s)
 if (mkv->mode != MODE_WEBM) {
 ret = mkv_write_chapters(s);
 if (ret < 0)
-return ret;
+goto fail;
 
 ret = mkv_write_tags(s);
 if (ret < 0)
-return ret;
+goto fail;
 
 ret = mkv_write_attachments(s);
 if (ret < 0)
-return ret;
+goto fail;
 }
 
 if (!s->pb->seekable && !mkv->is_live)
-mkv_write_seekhead(pb, mkv->main_seekhead);
+mkv_write_seekhead(pb, mkv);
 
 mkv->cues = mkv_start_cues(mkv->segment_offset);
-if (!mkv->cues)
-return AVERROR(ENOMEM);
-
+if (!mkv->cues) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
 if (pb->seekable && mkv->reserve_cues_space) {
 mkv->cues_pos = avio_tell(pb);
 put_ebml_void(pb, mkv->reserve_cues_space);
@@ -1524,6 +1546,9 @@ static int mkv_write_header(AVFormatContext *s)
 }
 
 return 0;
+fail:
+mkv_free(mkv);
+

[FFmpeg-cvslog] avcodec/qsvenc: Added PicTiming SEI

2015-08-19 Thread Sven Dueking
ffmpeg | branch: master | Sven Dueking  | Wed Aug 19 09:17:40 
2015 +0100| [6eecb91fbc275fec5225626c06d061e883ba37e0] | committer: Michael 
Niedermayer

avcodec/qsvenc: Added PicTiming SEI

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6eecb91fbc275fec5225626c06d061e883ba37e0
---

 libavcodec/qsvenc.c  |3 +++
 libavcodec/qsvenc.h  |1 +
 libavcodec/qsvenc_h264.c |1 +
 3 files changed, 5 insertions(+)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index e5d3fa6..1532258 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -146,6 +146,9 @@ static int init_video_param(AVCodecContext *avctx, 
QSVEncContext *q)
 q->extco.CAVLC= avctx->coder_type == FF_CODER_TYPE_VLC 
?
 MFX_CODINGOPTION_ON : 
MFX_CODINGOPTION_UNKNOWN;
 
+q->extco.PicTimingSEI = q->pic_timing_sei ?
+MFX_CODINGOPTION_ON : 
MFX_CODINGOPTION_UNKNOWN;
+
 q->extparam[0] = (mfxExtBuffer *)&q->extco;
 
 q->param.ExtParam= q->extparam;
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index 19be2aa..2316488 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -61,6 +61,7 @@ typedef struct QSVEncContext {
 int preset;
 int avbr_accuracy;
 int avbr_convergence;
+int pic_timing_sei;
 
 char *load_plugins;
 } QSVEncContext;
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index 95396fc..b15f6b2 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -69,6 +69,7 @@ static const AVOption options[] = {
 { "idr_interval", "Distance (in I-frames) between IDR frames", 
OFFSET(qsv.idr_interval), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
 { "avbr_accuracy","Accuracy of the AVBR ratecontrol",
OFFSET(qsv.avbr_accuracy),AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
 { "avbr_convergence", "Convergence of the AVBR ratecontrol", 
OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
+{ "pic_timing_sei","Insert picture timing SEI with pic_struct_syntax 
element", OFFSET(qsv.pic_timing_sei), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
 
 { "profile", NULL, OFFSET(qsv.profile), AV_OPT_TYPE_INT, { .i64 = 
MFX_PROFILE_UNKNOWN }, 0, INT_MAX, VE, "profile" },
 { "unknown" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_PROFILE_UNKNOWN 
 }, INT_MIN, INT_MAX, VE, "profile" },

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


[FFmpeg-cvslog] vaapi: streamline public context structure.

2015-08-19 Thread Gwenole Beauchesne
ffmpeg | branch: master | Gwenole Beauchesne  | 
Tue Jul 28 11:16:12 2015 +0200| [babd340f584988446ef578e7dbc7064b19804f81] | 
committer: Gwenole Beauchesne

vaapi: streamline public context structure.

Move libavcodec managed objects from the public struct vaapi_context
to a new privately owned FFVAContext. This is done so that to clean up
and streamline the public structure, but also to prepare for new codec
support, thus requiring new internal data to be added in there.

The AVCodecContext.hwaccel_context, that holds the public vaapi_context,
shall no longer be accessed from within vaapi_*.c codec support files.

Signed-off-by: Gwenole Beauchesne 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=babd340f584988446ef578e7dbc7064b19804f81
---

 doc/APIchanges  |4 
 libavcodec/vaapi.c  |   40 +++-
 libavcodec/vaapi.h  |   16 
 libavcodec/vaapi_h264.c |   10 +++---
 libavcodec/vaapi_internal.h |   42 --
 libavcodec/vaapi_mpeg2.c|8 ++--
 libavcodec/vaapi_mpeg4.c|   11 +--
 libavcodec/vaapi_vc1.c  |   11 +--
 libavcodec/version.h|7 +--
 9 files changed, 123 insertions(+), 26 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 1b68911..aa92b69 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2014-08-09
 
 API changes, most recent first:
 
+2015-xx-xx - lavc 56.58.100 - vaapi.h
+  Deprecate old VA-API context (vaapi_context) fields that were only
+  set and used by libavcodec. They are all managed internally now.
+
 2015-xx-xx - lavu 54.31.100 - pixfmt.h
   Add a unique pixel format for VA-API (AV_PIX_FMT_VAAPI) that
   indicates the nature of the underlying storage: a VA surface. This
diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c
index 6ac22e6..5dc43e1 100644
--- a/libavcodec/vaapi.c
+++ b/libavcodec/vaapi.c
@@ -21,6 +21,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/log.h"
 #include "h264.h"
 #include "vaapi_internal.h"
 
@@ -41,7 +42,28 @@ static void destroy_buffers(VADisplay display, VABufferID 
*buffers, unsigned int
 }
 }
 
-int ff_vaapi_render_picture(struct vaapi_context *vactx, VASurfaceID surface)
+int ff_vaapi_context_init(AVCodecContext *avctx)
+{
+FFVAContext * const vactx = ff_vaapi_get_context(avctx);
+const struct vaapi_context * const user_vactx = avctx->hwaccel_context;
+
+if (!user_vactx) {
+av_log(avctx, AV_LOG_ERROR, "Hardware acceleration context 
(hwaccel_context) does not exist.\n");
+return AVERROR(ENOSYS);
+}
+
+vactx->display  = user_vactx->display;
+vactx->config_id= user_vactx->config_id;
+vactx->context_id   = user_vactx->context_id;
+return 0;
+}
+
+int ff_vaapi_context_fini(AVCodecContext *avctx)
+{
+return 0;
+}
+
+int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID surface)
 {
 VABufferID va_buffers[3];
 unsigned int n_va_buffers = 0;
@@ -81,7 +103,7 @@ int ff_vaapi_render_picture(struct vaapi_context *vactx, 
VASurfaceID surface)
 return 0;
 }
 
-int ff_vaapi_commit_slices(struct vaapi_context *vactx)
+int ff_vaapi_commit_slices(FFVAContext *vactx)
 {
 VABufferID *slice_buf_ids;
 VABufferID slice_param_buf_id, slice_data_buf_id;
@@ -121,7 +143,7 @@ int ff_vaapi_commit_slices(struct vaapi_context *vactx)
 return 0;
 }
 
-static void *alloc_buffer(struct vaapi_context *vactx, int type, unsigned int 
size, uint32_t *buf_id)
+static void *alloc_buffer(FFVAContext *vactx, int type, unsigned int size, 
uint32_t *buf_id)
 {
 void *data = NULL;
 
@@ -133,22 +155,22 @@ static void *alloc_buffer(struct vaapi_context *vactx, 
int type, unsigned int si
 return data;
 }
 
-void *ff_vaapi_alloc_pic_param(struct vaapi_context *vactx, unsigned int size)
+void *ff_vaapi_alloc_pic_param(FFVAContext *vactx, unsigned int size)
 {
 return alloc_buffer(vactx, VAPictureParameterBufferType, size, 
&vactx->pic_param_buf_id);
 }
 
-void *ff_vaapi_alloc_iq_matrix(struct vaapi_context *vactx, unsigned int size)
+void *ff_vaapi_alloc_iq_matrix(FFVAContext *vactx, unsigned int size)
 {
 return alloc_buffer(vactx, VAIQMatrixBufferType, size, 
&vactx->iq_matrix_buf_id);
 }
 
-uint8_t *ff_vaapi_alloc_bitplane(struct vaapi_context *vactx, uint32_t size)
+uint8_t *ff_vaapi_alloc_bitplane(FFVAContext *vactx, uint32_t size)
 {
 return alloc_buffer(vactx, VABitPlaneBufferType, size, 
&vactx->bitplane_buf_id);
 }
 
-VASliceParameterBufferBase *ff_vaapi_alloc_slice(struct vaapi_context *vactx, 
const uint8_t *buffer, uint32_t size)
+VASliceParameterBufferBase *ff_vaapi_alloc_slice(FFVAContext *vactx, const 
uint8_t *buffer, uint32_t size)
 {
 uint8_t *slice_params;
 VASliceParameterBufferBase *slice_param;
@@ -181,7 +203,7 @@ VASliceParameterBufferBase *ff

[FFmpeg-cvslog] vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).

2015-08-19 Thread Gwenole Beauchesne
ffmpeg | branch: master | Gwenole Beauchesne  | 
Tue Jul 28 10:16:59 2015 +0200| [9f8e57efe4400ca86352277873792792279c3b15] | 
committer: Gwenole Beauchesne

vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).

Deprecate older VA pixel formats (MOCO, IDCT) as it is now very unlikely
to ever be useful in the future. Only keep plain AV_PIX_FMT_VAAPI format
that is aliased to the older VLD variant.

This is an API change.

Signed-off-by: Gwenole Beauchesne 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f8e57efe4400ca86352277873792792279c3b15
---

 doc/APIchanges   |7 +++
 libavcodec/h263dec.c |2 +-
 libavcodec/h264_slice.c  |2 +-
 libavcodec/mpeg12dec.c   |2 +-
 libavcodec/vaapi_h264.c  |2 +-
 libavcodec/vaapi_mpeg2.c |2 +-
 libavcodec/vaapi_mpeg4.c |4 ++--
 libavcodec/vaapi_vc1.c   |4 ++--
 libavcodec/vc1dec.c  |2 +-
 libavutil/pixdesc.c  |9 +
 libavutil/pixfmt.h   |   12 
 libavutil/version.h  |5 -
 12 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index cce2ddb..1b68911 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,13 @@ libavutil: 2014-08-09
 
 API changes, most recent first:
 
+2015-xx-xx - lavu 54.31.100 - pixfmt.h
+  Add a unique pixel format for VA-API (AV_PIX_FMT_VAAPI) that
+  indicates the nature of the underlying storage: a VA surface. This
+  yields the same value as AV_PIX_FMT_VAAPI_VLD.
+  Deprecate old VA-API related pixel formats: AV_PIX_FMT_VAAPI_MOCO,
+  AV_PIX_FMT_VAAPI_IDCT, AV_PIX_FMT_VAAPI_VLD.
+
 2015-xx-xx - lavu 54.30.0
   xxx -  Add av_blowfish_alloc().
   xxx -  Add av_rc4_alloc().
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 8f28a94..c85ea9d 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -720,7 +720,7 @@ frame_end:
 
 const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = {
 #if CONFIG_H263_VAAPI_HWACCEL || CONFIG_MPEG4_VAAPI_HWACCEL
-AV_PIX_FMT_VAAPI_VLD,
+AV_PIX_FMT_VAAPI,
 #endif
 #if CONFIG_H263_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL
 AV_PIX_FMT_VDPAU,
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index e330489..5c116b0 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -946,7 +946,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, 
int force_callback)
 *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
 #endif
 #if CONFIG_H264_VAAPI_HWACCEL
-*fmt++ = AV_PIX_FMT_VAAPI_VLD;
+*fmt++ = AV_PIX_FMT_VAAPI;
 #endif
 #if CONFIG_H264_VDA_HWACCEL
 *fmt++ = AV_PIX_FMT_VDA_VLD;
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 4f60a1c..3e5ef0e 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1213,7 +1213,7 @@ static const enum AVPixelFormat 
mpeg2_hwaccel_pixfmt_list_420[] = {
 AV_PIX_FMT_D3D11VA_VLD,
 #endif
 #if CONFIG_MPEG2_VAAPI_HWACCEL
-AV_PIX_FMT_VAAPI_VLD,
+AV_PIX_FMT_VAAPI,
 #endif
 #if CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL
 AV_PIX_FMT_VIDEOTOOLBOX,
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 151aca9..55ee2fc 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -359,7 +359,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = {
 .name   = "h264_vaapi",
 .type   = AVMEDIA_TYPE_VIDEO,
 .id = AV_CODEC_ID_H264,
-.pix_fmt= AV_PIX_FMT_VAAPI_VLD,
+.pix_fmt= AV_PIX_FMT_VAAPI,
 .start_frame= vaapi_h264_start_frame,
 .end_frame  = vaapi_h264_end_frame,
 .decode_slice   = vaapi_h264_decode_slice,
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 87fab89..27c69cd 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -138,7 +138,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = {
 .name   = "mpeg2_vaapi",
 .type   = AVMEDIA_TYPE_VIDEO,
 .id = AV_CODEC_ID_MPEG2VIDEO,
-.pix_fmt= AV_PIX_FMT_VAAPI_VLD,
+.pix_fmt= AV_PIX_FMT_VAAPI,
 .start_frame= vaapi_mpeg2_start_frame,
 .end_frame  = ff_vaapi_mpeg_end_frame,
 .decode_slice   = vaapi_mpeg2_decode_slice,
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 9b283f7..5b2e9d4 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -141,7 +141,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
 .name   = "mpeg4_vaapi",
 .type   = AVMEDIA_TYPE_VIDEO,
 .id = AV_CODEC_ID_MPEG4,
-.pix_fmt= AV_PIX_FMT_VAAPI_VLD,
+.pix_fmt= AV_PIX_FMT_VAAPI,
 .start_frame= vaapi_mpeg4_start_frame,
 .end_frame  = ff_vaapi_mpeg_end_frame,
 .decode_slice   = vaapi_mpeg4_decode_slice,
@@ -153,7 +153,7 @@ AVHWAccel ff_h263_vaapi_hwaccel = {
 .name   = "h263_vaapi",
 .type   = AVMEDIA_TYPE_VIDEO,
 .id = AV_CODEC_ID_H263,
-.pi

[FFmpeg-cvslog] vaapi: drop unused include.

2015-08-19 Thread Gwenole Beauchesne
ffmpeg | branch: master | Gwenole Beauchesne  | 
Wed Aug 19 14:15:43 2015 +0200| [9d1d7b367eeb74dbfb8501580e6c3568f3fe5973] | 
committer: Gwenole Beauchesne

vaapi: drop unused include.

Signed-off-by: Gwenole Beauchesne 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9d1d7b367eeb74dbfb8501580e6c3568f3fe5973
---

 libavcodec/vaapi.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c
index e716721..c081bb5 100644
--- a/libavcodec/vaapi.c
+++ b/libavcodec/vaapi.c
@@ -22,7 +22,6 @@
  */
 
 #include "libavutil/log.h"
-#include "h264.h"
 #include "vaapi_internal.h"
 
 /**

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


[FFmpeg-cvslog] vaapi: fix usage of invalid buffer ids.

2015-08-19 Thread Gwenole Beauchesne
ffmpeg | branch: master | Gwenole Beauchesne  | 
Tue Jul 28 11:34:52 2015 +0200| [8813d55fa5978660d9f4e7dbe1f50da9922be08d] | 
committer: Gwenole Beauchesne

vaapi: fix usage of invalid buffer ids.

Invalid buffer ids are defined by VA_INVALID_ID. Use that through out
vaapi_*.c support files now that we have private data initialized and
managed by libavcodec. Previously, the only requirement for the public
vaapi_context struct was to be zero-initialized.

This fixes support for 3rdparty VA drivers that strictly conform to
the API whereby an invalid buffer id is VA_INVALID_ID and the first
valid buffer id can actually be zero.

Signed-off-by: Gwenole Beauchesne 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8813d55fa5978660d9f4e7dbe1f50da9922be08d
---

 libavcodec/vaapi.c |   21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/libavcodec/vaapi.c b/libavcodec/vaapi.c
index 5dc43e1..e716721 100644
--- a/libavcodec/vaapi.c
+++ b/libavcodec/vaapi.c
@@ -35,9 +35,9 @@ static void destroy_buffers(VADisplay display, VABufferID 
*buffers, unsigned int
 {
 unsigned int i;
 for (i = 0; i < n_buffers; i++) {
-if (buffers[i]) {
+if (buffers[i] != VA_INVALID_ID) {
 vaDestroyBuffer(display, buffers[i]);
-buffers[i] = 0;
+buffers[i] = VA_INVALID_ID;
 }
 }
 }
@@ -55,6 +55,11 @@ int ff_vaapi_context_init(AVCodecContext *avctx)
 vactx->display  = user_vactx->display;
 vactx->config_id= user_vactx->config_id;
 vactx->context_id   = user_vactx->context_id;
+
+vactx->pic_param_buf_id = VA_INVALID_ID;
+vactx->iq_matrix_buf_id = VA_INVALID_ID;
+vactx->bitplane_buf_id  = VA_INVALID_ID;
+
 return 0;
 }
 
@@ -68,18 +73,18 @@ int ff_vaapi_render_picture(FFVAContext *vactx, VASurfaceID 
surface)
 VABufferID va_buffers[3];
 unsigned int n_va_buffers = 0;
 
-if (!vactx->pic_param_buf_id)
+if (vactx->pic_param_buf_id == VA_INVALID_ID)
 return 0;
 
 vaUnmapBuffer(vactx->display, vactx->pic_param_buf_id);
 va_buffers[n_va_buffers++] = vactx->pic_param_buf_id;
 
-if (vactx->iq_matrix_buf_id) {
+if (vactx->iq_matrix_buf_id != VA_INVALID_ID) {
 vaUnmapBuffer(vactx->display, vactx->iq_matrix_buf_id);
 va_buffers[n_va_buffers++] = vactx->iq_matrix_buf_id;
 }
 
-if (vactx->bitplane_buf_id) {
+if (vactx->bitplane_buf_id != VA_INVALID_ID) {
 vaUnmapBuffer(vactx->display, vactx->bitplane_buf_id);
 va_buffers[n_va_buffers++] = vactx->bitplane_buf_id;
 }
@@ -119,7 +124,7 @@ int ff_vaapi_commit_slices(FFVAContext *vactx)
 return -1;
 vactx->slice_buf_ids = slice_buf_ids;
 
-slice_param_buf_id = 0;
+slice_param_buf_id = VA_INVALID_ID;
 if (vaCreateBuffer(vactx->display, vactx->context_id,
VASliceParameterBufferType,
vactx->slice_param_size,
@@ -128,7 +133,7 @@ int ff_vaapi_commit_slices(FFVAContext *vactx)
 return -1;
 vactx->slice_count = 0;
 
-slice_data_buf_id = 0;
+slice_data_buf_id = VA_INVALID_ID;
 if (vaCreateBuffer(vactx->display, vactx->context_id,
VASliceDataBufferType,
vactx->slice_data_size,
@@ -147,7 +152,7 @@ static void *alloc_buffer(FFVAContext *vactx, int type, 
unsigned int size, uint3
 {
 void *data = NULL;
 
-*buf_id = 0;
+*buf_id = VA_INVALID_ID;
 if (vaCreateBuffer(vactx->display, vactx->context_id,
type, size, 1, NULL, buf_id) == VA_STATUS_SUCCESS)
 vaMapBuffer(vactx->display, *buf_id, &data);

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


[FFmpeg-cvslog] libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored

2015-08-19 Thread Ivan Uskov
ffmpeg | branch: master | Ivan Uskov  | Thu Aug  6 
09:14:59 2015 -0400| [fffae8e605c8a665eac0ae63c3c84f60efbec73e] | committer: 
Michael Niedermayer

libavcodec/qsvdec.c: the ff_get_format() missed at refactoring has been restored

Reviewed-by: Hendrik Leppkes 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fffae8e605c8a665eac0ae63c3c84f60efbec73e
---

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

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index e3c076d..1062ef0 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -54,6 +54,9 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, 
AVPacket *avpkt)
 mfxVideoParam param = { { 0 } };
 mfxBitstream bs   = { { { 0 } } };
 int ret;
+enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_QSV,
+   AV_PIX_FMT_NV12,
+   AV_PIX_FMT_NONE };
 
 q->iopattern  = MFX_IOPATTERN_OUT_SYSTEM_MEMORY;
 if (!q->session) {
@@ -120,7 +123,11 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext 
*q, AVPacket *avpkt)
 return ff_qsv_error(ret);
 }
 
-avctx->pix_fmt  = AV_PIX_FMT_NV12;
+ret = ff_get_format(avctx, pix_fmts);
+if (ret < 0)
+return ret;
+
+avctx->pix_fmt  = ret;
 avctx->profile  = param.mfx.CodecProfile;
 avctx->level= param.mfx.CodecLevel;
 avctx->coded_width  = param.mfx.FrameInfo.Width;

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


[FFmpeg-cvslog] swscale: refactor vertical scaler

2015-08-19 Thread Pedro Arthur
ffmpeg | branch: master | Pedro Arthur  | Tue Aug 18 
11:47:55 2015 -0300| [62d176de1224f6b9921a53171e5daa7460d5a772] | committer: 
Pedro Arthur

swscale: refactor vertical scaler

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62d176de1224f6b9921a53171e5daa7460d5a772
---

 libswscale/Makefile   |1 +
 libswscale/slice.c|   20 ++-
 libswscale/swscale.c  |   88 -
 libswscale/swscale_internal.h |   20 ++-
 libswscale/vscale.c   |  287 +
 libswscale/x86/swscale.c  |6 +-
 6 files changed, 380 insertions(+), 42 deletions(-)

diff --git a/libswscale/Makefile b/libswscale/Makefile
index b2b6381..e70e358 100644
--- a/libswscale/Makefile
+++ b/libswscale/Makefile
@@ -17,6 +17,7 @@ OBJS = alphablend.o \
yuv2rgb.o\
slice.o  \
hscale.o \
+   vscale.o \
 
 OBJS-$(CONFIG_SHARED)+= log2_tab.o
 
diff --git a/libswscale/slice.c b/libswscale/slice.c
index 611e4e6..8fd16d3 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -214,6 +214,7 @@ int ff_init_filters(SwsContext * c)
 int index;
 int num_ydesc;
 int num_cdesc;
+int num_vdesc = isPlanarYUV(c->dstFormat) && !isGray(c->dstFormat) ? 2 : 1;
 int need_lum_conv = c->lumToYV12 || c->readLumPlanar || c->alpToYV12 || 
c->readAlpPlanar;
 int need_chr_conv = c->chrToYV12 || c->readChrPlanar;
 int srcIdx, dstIdx;
@@ -228,8 +229,8 @@ int ff_init_filters(SwsContext * c)
 num_ydesc = need_lum_conv ? 2 : 1;
 num_cdesc = need_chr_conv ? 2 : 1;
 
-c->numSlice = FFMAX(num_ydesc, num_cdesc) + 1;
-c->numDesc = num_ydesc + num_cdesc;
+c->numSlice = FFMAX(num_ydesc, num_cdesc) + 2;
+c->numDesc = num_ydesc + num_cdesc + num_vdesc;
 c->descIndex[0] = num_ydesc;
 c->descIndex[1] = num_ydesc + num_cdesc;
 
@@ -243,12 +244,13 @@ int ff_init_filters(SwsContext * c)
 
 res = alloc_slice(&c->slice[0], c->srcFormat, c->srcH, c->chrSrcH, 
c->chrSrcHSubSample, c->chrSrcVSubSample, 0);
 if (res < 0) goto cleanup;
-for (i = 1; i < c->numSlice-1; ++i) {
+for (i = 1; i < c->numSlice-2; ++i) {
 res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize + 
MAX_LINES_AHEAD, c->vChrFilterSize + MAX_LINES_AHEAD, c->chrSrcHSubSample, 
c->chrSrcVSubSample, 0);
 if (res < 0) goto cleanup;
 res = alloc_lines(&c->slice[i], FFALIGN(c->srcW*2+78, 16), c->srcW);
 if (res < 0) goto cleanup;
 }
+// horizontal scaler output
 res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize + 
MAX_LINES_AHEAD, c->vChrFilterSize + MAX_LINES_AHEAD, c->chrDstHSubSample, 
c->chrDstVSubSample, 1);
 if (res < 0) goto cleanup;
 res = alloc_lines(&c->slice[i], dst_stride, c->dstW);
@@ -256,6 +258,11 @@ int ff_init_filters(SwsContext * c)
 
 fill_ones(&c->slice[i], dst_stride>>1, c->dstBpc == 16);
 
+// vertical scaler output
+++i;
+res = alloc_slice(&c->slice[i], c->dstFormat, c->dstH, c->chrDstH, 
c->chrDstHSubSample, c->chrDstVSubSample, 0);
+if (res < 0) goto cleanup;
+
 index = 0;
 srcIdx = 0;
 dstIdx = 1;
@@ -290,6 +297,13 @@ int ff_init_filters(SwsContext * c)
 ff_init_desc_no_chr(&c->desc[index], &c->slice[srcIdx], 
&c->slice[dstIdx]);
 }
 
+++index;
+{
+srcIdx = c->numSlice - 2;
+dstIdx = c->numSlice - 1;
+ff_init_vscale(c, c->desc + index, c->slice + srcIdx, c->slice + 
dstIdx);
+}
+
 return 0;
 
 cleanup:
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 03019d4..d87efda 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -326,8 +326,8 @@ static int swscale(SwsContext *c, const uint8_t *src[],
 #endif
 const int dstW   = c->dstW;
 const int dstH   = c->dstH;
-const int chrDstW= c->chrDstW;
 #ifndef NEW_FILTER
+const int chrDstW= c->chrDstW;
 const int chrSrcW= c->chrSrcW;
 const int lumXInc= c->lumXInc;
 const int chrXInc= c->chrXInc;
@@ -341,9 +341,9 @@ static int swscale(SwsContext *c, const uint8_t *src[],
 int32_t *hChrFilterPos   = c->hChrFilterPos;
 int16_t *hLumFilter  = c->hLumFilter;
 int16_t *hChrFilter  = c->hChrFilter;
-#endif
 int32_t *lumMmxFilter= c->lumMmxFilter;
 int32_t *chrMmxFilter= c->chrMmxFilter;
+#endif
 const int vLumFilterSize = c->vLumFilterSize;
 const int vChrFilterSize = c->vChrFilterSize;
 #ifndef NEW_FILTER
@@ -381,13 +381,18 @@ static int swscale(SwsContext *c, const uint8_t *src[],
 int lastInChrBuf = c->lastInChrBuf;
 //int perform_gamma = c->is_internal_ga

[FFmpeg-cvslog] fate: rename -error option to -error_rate.

2015-08-19 Thread Ronald S. Bultje
ffmpeg | branch: master | Ronald S. Bultje  | Mon Aug 17 
16:57:37 2015 -0400| [99b9f0136c6e2d80c5ce2fc3c4125605035e11cb] | committer: 
Ronald S. Bultje

fate: rename -error option to -error_rate.

This fixes fate when FF_API_ERROR_RATE=0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99b9f0136c6e2d80c5ce2fc3c4125605035e11cb
---

 tests/fate/vcodec.mak |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index 11eb4f7..d4d0df5 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -211,7 +211,7 @@ fate-vsynth%-mpeg4-adv:  ENCOPTS = -qscale 9 -flags 
+mv4+aic   \
 
 fate-vsynth%-mpeg4-error:ENCOPTS = -qscale 7 -flags +mv4+aic\
-data_partitioning 1 -mbd rd \
-   -ps 250 -error 10
+   -ps 250 -error_rate 10
 
 fate-vsynth%-mpeg4-nr:   ENCOPTS = -qscale 8 -flags +mv4 -mbd rd -nr 
200
 

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


[FFmpeg-cvslog] checkasm: x86: properly save rdx/edx in checked_call()

2015-08-19 Thread Henrik Gramner
ffmpeg | branch: master | Henrik Gramner  | Sun Aug 16 
17:09:40 2015 +0200| [e6b8797b827ce3c5eb0608725db7e7e85d78864b] | committer: 
Henrik Gramner

checkasm: x86: properly save rdx/edx in checked_call()

If the return value doesn't fit in a single register rdx/edx can in some
cases be used in addition to rax/eax.

Doesn't affect any of the existing checkasm tests but might be useful later.

Also comment the relevant code a bit better.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6b8797b827ce3c5eb0608725db7e7e85d78864b
---

 tests/checkasm/x86/checkasm.asm |7 +++
 1 file changed, 7 insertions(+)

diff --git a/tests/checkasm/x86/checkasm.asm b/tests/checkasm/x86/checkasm.asm
index 377fd37..da19aa2 100644
--- a/tests/checkasm/x86/checkasm.asm
+++ b/tests/checkasm/x86/checkasm.asm
@@ -145,10 +145,15 @@ cglobal checked_call, 2,15,16,max_args*8+8
 or  r14, r5
 %endif
 
+; Call fail_func() with a descriptive message to mark it as a failure
+; if the called function didn't preserve all callee-saved registers.
+; Save the return value located in rdx:rax first to prevent clobbering.
 jz .ok
 mov  r9, rax
+mov r10, rdx
 lea  r0, [error_message]
 call fail_func
+mov rdx, r10
 mov rax, r9
 .ok:
 RET
@@ -182,9 +187,11 @@ cglobal checked_call, 1,7
 or   r3, r5
 jz .ok
 mov  r3, eax
+mov  r4, edx
 lea  r0, [error_message]
 mov [esp], r0
 call fail_func
+mov  edx, r4
 mov  eax, r3
 .ok:
 add  esp, max_args*4

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


[FFmpeg-cvslog] checkasm: Explicitly declare function prototypes

2015-08-19 Thread Henrik Gramner
ffmpeg | branch: master | Henrik Gramner  | Sun Aug 16 
13:00:21 2015 +0200| [18b101ff595c7f18e9571d26f8840f556b24ec03] | committer: 
Henrik Gramner

checkasm: Explicitly declare function prototypes

Now we no longer have to rely on function pointers intentionally
declared without specified argument types.

This makes it easier to support functions with floating point parameters
or return values as well as functions returning 64-bit values on 32-bit
architectures. It also avoids having to explicitly cast strides to
ptrdiff_t for example.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18b101ff595c7f18e9571d26f8840f556b24ec03
---

 tests/checkasm/Makefile |3 +--
 tests/checkasm/bswapdsp.c   |2 ++
 tests/checkasm/checkasm.c   |6 +++---
 tests/checkasm/checkasm.h   |   38 ++
 tests/checkasm/h264pred.c   |   32 
 tests/checkasm/h264qpel.c   |7 ---
 tests/checkasm/x86/checkasm.asm |4 ++--
 7 files changed, 54 insertions(+), 38 deletions(-)

diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile
index 909f2f0..8be6eec 100644
--- a/tests/checkasm/Makefile
+++ b/tests/checkasm/Makefile
@@ -17,8 +17,7 @@ CHECKASMDIRS := $(sort $(dir $(CHECKASMOBJS)))
 $(CHECKASMOBJS): | $(CHECKASMDIRS)
 OBJDIRS += $(CHECKASMDIRS)
 
-# We rely on function pointers intentionally declared without specified 
argument types.
-tests/checkasm/%.o: CFLAGS := 
$(CFLAGS:-Wstrict-prototypes=-Wno-strict-prototypes) -Umain
+tests/checkasm/checkasm.o: CFLAGS += -Umain
 
 CHECKASM := tests/checkasm/checkasm$(EXESUF)
 
diff --git a/tests/checkasm/bswapdsp.c b/tests/checkasm/bswapdsp.c
index b93c5bd..5f75550 100644
--- a/tests/checkasm/bswapdsp.c
+++ b/tests/checkasm/bswapdsp.c
@@ -43,6 +43,8 @@
 #define check_bswap(type)  
\
 do {   
\
 int w; 
\
+declare_func(void, type *dst, const type *src, int w); 
\
+   
\
 for (w = 0; w < BUF_SIZE / sizeof(type); w++) {
\
 int offset = (BUF_SIZE / sizeof(type) - w) & 15; /* Test various 
alignments */ \
 randomize_buffers();   
\
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index 4eb14dd..7ec8d67 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -111,7 +111,7 @@ static const struct {
 
 typedef struct CheckasmFuncVersion {
 struct CheckasmFuncVersion *next;
-intptr_t (*func)();
+void *func;
 int ok;
 int cpu;
 int iterations;
@@ -387,10 +387,10 @@ int main(int argc, char *argv[])
 /* Decide whether or not the specified function needs to be tested and
  * allocate/initialize data structures if needed. Returns a pointer to a
  * reference function if the function should be tested, otherwise NULL */
-intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))()
+void *checkasm_check_func(void *func, const char *name, ...)
 {
 char name_buf[256];
-intptr_t (*ref)() = func;
+void *ref = func;
 CheckasmFuncVersion *v;
 int name_length;
 va_list arg;
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index fdec55e..8028224 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -33,7 +33,7 @@ void checkasm_check_bswapdsp(void);
 void checkasm_check_h264pred(void);
 void checkasm_check_h264qpel(void);
 
-intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))() 
av_printf_format(2, 3);
+void *checkasm_check_func(void *func, const char *name, ...) 
av_printf_format(2, 3);
 int checkasm_bench_func(void);
 void checkasm_fail_func(const char *msg, ...) av_printf_format(1, 2);
 void checkasm_update_bench(int iterations, uint64_t cycles);
@@ -42,14 +42,16 @@ void checkasm_report(const char *name, ...) 
av_printf_format(1, 2);
 extern AVLFG checkasm_lfg;
 #define rnd() av_lfg_get(&checkasm_lfg)
 
-static av_unused intptr_t (*func_ref)();
-static av_unused intptr_t (*func_new)();
+static av_unused void *func_ref, *func_new;
 
 #define BENCH_RUNS 1000 /* Trade-off between accuracy and speed */
 
 /* Decide whether or not the specified function needs to be tested */
-#define check_func(func, ...) ((func_new = (intptr_t (*)())func) &&\
-  (func_ref = checkasm_check_func(func_new, 
__VA_ARGS__)))
+#define check_func(func, ...) (func_ref = checkasm_check_func((func_new = 
func), __VA_ARGS__))
+
+/* Declare the function prototype. The first argument is the return value, the 
remaining
+ * arguments are the function parameters. Naming 

[FFmpeg-cvslog] avfilter: add showfreqs filter

2015-08-19 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Tue Aug  4 14:41:35 
2015 +0200| [2fa019958b4f8d1412f0e021c0c0aa0645ec6c7a] | committer: Paul B Mahol

avfilter: add showfreqs filter

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2fa019958b4f8d1412f0e021c0c0aa0645ec6c7a
---

 Changelog   |1 +
 configure   |2 +
 doc/filters.texi|  115 +
 libavfilter/Makefile|1 +
 libavfilter/allfilters.c|1 +
 libavfilter/avf_showfreqs.c |  558 +++
 libavfilter/version.h   |2 +-
 libavutil/audio_fifo.c  |   19 ++
 libavutil/audio_fifo.h  |   16 ++
 libavutil/fifo.c|   26 ++
 libavutil/fifo.h|   10 +
 11 files changed, 750 insertions(+), 1 deletion(-)

diff --git a/Changelog b/Changelog
index 0e87c09..099f0a2 100644
--- a/Changelog
+++ b/Changelog
@@ -31,6 +31,7 @@ version :
 - atadenoise video filter
 - OS X VideoToolbox support
 - aphasemeter filter
+- showfreqs filter
 
 
 version 2.7:
diff --git a/configure b/configure
index bc2160d..8d104e7 100755
--- a/configure
+++ b/configure
@@ -2785,6 +2785,8 @@ select_filter_select="pixelutils"
 smartblur_filter_deps="gpl swscale"
 showcqt_filter_deps="avcodec"
 showcqt_filter_select="fft"
+showfreqs_filter_deps="avcodec"
+showfreqs_filter_select="fft"
 showspectrum_filter_deps="avcodec"
 showspectrum_filter_select="rdft"
 spp_filter_deps="gpl avcodec"
diff --git a/doc/filters.texi b/doc/filters.texi
index e94ec40..360ff6a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -12704,6 +12704,121 @@ gamma=2:gamma2=2
 
 @end itemize
 
+@section showfreqs
+
+Convert input audio to video output representing the audio power spectrum.
+Audio amplitude is on Y-axis while frequency is on X-axis.
+
+The filter accepts the following options:
+
+@table @option
+@item size, s
+Specify size of video. For the syntax of this option, check the
+@ref{video size syntax,,"Video size" section in the ffmpeg-utils 
manual,ffmpeg-utils}.
+Default is @code{1024x512}.
+
+@item mode
+Set display mode.
+This set how each frequency bin will be represented.
+
+It accepts the following values:
+@table @samp
+@item line
+@item bar
+@item dot
+@end table
+Default is @code{bar}.
+
+@item ascale
+Set amplitude scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+Linear scale.
+
+@item sqrt
+Square root scale.
+
+@item cbrt
+Cubic root scale.
+
+@item log
+Logarithmic scale.
+@end table
+Default is @code{log}.
+
+@item fscale
+Set frequency scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+Linear scale.
+
+@item log
+Logarithmic scale.
+
+@item rlog
+Reverse logarithmic scale.
+@end table
+Default is @code{lin}.
+
+@item win_size
+Set window size.
+
+It accepts the following values:
+@table @samp
+@item w16
+@item w32
+@item w64
+@item w128
+@item w256
+@item w512
+@item w1024
+@item w2048
+@item w4096
+@item w8192
+@item w16384
+@item w32768
+@item w65536
+@end table
+Default is @code{w2048}
+
+@item win_func
+Set windowing function.
+
+It accepts the following values:
+@table @samp
+@item rect
+@item bartlett
+@item hanning
+@item hamming
+@item blackman
+@item welch
+@item flattop
+@item bharris
+@item bnuttall
+@item bhann
+@item sine
+@item nuttall
+@end table
+Default is @code{hanning}.
+
+@item overlap
+Set window overlap. In range @code{[0, 1]}. Default is @code{1},
+which means optimal overlap for selected window function will be picked.
+
+@item averaging
+Set time averaging. Setting this to 0 will display current maximal peaks.
+Default is @code{1}, which means time averaging is disabled.
+
+@item color
+Specify list of colors separated by space or by '|' which will be used to
+draw channel frequencies. Unrecognized or missing colors will be replaced
+by white color.
+@end table
+
 @section showspectrum
 
 Convert input audio to a video output, representing the audio frequency
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 75581f2..d2e944f 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -258,6 +258,7 @@ OBJS-$(CONFIG_APHASEMETER_FILTER)+= 
avf_aphasemeter.o
 OBJS-$(CONFIG_AVECTORSCOPE_FILTER)   += avf_avectorscope.o
 OBJS-$(CONFIG_CONCAT_FILTER) += avf_concat.o
 OBJS-$(CONFIG_SHOWCQT_FILTER)+= avf_showcqt.o
+OBJS-$(CONFIG_SHOWFREQS_FILTER)  += avf_showfreqs.o
 OBJS-$(CONFIG_SHOWSPECTRUM_FILTER)   += avf_showspectrum.o
 OBJS-$(CONFIG_SHOWVOLUME_FILTER) += avf_showvolume.o
 OBJS-$(CONFIG_SHOWWAVES_FILTER)  += avf_showwaves.o
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index ce51382..23d0510 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -273,6 +273,7 @@ void avfilter_register_all(void)
 REGISTER_FILTER(AVECTORSCOPE,   avectorscope,   avf);
 REGISTER_FILTER(CONCAT, concat, avf);
 REGISTER_FILTER(SHOWCQT,  

[FFmpeg-cvslog] doc/indevs: add various missing options

2015-08-19 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Tue Aug 18 17:43:33 2015 
-0800| [4918726d4123a18a6463225cb3dcb9218247dd4e] | committer: Lou Logan

doc/indevs: add various missing options

Signed-off-by: Lou Logan 
Reviewed-by: Ganesh Ajjanagadde 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4918726d4123a18a6463225cb3dcb9218247dd4e
---

 doc/indevs.texi |  165 ++-
 1 file changed, 162 insertions(+), 3 deletions(-)

diff --git a/doc/indevs.texi b/doc/indevs.texi
index 6f47504..30ba36e 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -51,6 +51,18 @@ ffmpeg -f alsa -i hw:0 alsaout.wav
 For more information see:
 @url{http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html}
 
+@subsection Options
+
+@table @option
+
+@item sample_rate
+Set the sample rate in Hz. Default is 48000.
+
+@item channels
+Set the number of channels. Default is 2.
+
+@end table
+
 @section avfoundation
 
 AVFoundation input device.
@@ -114,6 +126,19 @@ und the first one in this list is used instead. Available 
pixel formats are:
  bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, 
yuv444p10,
  yuv420p, nv12, yuyv422, gray}
 
+@item -framerate
+Set the grabbing frame rate. Default is @code{ntsc}, corresponding to a
+frame rate of @code{3/1001}.
+
+@item -video_size
+Set the video frame size.
+
+@item -capture_cursor
+Capture the mouse pointer. Default is 0.
+
+@item -capture_mouse_clicks
+Capture the screen mouse clicks. Default is 0.
+
 @end table
 
 @subsection Examples
@@ -150,6 +175,36 @@ $ ffmpeg -f avfoundation -pixel_format bgr0 -i 
"default:none" out.avi
 
 BSD video input device.
 
+@subsection Options
+
+@table @option
+
+@item framerate
+Set the frame rate.
+
+@item video_size
+Set the video frame size. Default is @code{vga}.
+
+@item standard
+
+Available values are:
+@table @samp
+@item pal
+
+@item ntsc
+
+@item secam
+
+@item paln
+
+@item palm
+
+@item ntscj
+
+@end table
+
+@end table
+
 @section decklink
 
 The decklink input device provides capture capabilities for Blackmagic
@@ -275,11 +330,11 @@ If set to @option{true}, print a list of selected 
device's options
 and exit.
 
 @item video_device_number
-Set video device number for devices with same name (starts at 0,
+Set video device number for devices with the same name (starts at 0,
 defaults to 0).
 
 @item audio_device_number
-Set audio device number for devices with same name (starts at 0,
+Set audio device number for devices with the same name (starts at 0,
 defaults to 0).
 
 @item pixel_format
@@ -429,6 +484,27 @@ $ ffmpeg -f dshow -show_video_device_dialog true 
-crossbar_video_input_pin_numbe
 
 Linux DV 1394 input device.
 
+@subsection Options
+
+@table @option
+
+@item framerate
+Set the frame rate. Default is 25.
+
+@item standard
+
+Available values are:
+@table @samp
+@item pal
+
+@item ntsc
+
+@end table
+
+Default value is @code{ntsc}.
+
+@end table
+
 @section fbdev
 
 Linux framebuffer input device.
@@ -441,6 +517,8 @@ console. It is accessed through a file device node, usually
 For more detailed information read the file
 Documentation/fb/framebuffer.txt included in the Linux source tree.
 
+See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
+
 To record from the framebuffer device @file{/dev/fb0} with
 @command{ffmpeg}:
 @example
@@ -452,7 +530,14 @@ You can take a single screenshot image with the command:
 ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
 @end example
 
-See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
+@subsection Options
+
+@table @option
+
+@item framerate
+Set the frame rate. Default is 25.
+
+@end table
 
 @section gdigrab
 
@@ -638,6 +723,15 @@ $ jack_connect metro:120_bpm ffmpeg:input_1
 For more information read:
 @url{http://jackaudio.org/}
 
+@subsection Options
+
+@table @option
+
+@item channels
+Set the number of channels. Default is 2.
+
+@end table
+
 @section lavfi
 
 Libavfilter input virtual device.
@@ -678,6 +772,9 @@ Set the filename of the filtergraph to be read and sent to 
the other
 filters. Syntax of the filtergraph is the same as the one specified by
 the option @var{graph}.
 
+@item dumpgraph
+Dump graph to stderr.
+
 @end table
 
 @subsection Examples
@@ -879,6 +976,19 @@ ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
 For more information about OSS see:
 @url{http://manuals.opensound.com/usersguide/dsp.html}
 
+@subsection Options
+
+@table @option
+
+@item sample_rate
+Set the sample rate in Hz. Default is 48000.
+
+@item channels
+Set the number of channels. Default is 2.
+
+@end table
+
+
 @section pulse
 
 PulseAudio input device.
@@ -919,6 +1029,10 @@ Specify the number of bytes per frame, by default it is 
set to 1024.
 @item fragment_size
 Specify the minimal buffering fragment in PulseAudio, it will affect the
 audio latency. By default it is unset.
+
+@item wallclock
+Set the initial PTS using the current time. Default is 1.
+
 @end table
 
 @subsection Exa

[FFmpeg-cvslog] MAINTAINERS: add myself as a docs maintainer

2015-08-19 Thread Lou Logan
ffmpeg | branch: master | Lou Logan  | Wed Aug 19 10:47:38 2015 
-0800| [2edb7ab1cba6eefe6c838fa90363cf3fb2369728] | committer: Lou Logan

MAINTAINERS: add myself as a docs maintainer

Signed-off-by: Lou Logan 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2edb7ab1cba6eefe6c838fa90363cf3fb2369728
---

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

diff --git a/MAINTAINERS b/MAINTAINERS
index e1eb556..b2aaf3c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -42,7 +42,7 @@ QuickTime faststart:
 Miscellaneous Areas
 ===
 
-documentation   Stefano Sabatini, Mike Melanson, 
Timothy Gu
+documentation   Stefano Sabatini, Mike Melanson, 
Timothy Gu, Lou Logan
 build system (configure, makefiles) Diego Biurrun, Mans Rullgard
 project server  Árpád Gereöffy, Michael Niedermayer, 
Reimar Doeffinger, Alexander Strasser, Lou Logan
 presets Robert Swain

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


[FFmpeg-cvslog] */version.h: Add note/recommandition about bumping major

2015-08-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Tue 
Aug 18 12:28:17 2015 +0200| [0b7829901bc93af8407bfb832049d3d97c881c62] | 
committer: Michael Niedermayer

*/version.h: Add note/recommandition about bumping major

Reviewed-by: Andreas Cadhalpun 
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b7829901bc93af8407bfb832049d3d97c881c62
---

 libavcodec/version.h  |4 
 libavformat/version.h |5 +
 libavutil/version.h   |4 
 3 files changed, 13 insertions(+)

diff --git a/libavcodec/version.h b/libavcodec/version.h
index a118d5b..c38918e 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -46,6 +46,10 @@
  * FF_API_* defines may be placed below to indicate public API that will be
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
+ *
+ * @note, when bumping the major version it is recommandeded to manually
+ * disable each FF_API_* in its own commit instead of disabling them all
+ * at once through the bump. This improves the git bissect-ability of the 
change.
  */
 
 #ifndef FF_API_VIMA_DECODER
diff --git a/libavformat/version.h b/libavformat/version.h
index 3ddba0c..e2b4b95 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -47,6 +47,11 @@
  * FF_API_* defines may be placed below to indicate public API that will be
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
+ *
+ * @note, when bumping the major version it is recommandeded to manually
+ * disable each FF_API_* in its own commit instead of disabling them all
+ * at once through the bump. This improves the git bissect-ability of the 
change.
+ *
  */
 #ifndef FF_API_LAVF_BITEXACT
 #define FF_API_LAVF_BITEXACT(LIBAVFORMAT_VERSION_MAJOR < 57)
diff --git a/libavutil/version.h b/libavutil/version.h
index 5dc3181..ccc85be 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -77,6 +77,10 @@
  * dropped at a future version bump. The defines themselves are not part of
  * the public API and may change, break or disappear at any time.
  *
+ * @note, when bumping the major version it is recommandeded to manually
+ * disable each FF_API_* in its own commit instead of disabling them all
+ * at once through the bump. This improves the git bissect-ability of the 
change.
+ *
  * @{
  */
 

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


[FFmpeg-cvslog] configure: Check for CoreServices/ CoreServices.h and make vda+viedotoolbox depend on it

2015-08-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Wed 
Aug 19 22:39:46 2015 +0200| [034e6fbd9cdbd4eddbe8dbea287a46880c6c6042] | 
committer: Michael Niedermayer

configure: Check for CoreServices/CoreServices.h and make vda+viedotoolbox 
depend on it

Fixes arm cross build on osx

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=034e6fbd9cdbd4eddbe8dbea287a46880c6c6042
---

 configure |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 8d104e7..e67ddf6 100755
--- a/configure
+++ b/configure
@@ -2381,10 +2381,10 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
 d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
 dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
 vaapi_deps="va_va_h"
-vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
+vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads 
CoreServices_CoreServices_h"
 vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration 
-framework QuartzCore -framework CoreServices"
 vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
-videotoolbox_deps="VideoToolbox_VideoToolbox_h pthreads"
+videotoolbox_deps="VideoToolbox_VideoToolbox_h pthreads 
CoreServices_CoreServices_h"
 videotoolbox_extralibs="-framework CoreFoundation -framework VideoToolbox 
-framework CoreMedia -framework QuartzCore -framework CoreServices"
 xvmc_deps="X11_extensions_XvMClib_h"
 
@@ -5102,6 +5102,7 @@ check_func_headers glob.h glob
 enabled xlib &&
 check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute 
-lXv -lX11 -lXext
 
+check_header CoreServices/CoreServices.h
 check_header direct.h
 check_header dlfcn.h
 check_header d3d11.h

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


[FFmpeg-cvslog] lavf/ftp: implement move and delete callbacks

2015-08-19 Thread Mariusz Szczepańczyk
ffmpeg | branch: master | Mariusz Szczepańczyk  | Wed 
Aug 19 23:52:14 2015 +0200| [bf5b2f9df8761083281ef0e93afc8fa8d1f9f60a] | 
committer: Michael Niedermayer

lavf/ftp: implement move and delete callbacks

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf5b2f9df8761083281ef0e93afc8fa8d1f9f60a
---

 libavformat/ftp.c |   61 +
 1 file changed, 61 insertions(+)

diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index db233c9..51f491c 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -1038,6 +1038,65 @@ static int ftp_close_dir(URLContext *h)
 return 0;
 }
 
+static int ftp_delete(URLContext *h)
+{
+FTPContext *s = h->priv_data;
+char command[MAX_URL_SIZE];
+static const int del_codes[] = {250, 421, 450, 500, 501, 502, 530, 550, 0};
+static const int rmd_codes[] = {250, 421, 500, 501, 502, 530, 550, 0};
+int ret;
+
+if ((ret = ftp_connect(h, h->filename)) < 0)
+goto cleanup;
+
+snprintf(command, sizeof(command), "DELE %s\r\n", s->path);
+if (ftp_send_command(s, command, del_codes, NULL) == 250) {
+ret = 0;
+goto cleanup;
+}
+
+snprintf(command, sizeof(command), "RMD %s\r\n", s->path);
+if (ftp_send_command(s, command, rmd_codes, NULL) == 250)
+ret = 0;
+else
+ret = AVERROR(EIO);
+
+cleanup:
+ftp_close(h);
+return ret;
+}
+
+static int ftp_move(URLContext *h_src, URLContext *h_dst)
+{
+FTPContext *s = h_src->priv_data;
+char command[MAX_URL_SIZE], path[MAX_URL_SIZE];
+static const int rnfr_codes[] = {350, 421, 450, 500, 501, 502, 503, 530, 
0};
+static const int rnto_codes[] = {250, 421, 500, 501, 502, 503, 530, 532, 
553, 0};
+int ret;
+
+if ((ret = ftp_connect(h_src, h_src->filename)) < 0)
+goto cleanup;
+
+snprintf(command, sizeof(command), "RNFR %s\r\n", s->path);
+if (ftp_send_command(s, command, rnfr_codes, NULL) != 350) {
+ret = AVERROR(EIO);
+goto cleanup;
+}
+
+av_url_split(0, 0, 0, 0, 0, 0, 0,
+ path, sizeof(path),
+ h_dst->filename);
+snprintf(command, sizeof(command), "RNTO %s\r\n", path);
+if (ftp_send_command(s, command, rnto_codes, NULL) == 250)
+ret = 0;
+else
+ret = AVERROR(EIO);
+
+cleanup:
+ftp_close(h_src);
+return ret;
+}
+
 URLProtocol ff_ftp_protocol = {
 .name= "ftp",
 .url_open= ftp_open,
@@ -1052,5 +,7 @@ URLProtocol ff_ftp_protocol = {
 .url_open_dir= ftp_open_dir,
 .url_read_dir= ftp_read_dir,
 .url_close_dir   = ftp_close_dir,
+.url_delete  = ftp_delete,
+.url_move= ftp_move,
 .flags   = URL_PROTOCOL_FLAG_NETWORK,
 };

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


[FFmpeg-cvslog] avformat/mux: Update sidedata in ff_write_chained()

2015-08-19 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Thu 
Aug 20 03:35:10 2015 +0200| [db91e0edb63afc682ae709f73e3732a4c832944d] | 
committer: Michael Niedermayer

avformat/mux: Update sidedata in ff_write_chained()

Fixes Ticket4777

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db91e0edb63afc682ae709f73e3732a4c832944d
---

 libavformat/mux.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mux.c b/libavformat/mux.c
index 909617f..84c6d24 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1043,6 +1043,8 @@ int ff_write_chained(AVFormatContext *dst, int 
dst_stream, AVPacket *pkt,
 if (interleave) ret = av_interleaved_write_frame(dst, &local_pkt);
 elseret = av_write_frame(dst, &local_pkt);
 pkt->buf = local_pkt.buf;
+pkt->side_data   = local_pkt.side_data;
+pkt->side_data_elems = local_pkt.side_data_elems;
 pkt->destruct = local_pkt.destruct;
 return ret;
 }

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