From patchwork Fri Aug 11 14:11:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Giovara X-Patchwork-Id: 4692 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.46.211 with SMTP id u202csp900505vsu; Fri, 11 Aug 2017 07:17:56 -0700 (PDT) X-Received: by 10.28.93.211 with SMTP id r202mr9253648wmb.116.1502461076063; Fri, 11 Aug 2017 07:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502461076; cv=none; d=google.com; s=arc-20160816; b=uKSLIanrgNU303VzkdXrW7e5GRzlta+s6ZaODPUIuF/f5tgOfYa0tS6ip/3lrWLdlx U9FzEfvR+8P+SqtsxSBMPFw+/Wf97y/7aYiDoYTJCaBf1OkNPGIDtExqqEUX/Vrs9N+d /Osj+ITuXmGGS6I7+fb1G6euba4CKHM9y5T011NMOLiwKrD+19cTWn6QMESPmb0v+8wK qczDPxY0R2nJGbmtaZmYu/zaBjxNwNDUrNaaH4H8rQREjOHifRAY5Wz3D5q4i97uYEzH ++ipMk3QW2IKLouHVhxgfVOIZhUWXZPOXSm8XeonP4gxSuMgTtC16IrjFnmjD5b4zzhQ m93A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=w+LVT0Axtu27dk1rsChXsHnOdfTWp1MyglKyer7dhpM=; b=oJv5+QWbonF/TcJClPNGGvCWGNihqfzF/7m+XPpjv3HGcK6G/7teWk3CKp8JlW/mT0 J5p68sk8q7EGpwDqbkeWLqSi251OwZ1Owu2Od4kJ3ivWjSUxE3nBwkT4BMfIrrkEU14q gf9wlkMi4/avYzVGfNeAiXuqvJhq6/rF7F/AdDgS2jOqIJMalBJPfFucrLZcOdFTux40 RCGUWPntuc6jC4F7q31TvvW4Epsl43cbcXCypxCZMWhG6Al882uwHcgfl7jxDwwQsW+F tpSOvfzWzRIXPEF4NbOI1VTvtdyu8MCdORDRBzv23MvXTs/d53QJRZN8B1E/CvG5OAur Hvxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=thUR20tj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g7si770199wrg.363.2017.08.11.07.17.55; Fri, 11 Aug 2017 07:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=thUR20tj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 97FD8689AA9; Fri, 11 Aug 2017 17:17:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F3C7689216 for ; Fri, 11 Aug 2017 17:17:44 +0300 (EEST) Received: by mail-qk0-f193.google.com with SMTP id m84so3600450qki.5 for ; Fri, 11 Aug 2017 07:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=MZaOqw3gcJOCW54tZuNWTqOF0Qm9B9VHaSa+pLwRCWQ=; b=thUR20tjVobU4Untyv/4sqNbdmDG5e8KLtOo8lkxt4DRtHsrGbjhBRbDzOlvaB7vEX Um6WcpUjgJeM9k/Libf2MXOdUz1DPRnu8ZJ8XEDSphNuEnatu9HTWj15gacckRHQ9IGN hnlDgKUQr8kS8qXn2y5QW22sAasTBQ85WBqXSLx5DPUrw0tIbmTZSShvhyMZT7QO2I38 tWCxCUDXuI3CND1K3piYGOvHhZ278vfAnDvuxWr5MYAsZJzZKbNmaysNrCBuBxBbEdOw RvpbG5gq23EJ5zeOWO/oJmaqYJOV5/iZeWxWDi1a7wlGXvS+R0UkK2X6yE5Trgayu4yL o7yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=MZaOqw3gcJOCW54tZuNWTqOF0Qm9B9VHaSa+pLwRCWQ=; b=ei6glEEsPzefBjIFQ97Jj4ONQ9XWmYWECp3a5i4eyN7s0j6OHHOEvtDTEJRlhp2U4R H+Q9+Yz4A1qQ3SXkWvziN6cpvdr/nQlCWeA2s0JfyuHhBsoZdfz8boKnMLTcbOR6T51A t/4DciY+6bPbQE38NFiE/7OItRjUU1LDuUUXVtY8hDTtQBc4+TIKwOSB+SkhiCjl6lYC CRHFcVNwZekuG/Lj4womkgZxWYfJ0BYdQyog8qUxNr4PJWPp6vFIhwEcU76J88KfnJOU iJ796qEGlHW/r7F9PV59G7nM7+qu6u2j2BaoIskTxQtc4Qq/3AKjjUxeNRf6BsuG9sc7 /3fw== X-Gm-Message-State: AHYfb5jbjdNU18TWhSgFM+OflZ7B1hqJr99xeOIAz2i4Chk2TBSmiXnG UMb2Xjwa2hM8lrC7YWw= X-Received: by 10.55.9.9 with SMTP id 9mr18902114qkj.53.1502460674893; Fri, 11 Aug 2017 07:11:14 -0700 (PDT) Received: from vimacbookpro.vimeo.iac.corp (mi-18-14-204.service.infuturo.it. [151.18.14.204]) by smtp.gmail.com with ESMTPSA id v66sm611698qkg.72.2017.08.11.07.11.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 Aug 2017 07:11:14 -0700 (PDT) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Aug 2017 16:11:05 +0200 Message-Id: <20170811141106.85652-3-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170811141106.85652-1-vittorio.giovara@gmail.com> References: <20170811141106.85652-1-vittorio.giovara@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/3] zscale: Enable single precision input/ouput filtering X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/vf_zscale.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index 466689dbc5..1617db7cf0 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -179,6 +179,7 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP16, + AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32, AV_PIX_FMT_NONE }; int ret; @@ -429,7 +430,7 @@ static void format_init(zimg_image_format *format, AVFrame *frame, const AVPixFm format->subsample_w = desc->log2_chroma_w; format->subsample_h = desc->log2_chroma_h; format->depth = desc->comp[0].depth; - format->pixel_type = desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; + format->pixel_type = (desc->flags & AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT : desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; format->color_family = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? ZIMG_COLOR_RGB : ZIMG_COLOR_YUV; format->matrix_coefficients = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? ZIMG_MATRIX_RGB : colorspace == -1 ? convert_matrix(frame->colorspace) : colorspace; format->color_primaries = primaries == -1 ? convert_primaries(frame->color_primaries) : primaries; @@ -573,13 +574,13 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) s->alpha_src_format.width = in->width; s->alpha_src_format.height = in->height; s->alpha_src_format.depth = desc->comp[0].depth; - s->alpha_src_format.pixel_type = desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; + s->alpha_src_format.pixel_type = (desc->flags & AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT : desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; s->alpha_src_format.color_family = ZIMG_COLOR_GREY; s->alpha_dst_format.width = out->width; s->alpha_dst_format.height = out->height; s->alpha_dst_format.depth = odesc->comp[0].depth; - s->alpha_dst_format.pixel_type = odesc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; + s->alpha_dst_format.pixel_type = (desc->flags & AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT : odesc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE; s->alpha_dst_format.color_family = ZIMG_COLOR_GREY; zimg_filter_graph_free(s->alpha_graph);