[FFmpeg-cvslog] libavcodec/cfhd: fixed wrong printf format

2016-05-22 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Sun May 22 06:33:44 
2016 +0530| [84417593b9daeba7e0668a0f64229d12f28a2411] | committer: Michael 
Niedermayer

libavcodec/cfhd: fixed wrong printf format

Signed-off-by: Michael Niedermayer 

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

 libavcodec/cfhd.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index d82eab8..d15cd8d 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -343,7 +343,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, 
int *got_frame,
 }
 av_log(avctx, AV_LOG_DEBUG, "Transform-type? %"PRIu16"\n", data);
 } else if (abstag >= 0x4000 && abstag <= 0x40ff) {
-av_log(avctx, AV_LOG_DEBUG, "Small chunk length %"PRIu16" %s\n", 
data * 4, tag < 0 ? "optional" : "required");
+av_log(avctx, AV_LOG_DEBUG, "Small chunk length %d %s\n", data * 
4, tag < 0 ? "optional" : "required");
 bytestream2_skipu(&gb, data * 4);
 } else if (tag == 23) {
 av_log(avctx, AV_LOG_DEBUG, "Skip frame\n");
@@ -469,7 +469,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, 
int *got_frame,
 goto end;
 }
 
-av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs component 
%"PRIu16" height:%d, width:%d\n", s->channel_num, lowpass_height, 
lowpass_width);
+av_log(avctx, AV_LOG_DEBUG, "Start of lowpass coeffs component %d 
height:%d, width:%d\n", s->channel_num, lowpass_height, lowpass_width);
 for (i = 0; i < lowpass_height; i++) {
 for (j = 0; j < lowpass_width; j++)
 coeff_data[j] = bytestream2_get_be16u(&gb);
@@ -487,7 +487,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, 
int *got_frame,
lowpass_width * sizeof(*coeff_data));
 }
 
-av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients %"PRIu16"\n", 
lowpass_width * lowpass_height);
+av_log(avctx, AV_LOG_DEBUG, "Lowpass coefficients %d\n", 
lowpass_width * lowpass_height);
 }
 
 if (tag == 55 && s->subband_num_actual != 255 && s->a_width && 
s->a_height) {

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


[FFmpeg-cvslog] libavfilter/af_hdcd: fixed negative signed value shift

2016-05-22 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Sun May 22 06:36:58 
2016 +0530| [5836a5037ecbbd9b10ac85cdec5ff8cccb1177d0] | committer: Michael 
Niedermayer

libavfilter/af_hdcd: fixed negative signed value shift

Signed-off-by: Michael Niedermayer 

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

 libavfilter/af_hdcd.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 041b89f..fbf0836 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -893,7 +893,7 @@ static int integrate(hdcd_state_t *state, int *flag, const 
int32_t *samples, int
 state->code_counterC++;
 } else {
 if (bits)
-state->readahead = readaheadtab[bits & ~(-1 << 8)];
+state->readahead = readaheadtab[bits & ~((unsigned) -1 << 8)];
 else
 state->readahead = 31; /* ffwd over digisilence */
 }

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


[FFmpeg-cvslog] libavutil/opencl: fixed uninitialized var warning

2016-05-23 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Sun May 22 06:47:27 
2016 +0530| [6b852a3fd94210779491d51441a3439831841a55] | committer: Michael 
Niedermayer

libavutil/opencl: fixed uninitialized var warning

Signed-off-by: Michael Niedermayer 

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

 libavutil/opencl.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 08b5034..af35770 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -445,7 +445,7 @@ cl_program av_opencl_compile(const char *program_name, 
const char *build_opts)
 int i;
 cl_int status, build_status;
 int kernel_code_idx = 0;
-const char *kernel_source;
+const char *kernel_source = NULL;
 size_t kernel_code_len;
 char* ptr = NULL;
 cl_program program = NULL;

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


[FFmpeg-cvslog] libavfilter/vf_hwdownload: show error when ff_formats_ref fails

2016-05-24 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Sun May 22 06:44:36 
2016 +0530| [04d35004c3d050c0bede909e4d1b30f0dc379cfa] | committer: Michael 
Niedermayer

libavfilter/vf_hwdownload: show error when ff_formats_ref fails

Signed-off-by: Michael Niedermayer 

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

 libavfilter/vf_hwdownload.c |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
index 2dcc9fa..79ea82d 100644
--- a/libavfilter/vf_hwdownload.c
+++ b/libavfilter/vf_hwdownload.c
@@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext *avctx)
 }
 }
 
-ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
-ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
+if ((err = ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats)) < 0 ||
+(err = ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats)) < 0)
+return err;
+
 return 0;
 }
 

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


[FFmpeg-cvslog] libavcodec/dv_tablegen: fixed wrong printf format

2016-05-24 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Sun May 22 06:34:56 
2016 +0530| [49640ae315abf2f38df368763fd753383a1381e4] | committer: Michael 
Niedermayer

libavcodec/dv_tablegen: fixed wrong printf format

Signed-off-by: Michael Niedermayer 

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

 libavcodec/dv_tablegen.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dv_tablegen.c b/libavcodec/dv_tablegen.c
