Re: [FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-09-05 Thread Michael Niedermayer
On Tue, Sep 05, 2017 at 11:11:00PM +0200, Marton Balint wrote:
> 
> On Tue, 5 Sep 2017, Michael Niedermayer wrote:
> 
> >Signed-off-by: Michael Niedermayer 
> >---
> >doc/filters.texi | 9 +
> >libavfilter/framesync2.c | 6 --
> >libavfilter/framesync2.h | 6 ++
> >libavfilter/vf_overlay.c | 8 
> >4 files changed, 23 insertions(+), 6 deletions(-)
> 
> No more comments from me, thanks.

will apply


> Do you plan to do a similar fix
> for blend/tblend as well?

I did run into the issue in overlay so thats the one i wanted
to fix primarely.
I can change the others too but only if the people maintaining them
want this. 

Thanks

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

The misfortune of the wise is better than the prosperity of the fool.
-- 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] avfilter/vf_overlay: Restore shorthand option order

2017-09-05 Thread Paul B Mahol
On 9/5/17, Marton Balint  wrote:
>
> On Tue, 5 Sep 2017, Michael Niedermayer wrote:
>
>> Signed-off-by: Michael Niedermayer 
>> ---
>> doc/filters.texi | 9 +
>> libavfilter/framesync2.c | 6 --
>> libavfilter/framesync2.h | 6 ++
>> libavfilter/vf_overlay.c | 8 
>> 4 files changed, 23 insertions(+), 6 deletions(-)
>
> No more comments from me, thanks. Do you plan to do a similar fix for
> blend/tblend as well?

Please NO leave blend from this mess. tblend does not use framesync.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-09-05 Thread Marton Balint


On Tue, 5 Sep 2017, Michael Niedermayer wrote:


Signed-off-by: Michael Niedermayer 
---
doc/filters.texi | 9 +
libavfilter/framesync2.c | 6 --
libavfilter/framesync2.h | 6 ++
libavfilter/vf_overlay.c | 8 
4 files changed, 23 insertions(+), 6 deletions(-)


No more comments from me, thanks. Do you plan to do a similar fix for 
blend/tblend as well?


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


[FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-09-05 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 doc/filters.texi | 9 +
 libavfilter/framesync2.c | 6 --
 libavfilter/framesync2.h | 6 ++
 libavfilter/vf_overlay.c | 8 
 4 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index afcb99d876..3641fe18de 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -10895,6 +10895,9 @@ on the main video. Default value is "0" for both 
expressions. In case
 the expression is invalid, it is set to a huge value (meaning that the
 overlay will not be displayed within the output visible area).
 
+@item eof_action
+See @ref{framesync}.
+
 @item eval
 Set when the expressions for @option{x}, and @option{y} are evaluated.
 
@@ -10910,6 +10913,9 @@ evaluate expressions for each incoming frame
 
 Default value is @samp{frame}.
 
+@item shortest
+See @ref{framesync}.
+
 @item format
 Set the format for the output video.
 
@@ -10935,6 +10941,9 @@ automatically pick format
 @end table
 
 Default value is @samp{yuv420}.
+
+@item repeatlast
+See @ref{framesync}.
 @end table
 
 The @option{x}, and @option{y} expressions can contain the following
diff --git a/libavfilter/framesync2.c b/libavfilter/framesync2.c
index fae06aa1f5..aea9937ce9 100644
--- a/libavfilter/framesync2.c
+++ b/libavfilter/framesync2.c
@@ -28,12 +28,6 @@
 #define OFFSET(member) offsetof(FFFrameSync, member)
 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 
-enum EOFAction {
-EOF_ACTION_REPEAT,
-EOF_ACTION_ENDALL,
-EOF_ACTION_PASS
-};
-
 static const char *framesync_name(void *ptr)
 {
 return "framesync";
diff --git a/libavfilter/framesync2.h b/libavfilter/framesync2.h
index 745e896bc8..63a0eabbeb 100644
--- a/libavfilter/framesync2.h
+++ b/libavfilter/framesync2.h
@@ -23,6 +23,12 @@
 
 #include "bufferqueue.h"
 
+enum EOFAction {
+EOF_ACTION_REPEAT,
+EOF_ACTION_ENDALL,
+EOF_ACTION_PASS
+};
+
 /*
  * TODO
  * Export convenient options.
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 4166e7c095..619a5a6354 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -817,9 +817,16 @@ static int activate(AVFilterContext *ctx)
 static const AVOption overlay_options[] = {
 { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = 
"0"}, CHAR_MIN, CHAR_MAX, FLAGS },
 { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = 
"0"}, CHAR_MIN, CHAR_MAX, FLAGS },
+{ "eof_action", "Action to take when encountering EOF from secondary input 
",
+OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 = EOF_ACTION_REPEAT 
},
+EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS, "eof_action" },
+{ "repeat", "Repeat the previous frame.",   0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
+{ "endall", "End both streams.",0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_ENDALL }, .flags = FLAGS, "eof_action" },
+{ "pass",   "Pass through the main input.", 0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_PASS },   .flags = FLAGS, "eof_action" },
 { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), 
AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_FRAME}, 0, EVAL_MODE_NB-1, FLAGS, "eval" },
  { "init",  "eval expressions once during initialization", 0, 
AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT},  .flags = FLAGS, .unit = "eval" },
  { "frame", "eval expressions per-frame",  0, 
AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
+{ "shortest", "force termination when the shortest input terminates", 
OFFSET(fs.opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
 { "format", "set output format", OFFSET(format), AV_OPT_TYPE_INT, 
{.i64=OVERLAY_FORMAT_YUV420}, 0, OVERLAY_FORMAT_NB-1, FLAGS, "format" },
 { "yuv420", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV420}, 
.flags = FLAGS, .unit = "format" },
 { "yuv422", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV422}, 
.flags = FLAGS, .unit = "format" },
@@ -827,6 +834,7 @@ static const AVOption overlay_options[] = {
 { "rgb","", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_RGB},
.flags = FLAGS, .unit = "format" },
 { "gbrp",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_GBRP},   
.flags = FLAGS, .unit = "format" },
 { "auto",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_AUTO},   
.flags = FLAGS, .unit = "format" },
+{ "repeatlast", "repeat overlay of the last overlay frame", 
OFFSET(fs.opt_repeatlast), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
 { NULL }
 };
 
-- 
2.14.1

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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-09-05 Thread Michael Niedermayer
On Wed, Aug 30, 2017 at 10:52:41AM +0200, Marton Balint wrote:
> 
> On Wed, 30 Aug 2017, Michael Niedermayer wrote:
> 
> >Signed-off-by: Michael Niedermayer 
> >---
> >libavfilter/framesync2.c | 6 --
> >libavfilter/framesync2.h | 6 ++
> >libavfilter/vf_overlay.c | 8 
> >3 files changed, 14 insertions(+), 6 deletions(-)
> 
> If this is really this simple then maybe I was wrong to afraid of
> it. The docs need restoring as well, the text for the options should
> reference the common framesync options section.

will send a new patch that updates the docs as well

thanks

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

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2



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


Re: [FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-08-30 Thread Marton Balint


On Wed, 30 Aug 2017, Michael Niedermayer wrote:


Signed-off-by: Michael Niedermayer 
---
libavfilter/framesync2.c | 6 --
libavfilter/framesync2.h | 6 ++
libavfilter/vf_overlay.c | 8 
3 files changed, 14 insertions(+), 6 deletions(-)


If this is really this simple then maybe I was wrong to afraid of it. The 
docs need restoring as well, the text for the options should reference the 
common framesync options section.


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


[FFmpeg-devel] [PATCH] avfilter/vf_overlay: Restore shorthand option order

2017-08-29 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavfilter/framesync2.c | 6 --
 libavfilter/framesync2.h | 6 ++
 libavfilter/vf_overlay.c | 8 
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/libavfilter/framesync2.c b/libavfilter/framesync2.c
index fae06aa1f5..aea9937ce9 100644
--- a/libavfilter/framesync2.c
+++ b/libavfilter/framesync2.c
@@ -28,12 +28,6 @@
 #define OFFSET(member) offsetof(FFFrameSync, member)
 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 
-enum EOFAction {
-EOF_ACTION_REPEAT,
-EOF_ACTION_ENDALL,
-EOF_ACTION_PASS
-};
-
 static const char *framesync_name(void *ptr)
 {
 return "framesync";
diff --git a/libavfilter/framesync2.h b/libavfilter/framesync2.h
index 745e896bc8..63a0eabbeb 100644
--- a/libavfilter/framesync2.h
+++ b/libavfilter/framesync2.h
@@ -23,6 +23,12 @@
 
 #include "bufferqueue.h"
 
+enum EOFAction {
+EOF_ACTION_REPEAT,
+EOF_ACTION_ENDALL,
+EOF_ACTION_PASS
+};
+
 /*
  * TODO
  * Export convenient options.
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 4166e7c095..619a5a6354 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -817,9 +817,16 @@ static int activate(AVFilterContext *ctx)
 static const AVOption overlay_options[] = {
 { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = 
"0"}, CHAR_MIN, CHAR_MAX, FLAGS },
 { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = 
"0"}, CHAR_MIN, CHAR_MAX, FLAGS },
+{ "eof_action", "Action to take when encountering EOF from secondary input 
",
+OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 = EOF_ACTION_REPEAT 
},
+EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS, "eof_action" },
+{ "repeat", "Repeat the previous frame.",   0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
+{ "endall", "End both streams.",0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_ENDALL }, .flags = FLAGS, "eof_action" },
+{ "pass",   "Pass through the main input.", 0, AV_OPT_TYPE_CONST, { 
.i64 = EOF_ACTION_PASS },   .flags = FLAGS, "eof_action" },
 { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), 
AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_FRAME}, 0, EVAL_MODE_NB-1, FLAGS, "eval" },
  { "init",  "eval expressions once during initialization", 0, 
AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT},  .flags = FLAGS, .unit = "eval" },
  { "frame", "eval expressions per-frame",  0, 
AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
+{ "shortest", "force termination when the shortest input terminates", 
OFFSET(fs.opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
 { "format", "set output format", OFFSET(format), AV_OPT_TYPE_INT, 
{.i64=OVERLAY_FORMAT_YUV420}, 0, OVERLAY_FORMAT_NB-1, FLAGS, "format" },
 { "yuv420", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV420}, 
.flags = FLAGS, .unit = "format" },
 { "yuv422", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV422}, 
.flags = FLAGS, .unit = "format" },
@@ -827,6 +834,7 @@ static const AVOption overlay_options[] = {
 { "rgb","", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_RGB},
.flags = FLAGS, .unit = "format" },
 { "gbrp",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_GBRP},   
.flags = FLAGS, .unit = "format" },
 { "auto",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_AUTO},   
.flags = FLAGS, .unit = "format" },
+{ "repeatlast", "repeat overlay of the last overlay frame", 
OFFSET(fs.opt_repeatlast), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
 { NULL }
 };
 
-- 
2.14.1

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