On 09/09/16 11:03, Carl Eugen Hoyos wrote:
2016-09-09 11:55 GMT+02:00 Sven C. Dack <sven.c.d...@sky.com>:

Super-sampling is currently only supported by CUDA/NPP when the output
dimensions are both smaller than the input dimensions. The patch lets ffmpeg
select an alternative algorithm and prints a warning in such cases.
Tabs (as in your patch) cannot be committed to our git repository, please
remove them.
You can use the script tools/patcheck to find them.


Ok, thank you.

It tells me my change log entry is missing.

I've commited it with: git commit vf_scale_npp.c

Entered my comment and applied format-patch: git format-patch -1 vf_scale_npp.c

How would I get the missing change log entry in there?

Sven

>From aacd8ecc2f39a45bbfdf6780d9b3b13e6ed0fb41 Mon Sep 17 00:00:00 2001
From: "Sven C. Dack" <s...@debian-linux.no.domain>
Date: Fri, 9 Sep 2016 10:18:07 +0100
Subject: [PATCH] Select cubic and lanczos as alternative where super-sampling
 is not supported

---
 libavfilter/vf_scale_npp.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 68cee39..82ba2f4 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -294,10 +294,21 @@ static int init_processing_chain(AVFilterContext *ctx, int in_width, int in_heig
 
     /* figure out which stages need to be done */
     if (in_width != out_width || in_height != out_height ||
-        in_deinterleaved_format != out_deinterleaved_format)
+        in_deinterleaved_format != out_deinterleaved_format) {
         s->stages[STAGE_RESIZE].stage_needed = 1;
 
+       if (s->interp_algo == NPPI_INTER_SUPER &&
+           (out_width > in_width && out_height > in_height)) {
+           s->interp_algo = NPPI_INTER_LANCZOS;
+           av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using lanczos instead.\n");
+       }
+       if (s->interp_algo == NPPI_INTER_SUPER &&
+           !(out_width < in_width && out_height < in_height)) {
+           s->interp_algo = NPPI_INTER_CUBIC;
+           av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using cubic instead.\n");
+       }
+    }
+
     if (!s->stages[STAGE_RESIZE].stage_needed && in_format == out_format)
         s->passthrough = 1;
 
-- 
2.9.3

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

Reply via email to