index 2579341..d032101 100644
--- a/libavcodec/dv_tablegen.c
+++ b/libavcodec/dv_tablegen.c
@@ -27,7 +27,7 @@
 #include 
 
 WRITE_1D_FUNC_ARGV(dv_vlc_pair, 7,
-   "{0x%"PRIx32", %"PRId8"}", data[i].vlc, data[i].size)
+   "{0x%"PRIx32", %"PRIu32"}", data[i].vlc, data[i].size)
 WRITE_2D_FUNC(dv_vlc_pair)
 
 int main(void)

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


[FFmpeg-cvslog] vf_codecview: added new options

2016-06-15 Thread dsmudhar
ffmpeg | branch: master | dsmudhar  | Thu Jun  9 19:00:33 
2016 +0530| [7a2b9dd060b6f057758a1ac7820b66d6c1ad1e49] | committer: Michael 
Niedermayer

vf_codecview: added new options

Signed-off-by: Michael Niedermayer 

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

 doc/filters.texi   |   38 +++---
 libavfilter/vf_codecview.c |   55 
 2 files changed, 80 insertions(+), 13 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 2234734..605f670 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4790,16 +4790,48 @@ backward predicted MVs of B-frames
 @end table
 
 @item qp
-Display quantization parameters using the chroma planes
+Display quantization parameters using the chroma planes.
+
+@item mv_type, mvt
+Set motion vectors type to visualize. Includes MVs from all frames unless 
specified by @var{frame_type} option.
+
+Available flags for @var{mv_type} are:
+
+@table @samp
+@item fp
+forward predicted MVs
+@item bp
+backward predicted MVs
+@end table
+
+@item frame_type, ft
+Set frame type to visualize motion vectors of.
+
+Available flags for @var{frame_type} are:
+
+@table @samp
+@item if
+intra-coded frames (I-frames)
+@item pf
+predicted frames (P-frames)
+@item bf
+bi-directionally predicted frames (B-frames)
+@end table
 @end table
 
 @subsection Examples
 
 @itemize
 @item
-Visualizes multi-directionals MVs from P and B-Frames using @command{ffplay}:
+Visualize forward predicted MVs of all frames using @command{ffplay}:
+@example
+ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
+@end example
+
+@item
+Visualize multi-directionals MVs of P and B-Frames using @command{ffplay}:
 @example
-ffplay -flags2 +export_mvs input.mpg -vf codecview=mv=pf+bf+bb
+ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
 @end example
 @end itemize
 
diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
index e70b397..dc33973 100644
--- a/libavfilter/vf_codecview.c
+++ b/libavfilter/vf_codecview.c
@@ -38,22 +38,40 @@
 #define MV_P_FOR  (1<<0)
 #define MV_B_FOR  (1<<1)
 #define MV_B_BACK (1<<2)
+#define MV_TYPE_FOR  (1<<0)
+#define MV_TYPE_BACK (1<<1)
+#define FRAME_TYPE_I (1<<0)
+#define FRAME_TYPE_P (1<<1)
+#define FRAME_TYPE_B (1<<2)
 
 typedef struct {
 const AVClass *class;
 unsigned mv;
+unsigned frame_type;
+unsigned mv_type;
 int hsub, vsub;
 int qp;
 } CodecViewContext;
 
 #define OFFSET(x) offsetof(CodecViewContext, x)
 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
+#define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, 
{.i64=val}, 0, 0, FLAGS, unit }
+
 static const AVOption codecview_options[] = {
 { "mv", "set motion vectors to visualize", OFFSET(mv), AV_OPT_TYPE_FLAGS, 
{.i64=0}, 0, INT_MAX, FLAGS, "mv" },
-{"pf", "forward predicted MVs of P-frames",  0, AV_OPT_TYPE_CONST, 
{.i64 = MV_P_FOR },  INT_MIN, INT_MAX, FLAGS, "mv"},
-{"bf", "forward predicted MVs of B-frames",  0, AV_OPT_TYPE_CONST, 
{.i64 = MV_B_FOR },  INT_MIN, INT_MAX, FLAGS, "mv"},
-{"bb", "backward predicted MVs of B-frames", 0, AV_OPT_TYPE_CONST, 
{.i64 = MV_B_BACK }, INT_MIN, INT_MAX, FLAGS, "mv"},
+CONST("pf", "forward predicted MVs of P-frames",  MV_P_FOR,  "mv"),
+CONST("bf", "forward predicted MVs of B-frames",  MV_B_FOR,  "mv"),
+CONST("bb", "backward predicted MVs of B-frames", MV_B_BACK, "mv"),
 { "qp", NULL, OFFSET(qp), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, .flags = FLAGS 
},
+{ "mv_type", "set motion vectors type", OFFSET(mv_type), 
AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
+{ "mvt", "set motion vectors type", OFFSET(mv_type), 
AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
+CONST("fp", "forward predicted MVs",  MV_TYPE_FOR,  "mv_type"),
+CONST("bp", "backward predicted MVs", MV_TYPE_BACK, "mv_type"),
+{ "frame_type", "set frame types to visualize motion vectors of", 
OFFSET(frame_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, 
"frame_type" },
+{ "ft", "set frame types to visualize motion vectors of", 
OFFSET(frame_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, 
"frame_type" },
+CONST("if", "I-frames", FRAME_TYPE_I, "frame_type"),
+CONST("pf", "P-frames", FRAME_TYPE_P, "frame_type"),
+CONST(&quo