[FFmpeg-cvslog] vf_scale: add output h/v_chr_pos parameterss

Michael Niedermayer git at videolan.org
Wed Jul 24 18:29:51 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul 14 05:03:06 2013 +0200| [e31d20255d81935bd09f109f9ae573c365efc5a8] | committer: Michael Niedermayer

vf_scale: add output h/v_chr_pos parameterss

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_scale.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 8d8351b..5fd8693 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -96,6 +96,9 @@ typedef struct {
 
     int in_range;
     int out_range;
+
+    int out_h_chr_pos;
+    int out_v_chr_pos;
 } ScaleContext;
 
 static av_cold int init(AVFilterContext *ctx)
@@ -323,6 +326,9 @@ static int config_props(AVFilterLink *outlink)
             av_opt_set_int(*s, "dst_format", outfmt, 0);
             av_opt_set_int(*s, "sws_flags", scale->flags, 0);
 
+            av_opt_set_int(*s, "dst_h_chr_pos", scale->out_h_chr_pos, 0);
+            av_opt_set_int(*s, "dst_v_chr_pos", scale->out_v_chr_pos, 0);
+
             if ((ret = sws_init_context(*s, NULL, NULL)) < 0)
                 return ret;
             if (!scale->interlaced)
@@ -491,6 +497,8 @@ static const AVOption scale_options[] = {
     { "mpeg",   NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
     { "tv",     NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG}, 0, 0, FLAGS, "range" },
     { "pc",     NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, 0, FLAGS, "range" },
+    { "out_v_chr_pos",   "output vertical chroma position in luma grid/256"  , OFFSET(out_v_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
+    { "out_h_chr_pos",   "output horizontal chroma position in luma grid/256", OFFSET(out_h_chr_pos), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 512, FLAGS },
     { NULL },
 };
 



More information about the ffmpeg-cvslog mailing list