From patchwork Sun Jan 8 15:25:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 2104 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp6708427vsb; Sun, 8 Jan 2017 07:26:44 -0800 (PST) X-Received: by 10.223.139.22 with SMTP id n22mr8658311wra.143.1483889204643; Sun, 08 Jan 2017 07:26:44 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gj1si14220780wjb.239.2017.01.08.07.26.44; Sun, 08 Jan 2017 07:26:44 -0800 (PST) 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; 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 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 1145768A516; Sun, 8 Jan 2017 17:26:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9181E68A50F for ; Sun, 8 Jan 2017 17:26:04 +0200 (EET) Received: by mail-qk0-f196.google.com with SMTP id 11so3200962qkl.0 for ; Sun, 08 Jan 2017 07:26:11 -0800 (PST) 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=o/nQP80wIb+GvnRd1b7gT90vqotFINcx9Tty/O5fWzU=; b=vQKm2Ee31Ljjbb1FE+P3PBrSdu7QiRRl6sf9O7WkzSxaBe1n9KpOyDt5e4RLvcb/wm 3UEU2T8QkR+blPMLKJFKUTBAznCv/Bp4gyQegiNAA6wmr1xd/61SNFW8EXD+kFFz5XnF /PJM7WYiFbToQaHNDrXqGRQv0ABOedwFuPd2MyEmExMN/feI1hSzKeYAEcvD6f5+tUmN 4JnK50KE9KwwWbJlQDnzrUUlcsuxq5hMcFsyDC5uJnf8mVf3BZrZaZqFHT9MKlKXhWWo +1ll0OrqBG+5rhdEumj2QOM0BWmU/UiBeFFLUw9kRVkHUGpZbLDAhzqjHc5rYpTUqhTK DwWw== 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=o/nQP80wIb+GvnRd1b7gT90vqotFINcx9Tty/O5fWzU=; b=JOgqM3GUG4lWzSTFV1s6JkYqphvRFjpxVXg1BYSBercgsIgvd0Sch+TXunefw93Xxg Vj6FF6u2vXy43O/jix+YcJi2MqZqyqBp9J3pblfT634kH/zsBVxyz/TEuxctzDh2UzZj sggxO5xF6Fobx38vPH61dSP8ORAjhggUtkjZxaZH/JsvtCz3Ma2r29YfLNkF+uNa648i jno7ksZUkZXUhIiO2qtS67ETbLwozJ8+VPZZFGeshGMN0rqCbOPC4Br35lByyMb3MgH7 8xuiaJ8FgLZQtMcDropl5J64GaRI8N35J2XdvNXGmD/3CTXzHw4gtnkMuMPH+nlNJQag fhfw== X-Gm-Message-State: AIkVDXI8ortoIZE3CITFZrl1qITaJNSVNgueqsjEGTd8+/tBW3UDyHaDwgOkS2RJCjI9jw== X-Received: by 10.55.24.221 with SMTP id 90mr93103142qky.296.1483889170127; Sun, 08 Jan 2017 07:26:10 -0800 (PST) Received: from localhost.localdomain ([181.22.44.206]) by smtp.gmail.com with ESMTPSA id v184sm1866821qkc.34.2017.01.08.07.26.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Jan 2017 07:26:09 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 8 Jan 2017 12:25:37 -0300 Message-Id: <20170108152537.5468-6-jamrial@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170108152537.5468-1-jamrial@gmail.com> References: <20170108152537.5468-1-jamrial@gmail.com> Subject: [FFmpeg-devel] [PATCH 5/5] lossless_videodsp: rename add_hfyu_left_pred_int16 to add_left_pred_int16 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" Signed-off-by: James Almer --- libavcodec/huffyuvdec.c | 2 +- libavcodec/lossless_videodsp.c | 4 ++-- libavcodec/lossless_videodsp.h | 3 ++- libavcodec/magicyuv.c | 14 +++++++------- libavcodec/x86/lossless_videodsp.asm | 6 +++--- libavcodec/x86/lossless_videodsp_init.c | 8 ++++---- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index c79dda4..c68eadd 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -882,7 +882,7 @@ static int left_prediction(HYuvContext *s, uint8_t *dst, const uint8_t *src, int if (s->bps <= 8) { return s->llviddsp.add_left_pred(dst, src, w, acc); } else { - return s->llviddsp.add_hfyu_left_pred_int16(( uint16_t *)dst, (const uint16_t *)src, s->n-1, w, acc); + return s->llviddsp.add_left_pred_int16(( uint16_t *)dst, (const uint16_t *)src, s->n-1, w, acc); } } diff --git a/libavcodec/lossless_videodsp.c b/libavcodec/lossless_videodsp.c index 54ce677..a1bcc3a 100644 --- a/libavcodec/lossless_videodsp.c +++ b/libavcodec/lossless_videodsp.c @@ -79,7 +79,7 @@ static int add_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w, return acc; } -static int add_hfyu_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc){ +static int add_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc){ int i; for(i=0; iadd_median_pred = add_median_pred_c; c->add_left_pred = add_left_pred_c; - c->add_hfyu_left_pred_int16 = add_hfyu_left_pred_int16_c; + c->add_left_pred_int16 = add_left_pred_int16_c; if (ARCH_X86) ff_llviddsp_init_x86(c); diff --git a/libavcodec/lossless_videodsp.h b/libavcodec/lossless_videodsp.h index b8105d3..32f3fba 100644 --- a/libavcodec/lossless_videodsp.h +++ b/libavcodec/lossless_videodsp.h @@ -34,7 +34,8 @@ typedef struct LLVidDSPContext { int (*add_left_pred)(uint8_t *dst, const uint8_t *src, intptr_t w, int left); - int (*add_hfyu_left_pred_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned left); + int (*add_left_pred_int16)(uint16_t *dst, const uint16_t *src, + unsigned mask, int w, unsigned left); } LLVidDSPContext; void ff_llviddsp_init(LLVidDSPContext *llviddsp); diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c index ac0737c..6250536 100644 --- a/libavcodec/magicyuv.c +++ b/libavcodec/magicyuv.c @@ -221,24 +221,24 @@ static int magy_decode_slice10(AVCodecContext *avctx, void *tdata, switch (pred) { case LEFT: dst = (uint16_t *)p->data[i] + j * sheight * stride; - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); dst += stride; if (interlaced) { - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); dst += stride; } for (k = 1 + interlaced; k < height; k++) { - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, dst[-fake_stride]); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, dst[-fake_stride]); dst += stride; } break; case GRADIENT: dst = (uint16_t *)p->data[i] + j * sheight * stride; - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); left = lefttop = 0; dst += stride; if (interlaced) { - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); left = lefttop = 0; dst += stride; } @@ -258,11 +258,11 @@ static int magy_decode_slice10(AVCodecContext *avctx, void *tdata, case MEDIAN: dst = (uint16_t *)p->data[i] + j * sheight * stride; lefttop = left = dst[0]; - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); dst += stride; if (interlaced) { lefttop = left = dst[0]; - s->llviddsp.add_hfyu_left_pred_int16(dst, dst, 1023, width, 0); + s->llviddsp.add_left_pred_int16(dst, dst, 1023, width, 0); dst += stride; } for (k = 1 + interlaced; k < height; k++) { diff --git a/libavcodec/x86/lossless_videodsp.asm b/libavcodec/x86/lossless_videodsp.asm index 1f484cb..949dfec 100644 --- a/libavcodec/x86/lossless_videodsp.asm +++ b/libavcodec/x86/lossless_videodsp.asm @@ -258,9 +258,9 @@ ADD_BYTES RET %endmacro -; int add_hfyu_left_pred_int16(uint16_t *dst, const uint16_t *src, unsigned mask, int w, int left) +; int add_left_pred_int16(uint16_t *dst, const uint16_t *src, unsigned mask, int w, int left) INIT_MMX ssse3 -cglobal add_hfyu_left_pred_int16, 4,4,8, dst, src, mask, w, left +cglobal add_left_pred_int16, 4,4,8, dst, src, mask, w, left .skip_prologue: mova m5, [pb_67] mova m3, [pb_zzzz2323zzzzabab] @@ -271,7 +271,7 @@ cglobal add_hfyu_left_pred_int16, 4,4,8, dst, src, mask, w, left ADD_HFYU_LEFT_LOOP_INT16 a, a INIT_XMM sse4 -cglobal add_hfyu_left_pred_int16, 4,4,8, dst, src, mask, w, left +cglobal add_left_pred_int16, 4,4,8, dst, src, mask, w, left mova m5, [pb_ef] mova m4, [pb_zzzzzzzz67676767] mova m3, [pb_zzzz2323zzzzabab] diff --git a/libavcodec/x86/lossless_videodsp_init.c b/libavcodec/x86/lossless_videodsp_init.c index 5b139a7..445e54a 100644 --- a/libavcodec/x86/lossless_videodsp_init.c +++ b/libavcodec/x86/lossless_videodsp_init.c @@ -38,8 +38,8 @@ int ff_add_left_pred_ssse3(uint8_t *dst, const uint8_t *src, int ff_add_left_pred_sse4(uint8_t *dst, const uint8_t *src, intptr_t w, int left); -int ff_add_hfyu_left_pred_int16_ssse3(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); -int ff_add_hfyu_left_pred_int16_sse4(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); +int ff_add_left_pred_int16_ssse3(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); +int ff_add_left_pred_int16_sse4(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); #if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32 static void add_median_pred_cmov(uint8_t *dst, const uint8_t *top, @@ -108,10 +108,10 @@ void ff_llviddsp_init_x86(LLVidDSPContext *c) if (cpu_flags & AV_CPU_FLAG_SSE4) // not really SSE4, just slow on Conroe c->add_left_pred = ff_add_left_pred_sse4; - c->add_hfyu_left_pred_int16 = ff_add_hfyu_left_pred_int16_ssse3; + c->add_left_pred_int16 = ff_add_left_pred_int16_ssse3; } if (EXTERNAL_SSE4(cpu_flags)) { - c->add_hfyu_left_pred_int16 = ff_add_hfyu_left_pred_int16_sse4; + c->add_left_pred_int16 = ff_add_left_pred_int16_sse4; } }