From patchwork Sat Jan 30 04:44:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25263 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3EA8844B53B for ; Sat, 30 Jan 2021 06:44:41 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1653E68A71F; Sat, 30 Jan 2021 06:44:41 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2ADC568973D for ; Sat, 30 Jan 2021 06:44:34 +0200 (EET) Received: by mail-wm1-f45.google.com with SMTP id m1so5400918wml.2 for ; Fri, 29 Jan 2021 20:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yCmfhOH98dmPekbLktgrRFFXftfaACoYS1mAiYcmp48=; b=Fcksl+t7RdtfglzzXRd+DsaaxQtELsqA0dr8kxg/k6j0beY3FnDed54hY4wF1YhCvH FMcjCMJbM1iNQ75T0eECfkXoCrzR7FR8FiQouPOwi21sK8TDrax9tna8nRrTFuX+did2 dgretSor375qxy+6OXVzXp7PNcqpU8W8tLMGpt4OkX09knsq1yU1epJl+AbC3y0In/uW dt6JQH9SujCWVx9wTbmfol1q8NxpZ/vFn70+XYVJ36qqbNAzHGz+mTXnTZ0hndFBVXVG IrfjpD2yxVshAzQHJf2vii7lwekpZwBnJ9kuNsm1sglh9aTswa5K6UV+T+pArFy+I5CE 7c0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yCmfhOH98dmPekbLktgrRFFXftfaACoYS1mAiYcmp48=; b=BntBhR8b6QKlq3To0W0+AUeqnM5ILIm6p4+1TcmuxG9s9549d1FGQ9INc1sjGBJCZe drtVRmcERkDdRbViIfQaJtwWRvuJnWdbYJ9GPK5T/tP8nr2rXChX/cpA10NM38hcsCtz myUX7DClw++vezgmilYTBdM/d03H+edTlVQvfGuFd32dkTw1Zrt6ly929tyQCnp2lux/ g5D2zFbBdyI5HLEBuDU6/2LI1P+CTdiAGOweXAg53O61p75R1eOhcEgGnx31dTbP3Lcz 1ifiSpZVAszaqTUs2q9xkqjTNQzsAcFz2o+ou5S6E2JrQYOXC/rgvPJ2dGRtToqGAT3D HB9Q== X-Gm-Message-State: AOAM53129N5JkMENTZ0euuJMF/5AFV5Y5lHRPPq2GZGM1VOQAHuEri0S aOmy3gevLPC9ZzPNXyr7ZzTyEkxCDZQ= X-Google-Smtp-Source: ABdhPJxN7GpsIBRl5YXZD5SJRwT0pCwjZqUn6qSSmocfzwBO3IX6sMKDuWSRr2TyZQHj4AK5RRDlAg== X-Received: by 2002:a1c:6484:: with SMTP id y126mr6442049wmb.45.1611981873380; Fri, 29 Jan 2021 20:44:33 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:32 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:19 +0100 Message-Id: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/6] avformat/cutils, dvenc: Move ff_brktimegm to its only user 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This also allows to completely remove cutils.c. Signed-off-by: Andreas Rheinhardt --- libavformat/Makefile | 1 - libavformat/cutils.c | 39 --------------------------------------- libavformat/dvenc.c | 13 +++++++++++-- libavformat/internal.h | 2 -- 4 files changed, 11 insertions(+), 44 deletions(-) delete mode 100644 libavformat/cutils.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 3a8fbcbe5f..c820dd35f4 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -8,7 +8,6 @@ HEADERS = avformat.h \ OBJS = allformats.o \ avio.o \ aviobuf.o \ - cutils.o \ dump.o \ format.o \ id3v1.o \ diff --git a/libavformat/cutils.c b/libavformat/cutils.c deleted file mode 100644 index d86ba05441..0000000000 --- a/libavformat/cutils.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * various simple utilities for libavformat - * Copyright (c) 2000, 2001, 2002 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "libavutil/time_internal.h" -#include "avformat.h" -#include "internal.h" - -#define ISLEAP(y) (((y) % 4 == 0) && (((y) % 100) != 0 || ((y) % 400) == 0)) -#define LEAPS_COUNT(y) ((y)/4 - (y)/100 + (y)/400) - -/* This is our own gmtime_r. It differs from its POSIX counterpart in a - couple of places, though. */ -struct tm *ff_brktimegm(time_t secs, struct tm *tm) -{ - tm = gmtime_r(&secs, tm); - - tm->tm_year += 1900; /* unlike gmtime_r we store complete year here */ - tm->tm_mon += 1; /* unlike gmtime_r tm_mon is from 1 to 12 */ - - return tm; -} diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 6c0d40f819..320f8479f0 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -29,6 +29,7 @@ */ #include +#include "libavutil/time_internal.h" #include "avformat.h" #include "internal.h" #include "libavcodec/dv_profile.h" @@ -72,6 +73,14 @@ static const int dv_aaux_packs_dist[12][9] = { { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff }, }; +static void brktimegm(time_t secs, struct tm *tm) +{ + tm = gmtime_r(&secs, tm); + + tm->tm_year += 1900; /* unlike gmtime_r we store complete year here */ + tm->tm_mon += 1; /* unlike gmtime_r tm_mon is from 1 to 12 */ +} + static int dv_audio_frame_size(const AVDVProfile* sys, int frame, int sample_rate) { if ((sys->time_base.den == 25 || sys->time_base.den == 50) && sys->time_base.num == 1) { @@ -143,7 +152,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu case dv_video_recdate: /* VAUX recording date */ ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num, c->sys->time_base.den, AV_ROUND_DOWN); - ff_brktimegm(ct, &tc); + brktimegm(ct, &tc); buf[1] = 0xff; /* ds, tm, tens of time zone, units of time zone */ /* 0xff is very likely to be "unknown" */ buf[2] = (3 << 6) | /* reserved -- always 1 */ @@ -159,7 +168,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu case dv_video_rectime: /* VAUX recording time */ ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num, c->sys->time_base.den, AV_ROUND_DOWN); - ff_brktimegm(ct, &tc); + brktimegm(ct, &tc); buf[1] = (3 << 6) | /* reserved -- always 1 */ 0x3f; /* tens of frame, units of frame: 0x3f - "unknown" ? */ buf[2] = (1 << 7) | /* reserved -- always 1 */ diff --git a/libavformat/internal.h b/libavformat/internal.h index f45b1cd6b4..d0db331b96 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -365,8 +365,6 @@ do {\ } while(0) #endif -struct tm *ff_brktimegm(time_t secs, struct tm *tm); - /** * Automatically create sub-directories * From patchwork Sat Jan 30 04:44:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25264 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 33F9E44131D for ; Sat, 30 Jan 2021 06:45:00 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B28D68A87F; Sat, 30 Jan 2021 06:45:00 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 764C468973D for ; Sat, 30 Jan 2021 06:44:53 +0200 (EET) Received: by mail-wr1-f53.google.com with SMTP id v15so10853858wrx.4 for ; Fri, 29 Jan 2021 20:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SHwST9eXm/UWPG19GRx5e9g9J4BFeIY6dmUYs9xtju8=; b=ZLJPqgYMKs5aKa5P0ctRF+OSLCjO5Moqdxj2yYVFGpuFt4e8Kgohtg9eGE9tH6I6Og +qA/mCUbLLpeL9MGlWwQ6lMz060xzvlDPCtGnOqmKbDbw3lNXOvZOrTOopX7YWnQvbkQ pFzcWaTRk/Oxx8ipb02rkXgLwQgGJ52u6Ejivsdj0nQsHAFOUme9HsxvCrQeKLZNZAk0 FjUJVDAH7FVnbJI9rfL58x4KXiaUzGkmjboN7D5xzmWH4v74Jz5G7WDrmA9yG/ajVvlo kDdGI7CfTVClCjrPo7WGj1k0RNMaz+wfHefIIsHc7GG94DEnvr3XoQq5V0J8iLynfjuC DdBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SHwST9eXm/UWPG19GRx5e9g9J4BFeIY6dmUYs9xtju8=; b=bRfF29ZXwGfGj3BJgUk5pUqtBLTZ0L4JZqswGzFYqohDY9TeXJr16McGl56DWwTUAj 5hA9Knbj6fWLL3WQqWhIN1z24VYpZY0l8vL9yqxBDwy/ruG4aHFRXsrQqstZPOuBH+wl VcfAAFiR4LCS+/weokPF8mH7lqevhNQyuhhfn8Uga7Q2vUSNaIAWu6ZeaHVjo6OryGKh iessfvwlVGaHekp/mg9ILKDxzoXJ+9zUS98Ws1H/eaAooLGywCykGn/4YigWhdNKT/DI tnkpfH+0gIF2guQqsFtZMJYRkh+XAZgub2SWjrjYNRj0NtYCZFez5DajCtDKR7Hm6irB cxIg== X-Gm-Message-State: AOAM530gk/o6HXj+CjsuUF+Fcmk8NCvpYs3vGN8f3wWS+ufDxsmfPAEI t0CQ9e+3qp9IqcI4RZatLs0xJA4jMV0= X-Google-Smtp-Source: ABdhPJx2fOJX6QtnrA64bVp7/M9T+RM/XORuW3fEpcfPlMGOYpqe+iEMKC/UNaKcqIFyGgXZ/nU0pQ== X-Received: by 2002:a5d:4e4c:: with SMTP id r12mr7783352wrt.354.1611981892433; Fri, 29 Jan 2021 20:44:52 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:51 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:20 +0100 Message-Id: <20210130044424.3677308-2-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> References: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/6] avformat/qtpalette: Move default palette to their only user 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Namely qtpalette.c itself. Signed-off-by: Andreas Rheinhardt --- libavformat/qtpalette.c | 300 +++++++++++++++++++++++++++++++++++++++- libavformat/qtpalette.h | 292 -------------------------------------- 2 files changed, 296 insertions(+), 296 deletions(-) diff --git a/libavformat/qtpalette.c b/libavformat/qtpalette.c index 6833f0cea9..2ac079a23c 100644 --- a/libavformat/qtpalette.c +++ b/libavformat/qtpalette.c @@ -28,6 +28,298 @@ #include "libavutil/intreadwrite.h" #include "qtpalette.h" +static const uint8_t qt_default_palette_2[2 * 3] = { + 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00 +}; + +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ +static const uint8_t qt_default_palette_4[4 * 3] = { + 0xFF, 0xFF, 0xFF, + 0xAC, 0xAC, 0xAC, + 0x55, 0x55, 0x55, + 0x00, 0x00, 0x00 +}; + +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ +static const uint8_t qt_default_palette_16[16 * 3] = { + 0xFF, 0xFF, 0xFF, + 0xFC, 0xF3, 0x05, + 0xFF, 0x64, 0x02, + 0xDD, 0x08, 0x06, + 0xF2, 0x08, 0x84, + 0x46, 0x00, 0xA5, + 0x00, 0x00, 0xD4, + 0x02, 0xAB, 0xEA, + 0x1F, 0xB7, 0x14, + 0x00, 0x64, 0x11, + 0x56, 0x2C, 0x05, + 0x90, 0x71, 0x3A, + 0xC0, 0xC0, 0xC0, + 0x80, 0x80, 0x80, + 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00 +}; + +static const uint8_t qt_default_palette_256[256 * 3] = { + /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, + /* 1, 0x01 */ 0xFF, 0xFF, 0xCC, + /* 2, 0x02 */ 0xFF, 0xFF, 0x99, + /* 3, 0x03 */ 0xFF, 0xFF, 0x66, + /* 4, 0x04 */ 0xFF, 0xFF, 0x33, + /* 5, 0x05 */ 0xFF, 0xFF, 0x00, + /* 6, 0x06 */ 0xFF, 0xCC, 0xFF, + /* 7, 0x07 */ 0xFF, 0xCC, 0xCC, + /* 8, 0x08 */ 0xFF, 0xCC, 0x99, + /* 9, 0x09 */ 0xFF, 0xCC, 0x66, + /* 10, 0x0A */ 0xFF, 0xCC, 0x33, + /* 11, 0x0B */ 0xFF, 0xCC, 0x00, + /* 12, 0x0C */ 0xFF, 0x99, 0xFF, + /* 13, 0x0D */ 0xFF, 0x99, 0xCC, + /* 14, 0x0E */ 0xFF, 0x99, 0x99, + /* 15, 0x0F */ 0xFF, 0x99, 0x66, + /* 16, 0x10 */ 0xFF, 0x99, 0x33, + /* 17, 0x11 */ 0xFF, 0x99, 0x00, + /* 18, 0x12 */ 0xFF, 0x66, 0xFF, + /* 19, 0x13 */ 0xFF, 0x66, 0xCC, + /* 20, 0x14 */ 0xFF, 0x66, 0x99, + /* 21, 0x15 */ 0xFF, 0x66, 0x66, + /* 22, 0x16 */ 0xFF, 0x66, 0x33, + /* 23, 0x17 */ 0xFF, 0x66, 0x00, + /* 24, 0x18 */ 0xFF, 0x33, 0xFF, + /* 25, 0x19 */ 0xFF, 0x33, 0xCC, + /* 26, 0x1A */ 0xFF, 0x33, 0x99, + /* 27, 0x1B */ 0xFF, 0x33, 0x66, + /* 28, 0x1C */ 0xFF, 0x33, 0x33, + /* 29, 0x1D */ 0xFF, 0x33, 0x00, + /* 30, 0x1E */ 0xFF, 0x00, 0xFF, + /* 31, 0x1F */ 0xFF, 0x00, 0xCC, + /* 32, 0x20 */ 0xFF, 0x00, 0x99, + /* 33, 0x21 */ 0xFF, 0x00, 0x66, + /* 34, 0x22 */ 0xFF, 0x00, 0x33, + /* 35, 0x23 */ 0xFF, 0x00, 0x00, + /* 36, 0x24 */ 0xCC, 0xFF, 0xFF, + /* 37, 0x25 */ 0xCC, 0xFF, 0xCC, + /* 38, 0x26 */ 0xCC, 0xFF, 0x99, + /* 39, 0x27 */ 0xCC, 0xFF, 0x66, + /* 40, 0x28 */ 0xCC, 0xFF, 0x33, + /* 41, 0x29 */ 0xCC, 0xFF, 0x00, + /* 42, 0x2A */ 0xCC, 0xCC, 0xFF, + /* 43, 0x2B */ 0xCC, 0xCC, 0xCC, + /* 44, 0x2C */ 0xCC, 0xCC, 0x99, + /* 45, 0x2D */ 0xCC, 0xCC, 0x66, + /* 46, 0x2E */ 0xCC, 0xCC, 0x33, + /* 47, 0x2F */ 0xCC, 0xCC, 0x00, + /* 48, 0x30 */ 0xCC, 0x99, 0xFF, + /* 49, 0x31 */ 0xCC, 0x99, 0xCC, + /* 50, 0x32 */ 0xCC, 0x99, 0x99, + /* 51, 0x33 */ 0xCC, 0x99, 0x66, + /* 52, 0x34 */ 0xCC, 0x99, 0x33, + /* 53, 0x35 */ 0xCC, 0x99, 0x00, + /* 54, 0x36 */ 0xCC, 0x66, 0xFF, + /* 55, 0x37 */ 0xCC, 0x66, 0xCC, + /* 56, 0x38 */ 0xCC, 0x66, 0x99, + /* 57, 0x39 */ 0xCC, 0x66, 0x66, + /* 58, 0x3A */ 0xCC, 0x66, 0x33, + /* 59, 0x3B */ 0xCC, 0x66, 0x00, + /* 60, 0x3C */ 0xCC, 0x33, 0xFF, + /* 61, 0x3D */ 0xCC, 0x33, 0xCC, + /* 62, 0x3E */ 0xCC, 0x33, 0x99, + /* 63, 0x3F */ 0xCC, 0x33, 0x66, + /* 64, 0x40 */ 0xCC, 0x33, 0x33, + /* 65, 0x41 */ 0xCC, 0x33, 0x00, + /* 66, 0x42 */ 0xCC, 0x00, 0xFF, + /* 67, 0x43 */ 0xCC, 0x00, 0xCC, + /* 68, 0x44 */ 0xCC, 0x00, 0x99, + /* 69, 0x45 */ 0xCC, 0x00, 0x66, + /* 70, 0x46 */ 0xCC, 0x00, 0x33, + /* 71, 0x47 */ 0xCC, 0x00, 0x00, + /* 72, 0x48 */ 0x99, 0xFF, 0xFF, + /* 73, 0x49 */ 0x99, 0xFF, 0xCC, + /* 74, 0x4A */ 0x99, 0xFF, 0x99, + /* 75, 0x4B */ 0x99, 0xFF, 0x66, + /* 76, 0x4C */ 0x99, 0xFF, 0x33, + /* 77, 0x4D */ 0x99, 0xFF, 0x00, + /* 78, 0x4E */ 0x99, 0xCC, 0xFF, + /* 79, 0x4F */ 0x99, 0xCC, 0xCC, + /* 80, 0x50 */ 0x99, 0xCC, 0x99, + /* 81, 0x51 */ 0x99, 0xCC, 0x66, + /* 82, 0x52 */ 0x99, 0xCC, 0x33, + /* 83, 0x53 */ 0x99, 0xCC, 0x00, + /* 84, 0x54 */ 0x99, 0x99, 0xFF, + /* 85, 0x55 */ 0x99, 0x99, 0xCC, + /* 86, 0x56 */ 0x99, 0x99, 0x99, + /* 87, 0x57 */ 0x99, 0x99, 0x66, + /* 88, 0x58 */ 0x99, 0x99, 0x33, + /* 89, 0x59 */ 0x99, 0x99, 0x00, + /* 90, 0x5A */ 0x99, 0x66, 0xFF, + /* 91, 0x5B */ 0x99, 0x66, 0xCC, + /* 92, 0x5C */ 0x99, 0x66, 0x99, + /* 93, 0x5D */ 0x99, 0x66, 0x66, + /* 94, 0x5E */ 0x99, 0x66, 0x33, + /* 95, 0x5F */ 0x99, 0x66, 0x00, + /* 96, 0x60 */ 0x99, 0x33, 0xFF, + /* 97, 0x61 */ 0x99, 0x33, 0xCC, + /* 98, 0x62 */ 0x99, 0x33, 0x99, + /* 99, 0x63 */ 0x99, 0x33, 0x66, + /* 100, 0x64 */ 0x99, 0x33, 0x33, + /* 101, 0x65 */ 0x99, 0x33, 0x00, + /* 102, 0x66 */ 0x99, 0x00, 0xFF, + /* 103, 0x67 */ 0x99, 0x00, 0xCC, + /* 104, 0x68 */ 0x99, 0x00, 0x99, + /* 105, 0x69 */ 0x99, 0x00, 0x66, + /* 106, 0x6A */ 0x99, 0x00, 0x33, + /* 107, 0x6B */ 0x99, 0x00, 0x00, + /* 108, 0x6C */ 0x66, 0xFF, 0xFF, + /* 109, 0x6D */ 0x66, 0xFF, 0xCC, + /* 110, 0x6E */ 0x66, 0xFF, 0x99, + /* 111, 0x6F */ 0x66, 0xFF, 0x66, + /* 112, 0x70 */ 0x66, 0xFF, 0x33, + /* 113, 0x71 */ 0x66, 0xFF, 0x00, + /* 114, 0x72 */ 0x66, 0xCC, 0xFF, + /* 115, 0x73 */ 0x66, 0xCC, 0xCC, + /* 116, 0x74 */ 0x66, 0xCC, 0x99, + /* 117, 0x75 */ 0x66, 0xCC, 0x66, + /* 118, 0x76 */ 0x66, 0xCC, 0x33, + /* 119, 0x77 */ 0x66, 0xCC, 0x00, + /* 120, 0x78 */ 0x66, 0x99, 0xFF, + /* 121, 0x79 */ 0x66, 0x99, 0xCC, + /* 122, 0x7A */ 0x66, 0x99, 0x99, + /* 123, 0x7B */ 0x66, 0x99, 0x66, + /* 124, 0x7C */ 0x66, 0x99, 0x33, + /* 125, 0x7D */ 0x66, 0x99, 0x00, + /* 126, 0x7E */ 0x66, 0x66, 0xFF, + /* 127, 0x7F */ 0x66, 0x66, 0xCC, + /* 128, 0x80 */ 0x66, 0x66, 0x99, + /* 129, 0x81 */ 0x66, 0x66, 0x66, + /* 130, 0x82 */ 0x66, 0x66, 0x33, + /* 131, 0x83 */ 0x66, 0x66, 0x00, + /* 132, 0x84 */ 0x66, 0x33, 0xFF, + /* 133, 0x85 */ 0x66, 0x33, 0xCC, + /* 134, 0x86 */ 0x66, 0x33, 0x99, + /* 135, 0x87 */ 0x66, 0x33, 0x66, + /* 136, 0x88 */ 0x66, 0x33, 0x33, + /* 137, 0x89 */ 0x66, 0x33, 0x00, + /* 138, 0x8A */ 0x66, 0x00, 0xFF, + /* 139, 0x8B */ 0x66, 0x00, 0xCC, + /* 140, 0x8C */ 0x66, 0x00, 0x99, + /* 141, 0x8D */ 0x66, 0x00, 0x66, + /* 142, 0x8E */ 0x66, 0x00, 0x33, + /* 143, 0x8F */ 0x66, 0x00, 0x00, + /* 144, 0x90 */ 0x33, 0xFF, 0xFF, + /* 145, 0x91 */ 0x33, 0xFF, 0xCC, + /* 146, 0x92 */ 0x33, 0xFF, 0x99, + /* 147, 0x93 */ 0x33, 0xFF, 0x66, + /* 148, 0x94 */ 0x33, 0xFF, 0x33, + /* 149, 0x95 */ 0x33, 0xFF, 0x00, + /* 150, 0x96 */ 0x33, 0xCC, 0xFF, + /* 151, 0x97 */ 0x33, 0xCC, 0xCC, + /* 152, 0x98 */ 0x33, 0xCC, 0x99, + /* 153, 0x99 */ 0x33, 0xCC, 0x66, + /* 154, 0x9A */ 0x33, 0xCC, 0x33, + /* 155, 0x9B */ 0x33, 0xCC, 0x00, + /* 156, 0x9C */ 0x33, 0x99, 0xFF, + /* 157, 0x9D */ 0x33, 0x99, 0xCC, + /* 158, 0x9E */ 0x33, 0x99, 0x99, + /* 159, 0x9F */ 0x33, 0x99, 0x66, + /* 160, 0xA0 */ 0x33, 0x99, 0x33, + /* 161, 0xA1 */ 0x33, 0x99, 0x00, + /* 162, 0xA2 */ 0x33, 0x66, 0xFF, + /* 163, 0xA3 */ 0x33, 0x66, 0xCC, + /* 164, 0xA4 */ 0x33, 0x66, 0x99, + /* 165, 0xA5 */ 0x33, 0x66, 0x66, + /* 166, 0xA6 */ 0x33, 0x66, 0x33, + /* 167, 0xA7 */ 0x33, 0x66, 0x00, + /* 168, 0xA8 */ 0x33, 0x33, 0xFF, + /* 169, 0xA9 */ 0x33, 0x33, 0xCC, + /* 170, 0xAA */ 0x33, 0x33, 0x99, + /* 171, 0xAB */ 0x33, 0x33, 0x66, + /* 172, 0xAC */ 0x33, 0x33, 0x33, + /* 173, 0xAD */ 0x33, 0x33, 0x00, + /* 174, 0xAE */ 0x33, 0x00, 0xFF, + /* 175, 0xAF */ 0x33, 0x00, 0xCC, + /* 176, 0xB0 */ 0x33, 0x00, 0x99, + /* 177, 0xB1 */ 0x33, 0x00, 0x66, + /* 178, 0xB2 */ 0x33, 0x00, 0x33, + /* 179, 0xB3 */ 0x33, 0x00, 0x00, + /* 180, 0xB4 */ 0x00, 0xFF, 0xFF, + /* 181, 0xB5 */ 0x00, 0xFF, 0xCC, + /* 182, 0xB6 */ 0x00, 0xFF, 0x99, + /* 183, 0xB7 */ 0x00, 0xFF, 0x66, + /* 184, 0xB8 */ 0x00, 0xFF, 0x33, + /* 185, 0xB9 */ 0x00, 0xFF, 0x00, + /* 186, 0xBA */ 0x00, 0xCC, 0xFF, + /* 187, 0xBB */ 0x00, 0xCC, 0xCC, + /* 188, 0xBC */ 0x00, 0xCC, 0x99, + /* 189, 0xBD */ 0x00, 0xCC, 0x66, + /* 190, 0xBE */ 0x00, 0xCC, 0x33, + /* 191, 0xBF */ 0x00, 0xCC, 0x00, + /* 192, 0xC0 */ 0x00, 0x99, 0xFF, + /* 193, 0xC1 */ 0x00, 0x99, 0xCC, + /* 194, 0xC2 */ 0x00, 0x99, 0x99, + /* 195, 0xC3 */ 0x00, 0x99, 0x66, + /* 196, 0xC4 */ 0x00, 0x99, 0x33, + /* 197, 0xC5 */ 0x00, 0x99, 0x00, + /* 198, 0xC6 */ 0x00, 0x66, 0xFF, + /* 199, 0xC7 */ 0x00, 0x66, 0xCC, + /* 200, 0xC8 */ 0x00, 0x66, 0x99, + /* 201, 0xC9 */ 0x00, 0x66, 0x66, + /* 202, 0xCA */ 0x00, 0x66, 0x33, + /* 203, 0xCB */ 0x00, 0x66, 0x00, + /* 204, 0xCC */ 0x00, 0x33, 0xFF, + /* 205, 0xCD */ 0x00, 0x33, 0xCC, + /* 206, 0xCE */ 0x00, 0x33, 0x99, + /* 207, 0xCF */ 0x00, 0x33, 0x66, + /* 208, 0xD0 */ 0x00, 0x33, 0x33, + /* 209, 0xD1 */ 0x00, 0x33, 0x00, + /* 210, 0xD2 */ 0x00, 0x00, 0xFF, + /* 211, 0xD3 */ 0x00, 0x00, 0xCC, + /* 212, 0xD4 */ 0x00, 0x00, 0x99, + /* 213, 0xD5 */ 0x00, 0x00, 0x66, + /* 214, 0xD6 */ 0x00, 0x00, 0x33, + /* 215, 0xD7 */ 0xEE, 0x00, 0x00, + /* 216, 0xD8 */ 0xDD, 0x00, 0x00, + /* 217, 0xD9 */ 0xBB, 0x00, 0x00, + /* 218, 0xDA */ 0xAA, 0x00, 0x00, + /* 219, 0xDB */ 0x88, 0x00, 0x00, + /* 220, 0xDC */ 0x77, 0x00, 0x00, + /* 221, 0xDD */ 0x55, 0x00, 0x00, + /* 222, 0xDE */ 0x44, 0x00, 0x00, + /* 223, 0xDF */ 0x22, 0x00, 0x00, + /* 224, 0xE0 */ 0x11, 0x00, 0x00, + /* 225, 0xE1 */ 0x00, 0xEE, 0x00, + /* 226, 0xE2 */ 0x00, 0xDD, 0x00, + /* 227, 0xE3 */ 0x00, 0xBB, 0x00, + /* 228, 0xE4 */ 0x00, 0xAA, 0x00, + /* 229, 0xE5 */ 0x00, 0x88, 0x00, + /* 230, 0xE6 */ 0x00, 0x77, 0x00, + /* 231, 0xE7 */ 0x00, 0x55, 0x00, + /* 232, 0xE8 */ 0x00, 0x44, 0x00, + /* 233, 0xE9 */ 0x00, 0x22, 0x00, + /* 234, 0xEA */ 0x00, 0x11, 0x00, + /* 235, 0xEB */ 0x00, 0x00, 0xEE, + /* 236, 0xEC */ 0x00, 0x00, 0xDD, + /* 237, 0xED */ 0x00, 0x00, 0xBB, + /* 238, 0xEE */ 0x00, 0x00, 0xAA, + /* 239, 0xEF */ 0x00, 0x00, 0x88, + /* 240, 0xF0 */ 0x00, 0x00, 0x77, + /* 241, 0xF1 */ 0x00, 0x00, 0x55, + /* 242, 0xF2 */ 0x00, 0x00, 0x44, + /* 243, 0xF3 */ 0x00, 0x00, 0x22, + /* 244, 0xF4 */ 0x00, 0x00, 0x11, + /* 245, 0xF5 */ 0xEE, 0xEE, 0xEE, + /* 246, 0xF6 */ 0xDD, 0xDD, 0xDD, + /* 247, 0xF7 */ 0xBB, 0xBB, 0xBB, + /* 248, 0xF8 */ 0xAA, 0xAA, 0xAA, + /* 249, 0xF9 */ 0x88, 0x88, 0x88, + /* 250, 0xFA */ 0x77, 0x77, 0x77, + /* 251, 0xFB */ 0x55, 0x55, 0x55, + /* 252, 0xFC */ 0x44, 0x44, 0x44, + /* 253, 0xFD */ 0x22, 0x22, 0x22, + /* 254, 0xFE */ 0x11, 0x11, 0x11, + /* 255, 0xFF */ 0x00, 0x00, 0x00 +}; + int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette) { int tmp, bit_depth, color_table_id, greyscale, i; @@ -73,13 +365,13 @@ int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette) const uint8_t *color_table; color_count = 1 << bit_depth; if (bit_depth == 1) - color_table = ff_qt_default_palette_2; + color_table = qt_default_palette_2; else if (bit_depth == 2) - color_table = ff_qt_default_palette_4; + color_table = qt_default_palette_4; else if (bit_depth == 4) - color_table = ff_qt_default_palette_16; + color_table = qt_default_palette_16; else - color_table = ff_qt_default_palette_256; + color_table = qt_default_palette_256; for (i = 0; i < color_count; i++) { r = color_table[i * 3 + 0]; g = color_table[i * 3 + 1]; diff --git a/libavformat/qtpalette.h b/libavformat/qtpalette.h index 016e91f1b3..03c0154945 100644 --- a/libavformat/qtpalette.h +++ b/libavformat/qtpalette.h @@ -26,298 +26,6 @@ #include #include "avformat.h" -static const uint8_t ff_qt_default_palette_2[2 * 3] = { - 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00 -}; - -/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ -static const uint8_t ff_qt_default_palette_4[4 * 3] = { - 0xFF, 0xFF, 0xFF, - 0xAC, 0xAC, 0xAC, - 0x55, 0x55, 0x55, - 0x00, 0x00, 0x00 -}; - -/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ -static const uint8_t ff_qt_default_palette_16[16 * 3] = { - 0xFF, 0xFF, 0xFF, - 0xFC, 0xF3, 0x05, - 0xFF, 0x64, 0x02, - 0xDD, 0x08, 0x06, - 0xF2, 0x08, 0x84, - 0x46, 0x00, 0xA5, - 0x00, 0x00, 0xD4, - 0x02, 0xAB, 0xEA, - 0x1F, 0xB7, 0x14, - 0x00, 0x64, 0x11, - 0x56, 0x2C, 0x05, - 0x90, 0x71, 0x3A, - 0xC0, 0xC0, 0xC0, - 0x80, 0x80, 0x80, - 0x40, 0x40, 0x40, - 0x00, 0x00, 0x00 -}; - -static const uint8_t ff_qt_default_palette_256[256 * 3] = { - /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, - /* 1, 0x01 */ 0xFF, 0xFF, 0xCC, - /* 2, 0x02 */ 0xFF, 0xFF, 0x99, - /* 3, 0x03 */ 0xFF, 0xFF, 0x66, - /* 4, 0x04 */ 0xFF, 0xFF, 0x33, - /* 5, 0x05 */ 0xFF, 0xFF, 0x00, - /* 6, 0x06 */ 0xFF, 0xCC, 0xFF, - /* 7, 0x07 */ 0xFF, 0xCC, 0xCC, - /* 8, 0x08 */ 0xFF, 0xCC, 0x99, - /* 9, 0x09 */ 0xFF, 0xCC, 0x66, - /* 10, 0x0A */ 0xFF, 0xCC, 0x33, - /* 11, 0x0B */ 0xFF, 0xCC, 0x00, - /* 12, 0x0C */ 0xFF, 0x99, 0xFF, - /* 13, 0x0D */ 0xFF, 0x99, 0xCC, - /* 14, 0x0E */ 0xFF, 0x99, 0x99, - /* 15, 0x0F */ 0xFF, 0x99, 0x66, - /* 16, 0x10 */ 0xFF, 0x99, 0x33, - /* 17, 0x11 */ 0xFF, 0x99, 0x00, - /* 18, 0x12 */ 0xFF, 0x66, 0xFF, - /* 19, 0x13 */ 0xFF, 0x66, 0xCC, - /* 20, 0x14 */ 0xFF, 0x66, 0x99, - /* 21, 0x15 */ 0xFF, 0x66, 0x66, - /* 22, 0x16 */ 0xFF, 0x66, 0x33, - /* 23, 0x17 */ 0xFF, 0x66, 0x00, - /* 24, 0x18 */ 0xFF, 0x33, 0xFF, - /* 25, 0x19 */ 0xFF, 0x33, 0xCC, - /* 26, 0x1A */ 0xFF, 0x33, 0x99, - /* 27, 0x1B */ 0xFF, 0x33, 0x66, - /* 28, 0x1C */ 0xFF, 0x33, 0x33, - /* 29, 0x1D */ 0xFF, 0x33, 0x00, - /* 30, 0x1E */ 0xFF, 0x00, 0xFF, - /* 31, 0x1F */ 0xFF, 0x00, 0xCC, - /* 32, 0x20 */ 0xFF, 0x00, 0x99, - /* 33, 0x21 */ 0xFF, 0x00, 0x66, - /* 34, 0x22 */ 0xFF, 0x00, 0x33, - /* 35, 0x23 */ 0xFF, 0x00, 0x00, - /* 36, 0x24 */ 0xCC, 0xFF, 0xFF, - /* 37, 0x25 */ 0xCC, 0xFF, 0xCC, - /* 38, 0x26 */ 0xCC, 0xFF, 0x99, - /* 39, 0x27 */ 0xCC, 0xFF, 0x66, - /* 40, 0x28 */ 0xCC, 0xFF, 0x33, - /* 41, 0x29 */ 0xCC, 0xFF, 0x00, - /* 42, 0x2A */ 0xCC, 0xCC, 0xFF, - /* 43, 0x2B */ 0xCC, 0xCC, 0xCC, - /* 44, 0x2C */ 0xCC, 0xCC, 0x99, - /* 45, 0x2D */ 0xCC, 0xCC, 0x66, - /* 46, 0x2E */ 0xCC, 0xCC, 0x33, - /* 47, 0x2F */ 0xCC, 0xCC, 0x00, - /* 48, 0x30 */ 0xCC, 0x99, 0xFF, - /* 49, 0x31 */ 0xCC, 0x99, 0xCC, - /* 50, 0x32 */ 0xCC, 0x99, 0x99, - /* 51, 0x33 */ 0xCC, 0x99, 0x66, - /* 52, 0x34 */ 0xCC, 0x99, 0x33, - /* 53, 0x35 */ 0xCC, 0x99, 0x00, - /* 54, 0x36 */ 0xCC, 0x66, 0xFF, - /* 55, 0x37 */ 0xCC, 0x66, 0xCC, - /* 56, 0x38 */ 0xCC, 0x66, 0x99, - /* 57, 0x39 */ 0xCC, 0x66, 0x66, - /* 58, 0x3A */ 0xCC, 0x66, 0x33, - /* 59, 0x3B */ 0xCC, 0x66, 0x00, - /* 60, 0x3C */ 0xCC, 0x33, 0xFF, - /* 61, 0x3D */ 0xCC, 0x33, 0xCC, - /* 62, 0x3E */ 0xCC, 0x33, 0x99, - /* 63, 0x3F */ 0xCC, 0x33, 0x66, - /* 64, 0x40 */ 0xCC, 0x33, 0x33, - /* 65, 0x41 */ 0xCC, 0x33, 0x00, - /* 66, 0x42 */ 0xCC, 0x00, 0xFF, - /* 67, 0x43 */ 0xCC, 0x00, 0xCC, - /* 68, 0x44 */ 0xCC, 0x00, 0x99, - /* 69, 0x45 */ 0xCC, 0x00, 0x66, - /* 70, 0x46 */ 0xCC, 0x00, 0x33, - /* 71, 0x47 */ 0xCC, 0x00, 0x00, - /* 72, 0x48 */ 0x99, 0xFF, 0xFF, - /* 73, 0x49 */ 0x99, 0xFF, 0xCC, - /* 74, 0x4A */ 0x99, 0xFF, 0x99, - /* 75, 0x4B */ 0x99, 0xFF, 0x66, - /* 76, 0x4C */ 0x99, 0xFF, 0x33, - /* 77, 0x4D */ 0x99, 0xFF, 0x00, - /* 78, 0x4E */ 0x99, 0xCC, 0xFF, - /* 79, 0x4F */ 0x99, 0xCC, 0xCC, - /* 80, 0x50 */ 0x99, 0xCC, 0x99, - /* 81, 0x51 */ 0x99, 0xCC, 0x66, - /* 82, 0x52 */ 0x99, 0xCC, 0x33, - /* 83, 0x53 */ 0x99, 0xCC, 0x00, - /* 84, 0x54 */ 0x99, 0x99, 0xFF, - /* 85, 0x55 */ 0x99, 0x99, 0xCC, - /* 86, 0x56 */ 0x99, 0x99, 0x99, - /* 87, 0x57 */ 0x99, 0x99, 0x66, - /* 88, 0x58 */ 0x99, 0x99, 0x33, - /* 89, 0x59 */ 0x99, 0x99, 0x00, - /* 90, 0x5A */ 0x99, 0x66, 0xFF, - /* 91, 0x5B */ 0x99, 0x66, 0xCC, - /* 92, 0x5C */ 0x99, 0x66, 0x99, - /* 93, 0x5D */ 0x99, 0x66, 0x66, - /* 94, 0x5E */ 0x99, 0x66, 0x33, - /* 95, 0x5F */ 0x99, 0x66, 0x00, - /* 96, 0x60 */ 0x99, 0x33, 0xFF, - /* 97, 0x61 */ 0x99, 0x33, 0xCC, - /* 98, 0x62 */ 0x99, 0x33, 0x99, - /* 99, 0x63 */ 0x99, 0x33, 0x66, - /* 100, 0x64 */ 0x99, 0x33, 0x33, - /* 101, 0x65 */ 0x99, 0x33, 0x00, - /* 102, 0x66 */ 0x99, 0x00, 0xFF, - /* 103, 0x67 */ 0x99, 0x00, 0xCC, - /* 104, 0x68 */ 0x99, 0x00, 0x99, - /* 105, 0x69 */ 0x99, 0x00, 0x66, - /* 106, 0x6A */ 0x99, 0x00, 0x33, - /* 107, 0x6B */ 0x99, 0x00, 0x00, - /* 108, 0x6C */ 0x66, 0xFF, 0xFF, - /* 109, 0x6D */ 0x66, 0xFF, 0xCC, - /* 110, 0x6E */ 0x66, 0xFF, 0x99, - /* 111, 0x6F */ 0x66, 0xFF, 0x66, - /* 112, 0x70 */ 0x66, 0xFF, 0x33, - /* 113, 0x71 */ 0x66, 0xFF, 0x00, - /* 114, 0x72 */ 0x66, 0xCC, 0xFF, - /* 115, 0x73 */ 0x66, 0xCC, 0xCC, - /* 116, 0x74 */ 0x66, 0xCC, 0x99, - /* 117, 0x75 */ 0x66, 0xCC, 0x66, - /* 118, 0x76 */ 0x66, 0xCC, 0x33, - /* 119, 0x77 */ 0x66, 0xCC, 0x00, - /* 120, 0x78 */ 0x66, 0x99, 0xFF, - /* 121, 0x79 */ 0x66, 0x99, 0xCC, - /* 122, 0x7A */ 0x66, 0x99, 0x99, - /* 123, 0x7B */ 0x66, 0x99, 0x66, - /* 124, 0x7C */ 0x66, 0x99, 0x33, - /* 125, 0x7D */ 0x66, 0x99, 0x00, - /* 126, 0x7E */ 0x66, 0x66, 0xFF, - /* 127, 0x7F */ 0x66, 0x66, 0xCC, - /* 128, 0x80 */ 0x66, 0x66, 0x99, - /* 129, 0x81 */ 0x66, 0x66, 0x66, - /* 130, 0x82 */ 0x66, 0x66, 0x33, - /* 131, 0x83 */ 0x66, 0x66, 0x00, - /* 132, 0x84 */ 0x66, 0x33, 0xFF, - /* 133, 0x85 */ 0x66, 0x33, 0xCC, - /* 134, 0x86 */ 0x66, 0x33, 0x99, - /* 135, 0x87 */ 0x66, 0x33, 0x66, - /* 136, 0x88 */ 0x66, 0x33, 0x33, - /* 137, 0x89 */ 0x66, 0x33, 0x00, - /* 138, 0x8A */ 0x66, 0x00, 0xFF, - /* 139, 0x8B */ 0x66, 0x00, 0xCC, - /* 140, 0x8C */ 0x66, 0x00, 0x99, - /* 141, 0x8D */ 0x66, 0x00, 0x66, - /* 142, 0x8E */ 0x66, 0x00, 0x33, - /* 143, 0x8F */ 0x66, 0x00, 0x00, - /* 144, 0x90 */ 0x33, 0xFF, 0xFF, - /* 145, 0x91 */ 0x33, 0xFF, 0xCC, - /* 146, 0x92 */ 0x33, 0xFF, 0x99, - /* 147, 0x93 */ 0x33, 0xFF, 0x66, - /* 148, 0x94 */ 0x33, 0xFF, 0x33, - /* 149, 0x95 */ 0x33, 0xFF, 0x00, - /* 150, 0x96 */ 0x33, 0xCC, 0xFF, - /* 151, 0x97 */ 0x33, 0xCC, 0xCC, - /* 152, 0x98 */ 0x33, 0xCC, 0x99, - /* 153, 0x99 */ 0x33, 0xCC, 0x66, - /* 154, 0x9A */ 0x33, 0xCC, 0x33, - /* 155, 0x9B */ 0x33, 0xCC, 0x00, - /* 156, 0x9C */ 0x33, 0x99, 0xFF, - /* 157, 0x9D */ 0x33, 0x99, 0xCC, - /* 158, 0x9E */ 0x33, 0x99, 0x99, - /* 159, 0x9F */ 0x33, 0x99, 0x66, - /* 160, 0xA0 */ 0x33, 0x99, 0x33, - /* 161, 0xA1 */ 0x33, 0x99, 0x00, - /* 162, 0xA2 */ 0x33, 0x66, 0xFF, - /* 163, 0xA3 */ 0x33, 0x66, 0xCC, - /* 164, 0xA4 */ 0x33, 0x66, 0x99, - /* 165, 0xA5 */ 0x33, 0x66, 0x66, - /* 166, 0xA6 */ 0x33, 0x66, 0x33, - /* 167, 0xA7 */ 0x33, 0x66, 0x00, - /* 168, 0xA8 */ 0x33, 0x33, 0xFF, - /* 169, 0xA9 */ 0x33, 0x33, 0xCC, - /* 170, 0xAA */ 0x33, 0x33, 0x99, - /* 171, 0xAB */ 0x33, 0x33, 0x66, - /* 172, 0xAC */ 0x33, 0x33, 0x33, - /* 173, 0xAD */ 0x33, 0x33, 0x00, - /* 174, 0xAE */ 0x33, 0x00, 0xFF, - /* 175, 0xAF */ 0x33, 0x00, 0xCC, - /* 176, 0xB0 */ 0x33, 0x00, 0x99, - /* 177, 0xB1 */ 0x33, 0x00, 0x66, - /* 178, 0xB2 */ 0x33, 0x00, 0x33, - /* 179, 0xB3 */ 0x33, 0x00, 0x00, - /* 180, 0xB4 */ 0x00, 0xFF, 0xFF, - /* 181, 0xB5 */ 0x00, 0xFF, 0xCC, - /* 182, 0xB6 */ 0x00, 0xFF, 0x99, - /* 183, 0xB7 */ 0x00, 0xFF, 0x66, - /* 184, 0xB8 */ 0x00, 0xFF, 0x33, - /* 185, 0xB9 */ 0x00, 0xFF, 0x00, - /* 186, 0xBA */ 0x00, 0xCC, 0xFF, - /* 187, 0xBB */ 0x00, 0xCC, 0xCC, - /* 188, 0xBC */ 0x00, 0xCC, 0x99, - /* 189, 0xBD */ 0x00, 0xCC, 0x66, - /* 190, 0xBE */ 0x00, 0xCC, 0x33, - /* 191, 0xBF */ 0x00, 0xCC, 0x00, - /* 192, 0xC0 */ 0x00, 0x99, 0xFF, - /* 193, 0xC1 */ 0x00, 0x99, 0xCC, - /* 194, 0xC2 */ 0x00, 0x99, 0x99, - /* 195, 0xC3 */ 0x00, 0x99, 0x66, - /* 196, 0xC4 */ 0x00, 0x99, 0x33, - /* 197, 0xC5 */ 0x00, 0x99, 0x00, - /* 198, 0xC6 */ 0x00, 0x66, 0xFF, - /* 199, 0xC7 */ 0x00, 0x66, 0xCC, - /* 200, 0xC8 */ 0x00, 0x66, 0x99, - /* 201, 0xC9 */ 0x00, 0x66, 0x66, - /* 202, 0xCA */ 0x00, 0x66, 0x33, - /* 203, 0xCB */ 0x00, 0x66, 0x00, - /* 204, 0xCC */ 0x00, 0x33, 0xFF, - /* 205, 0xCD */ 0x00, 0x33, 0xCC, - /* 206, 0xCE */ 0x00, 0x33, 0x99, - /* 207, 0xCF */ 0x00, 0x33, 0x66, - /* 208, 0xD0 */ 0x00, 0x33, 0x33, - /* 209, 0xD1 */ 0x00, 0x33, 0x00, - /* 210, 0xD2 */ 0x00, 0x00, 0xFF, - /* 211, 0xD3 */ 0x00, 0x00, 0xCC, - /* 212, 0xD4 */ 0x00, 0x00, 0x99, - /* 213, 0xD5 */ 0x00, 0x00, 0x66, - /* 214, 0xD6 */ 0x00, 0x00, 0x33, - /* 215, 0xD7 */ 0xEE, 0x00, 0x00, - /* 216, 0xD8 */ 0xDD, 0x00, 0x00, - /* 217, 0xD9 */ 0xBB, 0x00, 0x00, - /* 218, 0xDA */ 0xAA, 0x00, 0x00, - /* 219, 0xDB */ 0x88, 0x00, 0x00, - /* 220, 0xDC */ 0x77, 0x00, 0x00, - /* 221, 0xDD */ 0x55, 0x00, 0x00, - /* 222, 0xDE */ 0x44, 0x00, 0x00, - /* 223, 0xDF */ 0x22, 0x00, 0x00, - /* 224, 0xE0 */ 0x11, 0x00, 0x00, - /* 225, 0xE1 */ 0x00, 0xEE, 0x00, - /* 226, 0xE2 */ 0x00, 0xDD, 0x00, - /* 227, 0xE3 */ 0x00, 0xBB, 0x00, - /* 228, 0xE4 */ 0x00, 0xAA, 0x00, - /* 229, 0xE5 */ 0x00, 0x88, 0x00, - /* 230, 0xE6 */ 0x00, 0x77, 0x00, - /* 231, 0xE7 */ 0x00, 0x55, 0x00, - /* 232, 0xE8 */ 0x00, 0x44, 0x00, - /* 233, 0xE9 */ 0x00, 0x22, 0x00, - /* 234, 0xEA */ 0x00, 0x11, 0x00, - /* 235, 0xEB */ 0x00, 0x00, 0xEE, - /* 236, 0xEC */ 0x00, 0x00, 0xDD, - /* 237, 0xED */ 0x00, 0x00, 0xBB, - /* 238, 0xEE */ 0x00, 0x00, 0xAA, - /* 239, 0xEF */ 0x00, 0x00, 0x88, - /* 240, 0xF0 */ 0x00, 0x00, 0x77, - /* 241, 0xF1 */ 0x00, 0x00, 0x55, - /* 242, 0xF2 */ 0x00, 0x00, 0x44, - /* 243, 0xF3 */ 0x00, 0x00, 0x22, - /* 244, 0xF4 */ 0x00, 0x00, 0x11, - /* 245, 0xF5 */ 0xEE, 0xEE, 0xEE, - /* 246, 0xF6 */ 0xDD, 0xDD, 0xDD, - /* 247, 0xF7 */ 0xBB, 0xBB, 0xBB, - /* 248, 0xF8 */ 0xAA, 0xAA, 0xAA, - /* 249, 0xF9 */ 0x88, 0x88, 0x88, - /* 250, 0xFA */ 0x77, 0x77, 0x77, - /* 251, 0xFB */ 0x55, 0x55, 0x55, - /* 252, 0xFC */ 0x44, 0x44, 0x44, - /* 253, 0xFD */ 0x22, 0x22, 0x22, - /* 254, 0xFE */ 0x11, 0x11, 0x11, - /* 255, 0xFF */ 0x00, 0x00, 0x00 -}; - /** * Retrieve the palette (or "color table" in QuickTime terms), either * from the video sample description, or from the default Macintosh From patchwork Sat Jan 30 04:44:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25265 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 5C9B24426E7 for ; Sat, 30 Jan 2021 06:45:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3C16A68A8F8; Sat, 30 Jan 2021 06:45:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D8BA368973D for ; Sat, 30 Jan 2021 06:44:53 +0200 (EET) Received: by mail-wr1-f43.google.com with SMTP id z6so10774668wrq.10 for ; Fri, 29 Jan 2021 20:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iBRSl5yBawzfv7KM22lh/wiGXvZnns6k2zTu7eo9DnY=; b=d8iGo5Hf4jEEPG4LSLjF9pVcXbcvk5FUSHqqcS8OpLgeKsetVDX9eC7zzy+4Aj5cBF I9gKz/Y1SnyOPxH4A7LXZxw7BX3EHsuHwLHhDor/JyNyKoNfBocdx9UQ6d2tNgZtpTLX bVAoCImiYdtMyAwOGlCBEbMHSuL+kS3hY7x8iI5idZudnD2tJhV3AysymL/BTJSURDv/ VOUmUTWz3KmvaLPR5/2uYvskneoWeUXbRCx3hhA8TIKalD2ymx/qKXhPo29ybrpZlfyF WRCvZgDCd+4h00OvLlCS9OzF7hvOORvXKndmw0D5+W9PDreL5zDmorN/SbXmJAr7AIY6 qN3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iBRSl5yBawzfv7KM22lh/wiGXvZnns6k2zTu7eo9DnY=; b=JdGzfeR3cGu1TbksI4wUio3tnCYgMOeOYy82WirKoiQmKNM1f9TOMXS2NrFqBO7HsQ HCFf3IAsOC5oJhz+gTm+95NdtEi1TPdFRiBg2JF/+HoCi6nwldoXroErsqM7wJDWzhlx Jyj+7UbMc4TMuyr+n1DmJ/EiWrIFy874mRKJpbFJxL4ygTQKbN1N7Q9xK6Tog9oq7mG3 i6RRtfVK0UaJAgIwmPHRgFTeR8DxPwBzrfnHNSDhnB+9F2Q7WYLjwcbpH5xQKQO6cADZ IVIVATwQVKNhys3cInV2BxcXdyKYGUX7D32L3N2Su/zBPaY5yE3prnD31iesQxrOzL78 NEzQ== X-Gm-Message-State: AOAM531pJaFzufatlhXCYY5aGbVBFRpZNLlPK3vUn2wDcnCpAIdpikUT ugqNlaGo7lEZ8s3WxwUOoDkhSZ6ix7k= X-Google-Smtp-Source: ABdhPJxuZLDu5OaWs5w6/4s0C36bdrZJd3bgIhEOiyDj+Avdwbi4XXWjSwGpTuelQDdIKVxxPCPC8A== X-Received: by 2002:adf:f28b:: with SMTP id k11mr7735488wro.418.1611981893267; Fri, 29 Jan 2021 20:44:53 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:52 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:21 +0100 Message-Id: <20210130044424.3677308-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> References: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/6] avformat/Makefile: Only compile qtpalette.c when needed 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavformat/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index c820dd35f4..bf1e56fc0a 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -16,7 +16,6 @@ OBJS = allformats.o \ mux.o \ options.o \ os_support.o \ - qtpalette.o \ protocols.o \ riff.o \ sdp.o \ @@ -308,7 +307,7 @@ OBJS-$(CONFIG_M4V_MUXER) += rawenc.o OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o \ rmsipr.o flac_picture.o \ oggparsevorbis.o vorbiscomment.o \ - replaygain.o + qtpalette.o replaygain.o OBJS-$(CONFIG_MATROSKA_MUXER) += matroskaenc.o matroska.o \ av1.o avc.o hevc.o \ flacenc_header.o avlanguage.o \ @@ -330,7 +329,8 @@ OBJS-$(CONFIG_MMF_DEMUXER) += mmf.o OBJS-$(CONFIG_MMF_MUXER) += mmf.o rawenc.o OBJS-$(CONFIG_MODS_DEMUXER) += mods.o OBJS-$(CONFIG_MOFLEX_DEMUXER) += moflex.o -OBJS-$(CONFIG_MOV_DEMUXER) += mov.o mov_chan.o mov_esds.o replaygain.o +OBJS-$(CONFIG_MOV_DEMUXER) += mov.o mov_chan.o mov_esds.o \ + qtpalette.o replaygain.o OBJS-$(CONFIG_MOV_MUXER) += movenc.o av1.o avc.o hevc.o vpcc.o \ movenchint.o mov_chan.o rtp.o \ movenccenc.o rawutils.o From patchwork Sat Jan 30 04:44:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25266 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 701D0444236 for ; Sat, 30 Jan 2021 06:45:03 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 55F1968A92E; Sat, 30 Jan 2021 06:45:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EAAC568973D for ; Sat, 30 Jan 2021 06:44:54 +0200 (EET) Received: by mail-wm1-f52.google.com with SMTP id o10so8089196wmc.1 for ; Fri, 29 Jan 2021 20:44:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7mhM3SMJ9ZdER+IdS1yYQLm0pEEx4Qf6Qtw+u85CnI0=; b=Tifwkx665qWqwtjMHIvyqcurAEYfyIKJau6h5S4OsJL3ful4KvzKiN2duvG0JjA/U0 QwoepKEODlYz1fIi88EcqFoE5BRncIu0y7dX+9YiuVf0Onvfj+K5AfWwT1QlGs8zg9c/ m3N4Fb9tmZg2bj2t7iGPGJccC5We4RSlj/EsEdGut0IISRSr/xzoVt+mDdyrwXKv5JsV gtM7AHpikJecToB6LyU8+fdYmW+DrF/MJJ3rBxgn3Y5rMKLkp+ojeR6ZGvr8QUJiWUji pHN4qvDgwwg4IJgUQNvJnUp6lOm15XhX+WIbi9eJ5GlOdXocKWYcRm0BhzwfgvlxF8bB J7LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7mhM3SMJ9ZdER+IdS1yYQLm0pEEx4Qf6Qtw+u85CnI0=; b=lPha6kmPHizZzypErkzcGbqG7ibfxuXXv7iBUfqkgE5JlBsGJXl8BRntuoLr5Jq76g jyipgnnmwwr1Ggh0HTZurT0qgE/D2j7/7Sf/ZlBJLD04c7520pqLnqrZqXMabhJmkptQ WWd+ez6rFmW7yoCYiap2fEtXR6c2d5BbRKl5wc1rDZiGQFNiwHy8VC8SYnn4v1SZvN86 4T5B+n9HW8FxzimH4RW7/AbSz+KRr4+xdzyZFQZxmeRH/hjUFUwM7UPghxm0oDcu4ZP0 ZXkdtpGz+7A52D5eUTCseAUXB7ClZoDJK+CWfWZxusIrJ9v+thNg5/7oFrb8Vsy979W5 /uQw== X-Gm-Message-State: AOAM530fPs/DbNtla+gdOSGHD/3wvCRUVpE9O8TkvYK5roMHcueIDK+g wfgKukAu2JXSv5IBjXr2E5UeJ7a2ug0= X-Google-Smtp-Source: ABdhPJyrM0XtKsiWCUPgEcSX8baUIRfLg9sll+MoINkd6bzxWlpwdNH1/zNJZe1az+ZlUTfocQdrdg== X-Received: by 2002:a05:600c:1986:: with SMTP id t6mr6333279wmq.93.1611981894186; Fri, 29 Jan 2021 20:44:54 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:53 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:22 +0100 Message-Id: <20210130044424.3677308-4-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> References: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] avformat/rtsp: Fix build failure when RTP demuxers are disabled 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" rtsp.c uses a check of the form "if (CONFIG_RTSP_DEMUXER && ...) {}" with the intent to make the code compilable even though the part guarded by this check contains calls to functions that don't exist when the RTSP demuxer is disabled. Yet even then compilers still need a declaration of all the functions in the dead code block and error out if not (due to our usage of -Werror=implicit-function-declaration) and no such declaration exists for a static function in rtsp.c. Simply adding a declaration leads to a "used but never defined" warning, therefore this commit resorts to an #if. Signed-off-by: Andreas Rheinhardt --- libavformat/rtsp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 1b24496f3c..9a2933346e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1941,12 +1941,15 @@ redirect: break; } - if (CONFIG_RTSP_DEMUXER && s->iformat) { +#if CONFIG_RTSP_DEMUXER + if (s->iformat) { if (rt->server_type == RTSP_SERVER_SATIP) err = init_satip_stream(s); else err = ff_rtsp_setup_input_streams(s, reply); - } else if (CONFIG_RTSP_MUXER) + } else +#endif + if (CONFIG_RTSP_MUXER) err = ff_rtsp_setup_output_streams(s, host); else av_assert0(0); From patchwork Sat Jan 30 04:44:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25267 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 837DF445512 for ; Sat, 30 Jan 2021 06:45:04 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6788968A877; Sat, 30 Jan 2021 06:45:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A659368A880 for ; Sat, 30 Jan 2021 06:44:55 +0200 (EET) Received: by mail-wr1-f51.google.com with SMTP id q7so10797059wre.13 for ; Fri, 29 Jan 2021 20:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H7yVYVGK1pBHH4EOEiPbWcow4aF2Du9Jlicfk9Yh67c=; b=izwG8aqzV17VwUP5XJIxh0059t37+21Is9VgDaIwEleu7IID8ppREMthIn9GkMtIHi yPW/y0n7LPX85gtgcUDc/iNfMKc9eIGI2SMBuP4CeIPjg7BVeqXpHrgOTWcWkdGv4ZlX FLeOdY9FYmaDqBoz8CJU/d6M9Z9WA7byVKqhV1aLk13VLHYdudfjFqEsNKnme+RjxcUU GDO3iD0GbXS129t3Kq3dLoacxtyk06fPmtnkQlK0WQEqoWdHPBNBvqH5+h0FlwLLoCqP mSU+fV01X/DNAYpbhgbqfl1hKmim4X/7mhHWohrVgr5Ze3/1fuBedt71x2sOZ73g/UY9 Brfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H7yVYVGK1pBHH4EOEiPbWcow4aF2Du9Jlicfk9Yh67c=; b=I4vPoxeQjxnCmgsppil2xr2VzBlz9Sk0N4QdoPz7kWFFQ3aS51e6zZENtaLQbNRSK4 bb5su3Ab92NPp3LiECxyvZk1iceNhiWfKrLGyVh7E7BTS+sK38vZjxh8zPWwHE0UII7/ l9FPZ3/E6MK2AbJgmM3Cm8K1LaoZkeY5znlUw2HOvLFqRiyZteLDOABsQxglUIAAqClD QtrGeoLZF9R3HEDve7i14FqBLfcOE6lQSxncyiq4CE1GtUE+/zonDiXKcMLVILFEUmlX WHVgjI0N/juHlDGIgtqtk9FPkgsKZttRr+DmzM8xSNuhGpdVI0MkUJAADizDED2rrh/p kHgg== X-Gm-Message-State: AOAM530GzZtQN1bBPWAOJwES+wLgK/Xvq7ZB4Tgw6VRq+JH0ESDgHB8C /QlipWT08Jgm/j106H26LPmZNe5exQ4= X-Google-Smtp-Source: ABdhPJxIfwdqBK4kUu9tepOx2MZP9aq+byFhddChoMRVsbZA9HC4ZTtD4GkJiMGqavvCSfaE3elFvg== X-Received: by 2002:adf:eed0:: with SMTP id a16mr7593751wrp.107.1611981895034; Fri, 29 Jan 2021 20:44:55 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:54 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:23 +0100 Message-Id: <20210130044424.3677308-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> References: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] avformat/qtpalette: Use better headers 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavformat/qtpalette.c | 3 ++- libavformat/qtpalette.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/qtpalette.c b/libavformat/qtpalette.c index 2ac079a23c..9bcc3c6c38 100644 --- a/libavformat/qtpalette.c +++ b/libavformat/qtpalette.c @@ -24,8 +24,9 @@ #include #include -#include "avformat.h" #include "libavutil/intreadwrite.h" +#include "libavcodec/codec_id.h" +#include "avio.h" #include "qtpalette.h" static const uint8_t qt_default_palette_2[2 * 3] = { diff --git a/libavformat/qtpalette.h b/libavformat/qtpalette.h index 03c0154945..18a108ebaf 100644 --- a/libavformat/qtpalette.h +++ b/libavformat/qtpalette.h @@ -24,7 +24,7 @@ #define AVFORMAT_QTPALETTE_H #include -#include "avformat.h" +#include "avio.h" /** * Retrieve the palette (or "color table" in QuickTime terms), either From patchwork Sat Jan 30 04:44:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 25268 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 053BF449D26 for ; Sat, 30 Jan 2021 06:45:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D0D3168A878; Sat, 30 Jan 2021 06:45:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8A92A68A877 for ; Sat, 30 Jan 2021 06:44:57 +0200 (EET) Received: by mail-wr1-f47.google.com with SMTP id v15so10853945wrx.4 for ; Fri, 29 Jan 2021 20:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bBxvpjCI7dJCySTQBsyACJFDXtEuc+Bfgm7UDWvj21w=; b=KqCKwTEdE0xJXDtsqmiolTFgxS4PO2BhjLAxret7U7K+cW5I8CqVpUA6hSkQqrYBIt UHRsRv0cKBOQ0VrmcasRsRvY6lZe9lWvKE2rrYaB1ilS0greMnidkXhTD1edztJekzIu KRj+VBsyssaPbn1qDzuOzNK/rjYB+jW+Ja9N/cFf+WjTwMFEN2QKxtIEqeYRPtIM806N AsDffmOY6aCLabupiaFl3qDEPR+AzppJH2vpadHCHBCVMQM/ol2OPZ+rR2cOcZuUjgGf huaoum2XjdfW//bOtsJD6E8idRgv9jdn9yZ9E4h9f8JsAPoiRQpKMqhsD2CqivdBVO/H lCOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bBxvpjCI7dJCySTQBsyACJFDXtEuc+Bfgm7UDWvj21w=; b=A82P2L1IA0gTJ9GIlshERHCTOzCTlCFfIzs4odJmEzISSRUU0pnt+prnICRqEHUKZr xFNY2F8QdDPz5RANRlr7fLWWgahKj+so4ILJjhBn4iCD8SnCdHbwp/JqZhHDdxj70lnc CsdKu+PURWdfec8eSOQakSAbsevASRHBDU9/r8GXYLE/8F/R071VosoTLDkUVjhvh5PQ BfQIk6tTROwQnG0lx6QLRXxZs1QBOnMtU4vbCHoKlzPfuirudeY63MQFSImJ7MDHeEQ7 e6clxNRoHJpTWUNW+umqj7GkElFIKUKIkn05ektOb0z/iMhO8j1LVDPQPOAXCLv+mnu9 P9Wg== X-Gm-Message-State: AOAM5332mgaaURHx8p+QBTnSZjfu7bfqJpHjUzuTTN+YXFBkSA/toc4B UwCTP2TeJ53pttOK9W64x6oklFo9A2s= X-Google-Smtp-Source: ABdhPJzIpqw7zMD8h9pGWiALHvVr2qnoIhPKcrKPxZ8j8EowF4wf+aQt10TQNTO7q0RTPJ9RF4XyYw== X-Received: by 2002:adf:f512:: with SMTP id q18mr7761483wro.55.1611981896109; Fri, 29 Jan 2021 20:44:56 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id u6sm16459025wro.75.2021.01.29.20.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 20:44:55 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 30 Jan 2021 05:44:24 +0100 Message-Id: <20210130044424.3677308-6-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> References: <20210130044424.3677308-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/6] swscale: Make nonstatic identifiers respect the naming conventions 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" swscale had several nonstatic functions and function pointers without the proper ff_-prefix; this has been fixed. Signed-off-by: Andreas Rheinhardt --- Tested on x86 and x64; I hope I did everything correct for the other arches, but I am not sure about that, therefore people with the necessary hardware will have to confirm this. libswscale/aarch64/rgb2rgb.c | 4 +- libswscale/arm/rgb2yuv_neon_common.S | 2 +- libswscale/arm/swscale_unscaled.c | 4 +- libswscale/ppc/yuv2yuv_altivec.c | 8 +- libswscale/rgb2rgb.c | 178 ++++++++++++------------ libswscale/rgb2rgb.h | 196 +++++++++++++-------------- libswscale/rgb2rgb_template.c | 92 ++++++------- libswscale/swscale_unscaled.c | 160 +++++++++++----------- libswscale/tests/colorspace.c | 72 +++++----- libswscale/utils.c | 2 +- libswscale/x86/rgb2rgb.c | 18 +-- libswscale/x86/rgb2rgb_template.c | 76 +++++------ tests/checkasm/sw_rgb.c | 16 +-- 13 files changed, 414 insertions(+), 414 deletions(-) diff --git a/libswscale/aarch64/rgb2rgb.c b/libswscale/aarch64/rgb2rgb.c index a9bf6ff9e0..62bf3c033c 100644 --- a/libswscale/aarch64/rgb2rgb.c +++ b/libswscale/aarch64/rgb2rgb.c @@ -31,11 +31,11 @@ void ff_interleave_bytes_neon(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, int width, int height, int src1Stride, int src2Stride, int dstStride); -av_cold void rgb2rgb_init_aarch64(void) +av_cold void ff_rgb2rgb_init_aarch64(void) { int cpu_flags = av_get_cpu_flags(); if (have_neon(cpu_flags)) { - interleaveBytes = ff_interleave_bytes_neon; + ff_interleave_bytes = ff_interleave_bytes_neon; } } diff --git a/libswscale/arm/rgb2yuv_neon_common.S b/libswscale/arm/rgb2yuv_neon_common.S index 30bcecd5bb..2381652de3 100644 --- a/libswscale/arm/rgb2yuv_neon_common.S +++ b/libswscale/arm/rgb2yuv_neon_common.S @@ -97,7 +97,7 @@ alias_dw_all 0, 0, 1 .macro loop_420sp s_fmt, d_fmt, init, kernel, precision -function \s_fmt\()_to_\d_fmt\()_neon_\precision, export=1 +function ff_\s_fmt\()_to_\d_fmt\()_neon_\precision, export=1 prologue alias_loop_420sp diff --git a/libswscale/arm/swscale_unscaled.c b/libswscale/arm/swscale_unscaled.c index e41f294eac..da6486d102 100644 --- a/libswscale/arm/swscale_unscaled.c +++ b/libswscale/arm/swscale_unscaled.c @@ -24,12 +24,12 @@ #include "libavutil/arm/cpu.h" #if HAVE_AS_DN_DIRECTIVE -extern void rgbx_to_nv12_neon_32(const uint8_t *src, uint8_t *y, uint8_t *chroma, +extern void ff_rgbx_to_nv12_neon_32(const uint8_t *src, uint8_t *y, uint8_t *chroma, int width, int height, int y_stride, int c_stride, int src_stride, int32_t coeff_tbl[9]); -extern void rgbx_to_nv12_neon_16(const uint8_t *src, uint8_t *y, uint8_t *chroma, +extern void ff_rgbx_to_nv12_neon_16(const uint8_t *src, uint8_t *y, uint8_t *chroma, int width, int height, int y_stride, int c_stride, int src_stride, int32_t coeff_tbl[9]); diff --git a/libswscale/ppc/yuv2yuv_altivec.c b/libswscale/ppc/yuv2yuv_altivec.c index 2b1c5dd3b8..ebee7f38c4 100644 --- a/libswscale/ppc/yuv2yuv_altivec.c +++ b/libswscale/ppc/yuv2yuv_altivec.c @@ -37,8 +37,8 @@ static int yv12toyuy2_unscaled_altivec(SwsContext *c, const uint8_t *src[], int dstStride_a[]) { uint8_t *dst = dstParam[0] + dstStride_a[0] * srcSliceY; - // yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, - // srcStride[0], srcStride[1], dstStride[0]); + // ff_yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + // srcStride[0], srcStride[1], dstStride[0]); const uint8_t *ysrc = src[0]; const uint8_t *usrc = src[1]; const uint8_t *vsrc = src[2]; @@ -113,8 +113,8 @@ static int yv12touyvy_unscaled_altivec(SwsContext *c, const uint8_t *src[], int dstStride_a[]) { uint8_t *dst = dstParam[0] + dstStride_a[0] * srcSliceY; - // yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, - // srcStride[0], srcStride[1], dstStride[0]); + // ff_yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + // srcStride[0], srcStride[1], dstStride[0]); const uint8_t *ysrc = src[0]; const uint8_t *usrc = src[1]; const uint8_t *vsrc = src[2]; diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index a7300f3ba4..4078c5cd1b 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -32,87 +32,87 @@ #include "swscale.h" #include "swscale_internal.h" -void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); - -void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); -void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); - -void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size); -void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); -void (*shuffle_bytes_1230)(const uint8_t *src, uint8_t *dst, int src_size); -void (*shuffle_bytes_3012)(const uint8_t *src, uint8_t *dst, int src_size); -void (*shuffle_bytes_3210)(const uint8_t *src, uint8_t *dst, int src_size); - - -void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, - const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); -void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, - const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); -void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, +void (*ff_rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); + +void (*ff_rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); + +void (*ff_shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_shuffle_bytes_1230)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_shuffle_bytes_3012)(const uint8_t *src, uint8_t *dst, int src_size); +void (*ff_shuffle_bytes_3210)(const uint8_t *src, uint8_t *dst, int src_size); + + +void (*ff_yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride); -void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, +void (*ff_yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, int width, int height, int lumStride, int chromStride, int dstStride); -void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, - uint8_t *udst, uint8_t *vdst, - int width, int height, - int lumStride, int chromStride, int srcStride); +void (*ff_yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, + const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); +void (*ff_yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, + const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); +void (*ff_yuy2toyv12)(const uint8_t *src, uint8_t *ydst, + uint8_t *udst, uint8_t *vdst, + int width, int height, + int lumStride, int chromStride, int srcStride); void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv); -void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, - int srcStride, int dstStride); -void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, - int width, int height, int src1Stride, - int src2Stride, int dstStride); -void (*deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, - int width, int height, int srcStride, - int dst1Stride, int dst2Stride); -void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, - uint8_t *dst1, uint8_t *dst2, - int width, int height, - int srcStride1, int srcStride2, - int dstStride1, int dstStride2); -void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, - const uint8_t *src3, uint8_t *dst, - int width, int height, - int srcStride1, int srcStride2, - int srcStride3, int dstStride); -void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - const uint8_t *src, int width, int height, - int lumStride, int chromStride, int srcStride); -void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - const uint8_t *src, int width, int height, - int lumStride, int chromStride, int srcStride); -void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - const uint8_t *src, int width, int height, - int lumStride, int chromStride, int srcStride); -void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - const uint8_t *src, int width, int height, - int lumStride, int chromStride, int srcStride); +void (*ff_planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, + int srcStride, int dstStride); +void (*ff_interleave_bytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, + int width, int height, int src1Stride, + int src2Stride, int dstStride); +void (*ff_deinterleave_bytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, + int width, int height, int srcStride, + int dst1Stride, int dst2Stride); +void (*ff_vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, + uint8_t *dst1, uint8_t *dst2, + int width, int height, + int srcStride1, int srcStride2, + int dstStride1, int dstStride2); +void (*ff_yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, + const uint8_t *src3, uint8_t *dst, + int width, int height, + int srcStride1, int srcStride2, + int srcStride3, int dstStride); +void (*ff_uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + const uint8_t *src, int width, int height, + int lumStride, int chromStride, int srcStride); +void (*ff_uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + const uint8_t *src, int width, int height, + int lumStride, int chromStride, int srcStride); +void (*ff_yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + const uint8_t *src, int width, int height, + int lumStride, int chromStride, int srcStride); +void (*ff_yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + const uint8_t *src, int width, int height, + int lumStride, int chromStride, int srcStride); #define BY ((int)( 0.098 * (1 << RGB2YUV_SHIFT) + 0.5)) #define BV ((int)(-0.071 * (1 << RGB2YUV_SHIFT) + 0.5)) @@ -138,12 +138,12 @@ av_cold void ff_sws_rgb2rgb_init(void) { rgb2rgb_init_c(); if (ARCH_AARCH64) - rgb2rgb_init_aarch64(); + ff_rgb2rgb_init_aarch64(); if (ARCH_X86) - rgb2rgb_init_x86(); + ff_rgb2rgb_init_x86(); } -void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb32to24(const uint8_t *src, uint8_t *dst, int src_size) { int i, num_pixels = src_size >> 2; @@ -161,7 +161,7 @@ void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb24to32(const uint8_t *src, uint8_t *dst, int src_size) { int i; @@ -181,7 +181,7 @@ void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size) { uint8_t *d = dst; const uint16_t *s = (const uint16_t *)src; @@ -203,7 +203,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb12to15(const uint8_t *src, uint8_t *dst, int src_size) { uint16_t rgb, r, g, b; uint16_t *d = (uint16_t *)dst; @@ -222,7 +222,7 @@ void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb16to24(const uint8_t *src, uint8_t *dst, int src_size) { uint8_t *d = dst; const uint16_t *s = (const uint16_t *)src; @@ -236,7 +236,7 @@ void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size) { int i, num_pixels = src_size >> 1; @@ -246,7 +246,7 @@ void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size) { int i, num_pixels = src_size >> 1; @@ -256,7 +256,7 @@ void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size) { uint8_t *d = dst; const uint16_t *s = (const uint16_t *)src; @@ -278,7 +278,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb15to24(const uint8_t *src, uint8_t *dst, int src_size) { uint8_t *d = dst; const uint16_t *s = (const uint16_t *)src; @@ -292,7 +292,7 @@ void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size) { int i, num_pixels = src_size >> 1; @@ -302,7 +302,7 @@ void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size) { int i, num_pixels = src_size >> 1; @@ -313,7 +313,7 @@ void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size) } } -void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size) +void ff_rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size) { uint16_t *d = (uint16_t *)dst; uint16_t *s = (uint16_t *)src; @@ -326,7 +326,7 @@ void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size) } #define DEFINE_RGB48TOBGR48(need_bswap, swap) \ -void rgb48tobgr48_ ## need_bswap(const uint8_t *src, \ +void ff_rgb48tobgr48_ ## need_bswap(const uint8_t *src, \ uint8_t *dst, int src_size) \ { \ uint16_t *d = (uint16_t *)dst; \ @@ -344,7 +344,7 @@ DEFINE_RGB48TOBGR48(nobswap, 0) DEFINE_RGB48TOBGR48(bswap, 1) #define DEFINE_RGB64TOBGR48(need_bswap, swap) \ -void rgb64tobgr48_ ## need_bswap(const uint8_t *src, \ +void ff_rgb64tobgr48_ ## need_bswap(const uint8_t *src, \ uint8_t *dst, int src_size) \ { \ uint16_t *d = (uint16_t *)dst; \ @@ -362,7 +362,7 @@ DEFINE_RGB64TOBGR48(nobswap, 0) DEFINE_RGB64TOBGR48(bswap, 1) #define DEFINE_RGB64TO48(need_bswap, swap) \ -void rgb64to48_ ## need_bswap(const uint8_t *src, \ +void ff_rgb64to48_ ## need_bswap(const uint8_t *src, \ uint8_t *dst, int src_size) \ { \ uint16_t *d = (uint16_t *)dst; \ @@ -380,7 +380,7 @@ DEFINE_RGB64TO48(nobswap, 0) DEFINE_RGB64TO48(bswap, 1) #define DEFINE_RGB48TOBGR64(need_bswap, swap) \ -void rgb48tobgr64_ ## need_bswap(const uint8_t *src, \ +void ff_rgb48tobgr64_ ## need_bswap(const uint8_t *src, \ uint8_t *dst, int src_size) \ { \ uint16_t *d = (uint16_t *)dst; \ @@ -399,7 +399,7 @@ DEFINE_RGB48TOBGR64(nobswap, 0) DEFINE_RGB48TOBGR64(bswap, 1) #define DEFINE_RGB48TO64(need_bswap, swap) \ -void rgb48to64_ ## need_bswap(const uint8_t *src, \ +void ff_rgb48to64_ ## need_bswap(const uint8_t *src, \ uint8_t *dst, int src_size) \ { \ uint16_t *d = (uint16_t *)dst; \ diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h index 48bba1586a..f7c6c5f1a3 100644 --- a/libswscale/rgb2rgb.h +++ b/libswscale/rgb2rgb.h @@ -32,52 +32,52 @@ #include "swscale.h" /* A full collection of RGB to RGB(BGR) converters */ -extern void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); - -extern void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*shuffle_bytes_1230)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*shuffle_bytes_3012)(const uint8_t *src, uint8_t *dst, int src_size); -extern void (*shuffle_bytes_3210)(const uint8_t *src, uint8_t *dst, int src_size); - -void rgb64tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb64tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb64to48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb64to48_bswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48tobgr64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48tobgr64_bswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48to64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb48to64_bswap(const uint8_t *src, uint8_t *dst, int src_size); -void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size); -void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size); -void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size); -void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size); -void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size); -void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size); -void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size); -void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size); -void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size); -void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size); -void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size); -void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); + +extern void (*ff_shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_shuffle_bytes_1230)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_shuffle_bytes_3012)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*ff_shuffle_bytes_3210)(const uint8_t *src, uint8_t *dst, int src_size); + +void ff_rgb64tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb64tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb64to48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb64to48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48tobgr64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48tobgr64_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48to64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb48to64_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb24to32(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb32to24(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb16to24(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb15to24(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size); +void ff_rgb12to15(const uint8_t *src, uint8_t *dst, int src_size); void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, int lumStride, @@ -87,39 +87,39 @@ void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, * Height should be a multiple of 2 and width should be a multiple of 16. * (If this is a problem for anyone then tell me, and I will fix it.) */ -extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); +extern void (*ff_yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); /** * Width should be a multiple of 16. */ -extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); +extern void (*ff_yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); /** * Height should be a multiple of 2 and width should be a multiple of 16. * (If this is a problem for anyone then tell me, and I will fix it.) */ -extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, - int width, int height, - int lumStride, int chromStride, int srcStride); +extern void (*ff_yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + int width, int height, + int lumStride, int chromStride, int srcStride); /** * Height should be a multiple of 2 and width should be a multiple of 16. * (If this is a problem for anyone then tell me, and I will fix it.) */ -extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); +extern void (*ff_yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); /** * Width should be a multiple of 16. */ -extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, - int width, int height, - int lumStride, int chromStride, int dstStride); +extern void (*ff_yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); /** * Height should be a multiple of 2 and width should be a multiple of 2. @@ -131,45 +131,45 @@ extern void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, int width, int height, int lumStride, int chromStride, int srcStride, int32_t *rgb2yuv); -extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, - int srcStride, int dstStride); - -extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, - int width, int height, int src1Stride, - int src2Stride, int dstStride); - -extern void (*deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, - int width, int height, int srcStride, - int dst1Stride, int dst2Stride); - -extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, - uint8_t *dst1, uint8_t *dst2, - int width, int height, - int srcStride1, int srcStride2, - int dstStride1, int dstStride2); - -extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, - uint8_t *dst, - int width, int height, - int srcStride1, int srcStride2, - int srcStride3, int dstStride); - -extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, - int width, int height, - int lumStride, int chromStride, int srcStride); -extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, - int width, int height, - int lumStride, int chromStride, int srcStride); -extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, - int width, int height, - int lumStride, int chromStride, int srcStride); -extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, - int width, int height, - int lumStride, int chromStride, int srcStride); +extern void (*ff_planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, + int srcStride, int dstStride); + +extern void (*ff_interleave_bytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, + int width, int height, int src1Stride, + int src2Stride, int dstStride); + +extern void (*ff_deinterleave_bytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, + int width, int height, int srcStride, + int dst1Stride, int dst2Stride); + +extern void (*ff_vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, + uint8_t *dst1, uint8_t *dst2, + int width, int height, + int srcStride1, int srcStride2, + int dstStride1, int dstStride2); + +extern void (*ff_yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, + uint8_t *dst, + int width, int height, + int srcStride1, int srcStride2, + int srcStride3, int dstStride); + +extern void (*ff_uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*ff_uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*ff_yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*ff_yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); void ff_sws_rgb2rgb_init(void); -void rgb2rgb_init_aarch64(void); -void rgb2rgb_init_x86(void); +void ff_rgb2rgb_init_aarch64(void); +void ff_rgb2rgb_init_x86(void); #endif /* SWSCALE_RGB2RGB_H */ diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 42c69801ba..133928d32c 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -707,9 +707,9 @@ void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, } } -static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2, - uint8_t *dest, int width, int height, - int src1Stride, int src2Stride, int dstStride) +static void interleave_bytes_c(const uint8_t *src1, const uint8_t *src2, + uint8_t *dest, int width, int height, + int src1Stride, int src2Stride, int dstStride) { int h; @@ -725,9 +725,9 @@ static void interleaveBytes_c(const uint8_t *src1, const uint8_t *src2, } } -static void deinterleaveBytes_c(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, - int width, int height, int srcStride, - int dst1Stride, int dst2Stride) +static void deinterleave_bytes_c(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, + int width, int height, int srcStride, + int dst1Stride, int dst2Stride) { int h; @@ -946,47 +946,47 @@ static void uyvytoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, static av_cold void rgb2rgb_init_c(void) { - rgb15to16 = rgb15to16_c; - rgb15tobgr24 = rgb15tobgr24_c; - rgb15to32 = rgb15to32_c; - rgb16tobgr24 = rgb16tobgr24_c; - rgb16to32 = rgb16to32_c; - rgb16to15 = rgb16to15_c; - rgb24tobgr16 = rgb24tobgr16_c; - rgb24tobgr15 = rgb24tobgr15_c; - rgb24tobgr32 = rgb24tobgr32_c; - rgb32to16 = rgb32to16_c; - rgb32to15 = rgb32to15_c; - rgb32tobgr24 = rgb32tobgr24_c; - rgb24to15 = rgb24to15_c; - rgb24to16 = rgb24to16_c; - rgb24tobgr24 = rgb24tobgr24_c; + ff_rgb15to16 = rgb15to16_c; + ff_rgb15tobgr24 = rgb15tobgr24_c; + ff_rgb15to32 = rgb15to32_c; + ff_rgb16tobgr24 = rgb16tobgr24_c; + ff_rgb16to32 = rgb16to32_c; + ff_rgb16to15 = rgb16to15_c; + ff_rgb24tobgr16 = rgb24tobgr16_c; + ff_rgb24tobgr15 = rgb24tobgr15_c; + ff_rgb24tobgr32 = rgb24tobgr32_c; + ff_rgb32to16 = rgb32to16_c; + ff_rgb32to15 = rgb32to15_c; + ff_rgb32tobgr24 = rgb32tobgr24_c; + ff_rgb24to15 = rgb24to15_c; + ff_rgb24to16 = rgb24to16_c; + ff_rgb24tobgr24 = rgb24tobgr24_c; #if HAVE_BIGENDIAN - shuffle_bytes_0321 = shuffle_bytes_2103_c; - shuffle_bytes_2103 = shuffle_bytes_0321_c; + ff_shuffle_bytes_0321 = shuffle_bytes_2103_c; + ff_shuffle_bytes_2103 = shuffle_bytes_0321_c; #else - shuffle_bytes_0321 = shuffle_bytes_0321_c; - shuffle_bytes_2103 = shuffle_bytes_2103_c; + ff_shuffle_bytes_0321 = shuffle_bytes_0321_c; + ff_shuffle_bytes_2103 = shuffle_bytes_2103_c; #endif - shuffle_bytes_1230 = shuffle_bytes_1230_c; - shuffle_bytes_3012 = shuffle_bytes_3012_c; - shuffle_bytes_3210 = shuffle_bytes_3210_c; - rgb32tobgr16 = rgb32tobgr16_c; - rgb32tobgr15 = rgb32tobgr15_c; - yv12toyuy2 = yv12toyuy2_c; - yv12touyvy = yv12touyvy_c; - yuv422ptoyuy2 = yuv422ptoyuy2_c; - yuv422ptouyvy = yuv422ptouyvy_c; - yuy2toyv12 = yuy2toyv12_c; - planar2x = planar2x_c; - ff_rgb24toyv12 = ff_rgb24toyv12_c; - interleaveBytes = interleaveBytes_c; - deinterleaveBytes = deinterleaveBytes_c; - vu9_to_vu12 = vu9_to_vu12_c; - yvu9_to_yuy2 = yvu9_to_yuy2_c; - - uyvytoyuv420 = uyvytoyuv420_c; - uyvytoyuv422 = uyvytoyuv422_c; - yuyvtoyuv420 = yuyvtoyuv420_c; - yuyvtoyuv422 = yuyvtoyuv422_c; + ff_shuffle_bytes_1230 = shuffle_bytes_1230_c; + ff_shuffle_bytes_3012 = shuffle_bytes_3012_c; + ff_shuffle_bytes_3210 = shuffle_bytes_3210_c; + ff_rgb32tobgr16 = rgb32tobgr16_c; + ff_rgb32tobgr15 = rgb32tobgr15_c; + ff_yv12toyuy2 = yv12toyuy2_c; + ff_yv12touyvy = yv12touyvy_c; + ff_yuv422ptoyuy2 = yuv422ptoyuy2_c; + ff_yuv422ptouyvy = yuv422ptouyvy_c; + ff_yuy2toyv12 = yuy2toyv12_c; + ff_planar2x = planar2x_c; + ff_rgb24toyv12 = ff_rgb24toyv12_c; + ff_interleave_bytes = interleave_bytes_c; + ff_deinterleave_bytes = deinterleave_bytes_c; + ff_vu9_to_vu12 = vu9_to_vu12_c; + ff_yvu9_to_yuy2 = yvu9_to_yuy2_c; + + ff_uyvytoyuv420 = uyvytoyuv420_c; + ff_uyvytoyuv422 = uyvytoyuv422_c; + ff_yuyvtoyuv420 = yuyvtoyuv420_c; + ff_yuyvtoyuv422 = yuyvtoyuv422_c; } diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index c4dd8a4d83..9ae311c9b9 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -151,11 +151,11 @@ static int planarToNv12Wrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->dstFormat == AV_PIX_FMT_NV12) - interleaveBytes(src[1], src[2], dst, c->chrSrcW, (srcSliceH + 1) / 2, - srcStride[1], srcStride[2], dstStride[1]); + ff_interleave_bytes(src[1], src[2], dst, c->chrSrcW, (srcSliceH + 1) / 2, + srcStride[1], srcStride[2], dstStride[1]); else - interleaveBytes(src[2], src[1], dst, c->chrSrcW, (srcSliceH + 1) / 2, - srcStride[2], srcStride[1], dstStride[1]); + ff_interleave_bytes(src[2], src[1], dst, c->chrSrcW, (srcSliceH + 1) / 2, + srcStride[2], srcStride[1], dstStride[1]); return srcSliceH; } @@ -172,11 +172,11 @@ static int nv12ToPlanarWrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->srcFormat == AV_PIX_FMT_NV12) - deinterleaveBytes(src[1], dst1, dst2, c->chrSrcW, (srcSliceH + 1) / 2, - srcStride[1], dstStride[1], dstStride[2]); + ff_deinterleave_bytes(src[1], dst1, dst2, c->chrSrcW, (srcSliceH + 1) / 2, + srcStride[1], dstStride[1], dstStride[2]); else - deinterleaveBytes(src[1], dst2, dst1, c->chrSrcW, (srcSliceH + 1) / 2, - srcStride[1], dstStride[2], dstStride[1]); + ff_deinterleave_bytes(src[1], dst2, dst1, c->chrSrcW, (srcSliceH + 1) / 2, + srcStride[1], dstStride[2], dstStride[1]); return srcSliceH; } @@ -192,11 +192,11 @@ static int planarToNv24Wrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->dstFormat == AV_PIX_FMT_NV24) - interleaveBytes(src[1], src[2], dst, c->chrSrcW, srcSliceH, - srcStride[1], srcStride[2], dstStride[1]); + ff_interleave_bytes(src[1], src[2], dst, c->chrSrcW, srcSliceH, + srcStride[1], srcStride[2], dstStride[1]); else - interleaveBytes(src[2], src[1], dst, c->chrSrcW, srcSliceH, - srcStride[2], srcStride[1], dstStride[1]); + ff_interleave_bytes(src[2], src[1], dst, c->chrSrcW, srcSliceH, + srcStride[2], srcStride[1], dstStride[1]); return srcSliceH; } @@ -213,11 +213,11 @@ static int nv24ToPlanarWrapper(SwsContext *c, const uint8_t *src[], dstParam[0], dstStride[0]); if (c->srcFormat == AV_PIX_FMT_NV24) - deinterleaveBytes(src[1], dst1, dst2, c->chrSrcW, srcSliceH, - srcStride[1], dstStride[1], dstStride[2]); + ff_deinterleave_bytes(src[1], dst1, dst2, c->chrSrcW, srcSliceH, + srcStride[1], dstStride[1], dstStride[2]); else - deinterleaveBytes(src[1], dst2, dst1, c->chrSrcW, srcSliceH, - srcStride[1], dstStride[2], dstStride[1]); + ff_deinterleave_bytes(src[1], dst2, dst1, c->chrSrcW, srcSliceH, + srcStride[1], dstStride[2], dstStride[1]); return srcSliceH; } @@ -330,8 +330,8 @@ static int planarToYuy2Wrapper(SwsContext *c, const uint8_t *src[], { uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], - srcStride[1], dstStride[0]); + ff_yv12toyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + srcStride[0], srcStride[1], dstStride[0]); return srcSliceH; } @@ -342,8 +342,8 @@ static int planarToUyvyWrapper(SwsContext *c, const uint8_t *src[], { uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yv12touyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], - srcStride[1], dstStride[0]); + ff_yv12touyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + srcStride[0], srcStride[1], dstStride[0]); return srcSliceH; } @@ -354,8 +354,8 @@ static int yuv422pToYuy2Wrapper(SwsContext *c, const uint8_t *src[], { uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yuv422ptoyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], - srcStride[1], dstStride[0]); + ff_yuv422ptoyuy2(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + srcStride[0], srcStride[1], dstStride[0]); return srcSliceH; } @@ -366,8 +366,8 @@ static int yuv422pToUyvyWrapper(SwsContext *c, const uint8_t *src[], { uint8_t *dst = dstParam[0] + dstStride[0] * srcSliceY; - yuv422ptouyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, srcStride[0], - srcStride[1], dstStride[0]); + ff_yuv422ptouyvy(src[0], src[1], src[2], dst, c->srcW, srcSliceH, + srcStride[0], srcStride[1], dstStride[0]); return srcSliceH; } @@ -380,8 +380,8 @@ static int yuyvToYuv420Wrapper(SwsContext *c, const uint8_t *src[], uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY / 2; uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY / 2; - yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], - dstStride[1], srcStride[0]); + ff_yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, + dstStride[0], dstStride[1], srcStride[0]); if (dstParam[3]) fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); @@ -397,8 +397,8 @@ static int yuyvToYuv422Wrapper(SwsContext *c, const uint8_t *src[], uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY; uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY; - yuyvtoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], - dstStride[1], srcStride[0]); + ff_yuyvtoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, + dstStride[0], dstStride[1], srcStride[0]); return srcSliceH; } @@ -411,8 +411,8 @@ static int uyvyToYuv420Wrapper(SwsContext *c, const uint8_t *src[], uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY / 2; uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY / 2; - uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], - dstStride[1], srcStride[0]); + ff_uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, + dstStride[0], dstStride[1], srcStride[0]); if (dstParam[3]) fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); @@ -428,8 +428,8 @@ static int uyvyToYuv422Wrapper(SwsContext *c, const uint8_t *src[], uint8_t *udst = dstParam[1] + dstStride[1] * srcSliceY; uint8_t *vdst = dstParam[2] + dstStride[2] * srcSliceY; - uyvytoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], - dstStride[1], srcStride[0]); + ff_uyvytoyuv422(ydst, udst, vdst, src[0], c->srcW, srcSliceH, + dstStride[0], dstStride[1], srcStride[0]); return srcSliceH; } @@ -1472,96 +1472,96 @@ static rgbConvFn findRgbConvFn(SwsContext *c) if ( CONV_IS(ABGR, RGBA) || CONV_IS(ARGB, BGRA) || CONV_IS(BGRA, ARGB) - || CONV_IS(RGBA, ABGR)) conv = shuffle_bytes_3210; + || CONV_IS(RGBA, ABGR)) conv = ff_shuffle_bytes_3210; else if (CONV_IS(ABGR, ARGB) - || CONV_IS(ARGB, ABGR)) conv = shuffle_bytes_0321; + || CONV_IS(ARGB, ABGR)) conv = ff_shuffle_bytes_0321; else if (CONV_IS(ABGR, BGRA) - || CONV_IS(ARGB, RGBA)) conv = shuffle_bytes_1230; + || CONV_IS(ARGB, RGBA)) conv = ff_shuffle_bytes_1230; else if (CONV_IS(BGRA, RGBA) - || CONV_IS(RGBA, BGRA)) conv = shuffle_bytes_2103; + || CONV_IS(RGBA, BGRA)) conv = ff_shuffle_bytes_2103; else if (CONV_IS(BGRA, ABGR) - || CONV_IS(RGBA, ARGB)) conv = shuffle_bytes_3012; + || CONV_IS(RGBA, ARGB)) conv = ff_shuffle_bytes_3012; } else if (isRGB48(srcFormat) && isRGB48(dstFormat)) { if (CONV_IS(RGB48LE, BGR48LE) || CONV_IS(BGR48LE, RGB48LE) || CONV_IS(RGB48BE, BGR48BE) - || CONV_IS(BGR48BE, RGB48BE)) conv = rgb48tobgr48_nobswap; + || CONV_IS(BGR48BE, RGB48BE)) conv = ff_rgb48tobgr48_nobswap; else if (CONV_IS(RGB48LE, BGR48BE) || CONV_IS(BGR48LE, RGB48BE) || CONV_IS(RGB48BE, BGR48LE) - || CONV_IS(BGR48BE, RGB48LE)) conv = rgb48tobgr48_bswap; + || CONV_IS(BGR48BE, RGB48LE)) conv = ff_rgb48tobgr48_bswap; } else if (isRGB48(srcFormat) && isRGBA64(dstFormat)) { if (CONV_IS(RGB48LE, BGRA64LE) || CONV_IS(BGR48LE, RGBA64LE) || CONV_IS(RGB48BE, BGRA64BE) - || CONV_IS(BGR48BE, RGBA64BE)) conv = rgb48tobgr64_nobswap; + || CONV_IS(BGR48BE, RGBA64BE)) conv = ff_rgb48tobgr64_nobswap; else if (CONV_IS(RGB48LE, BGRA64BE) || CONV_IS(BGR48LE, RGBA64BE) || CONV_IS(RGB48BE, BGRA64LE) - || CONV_IS(BGR48BE, RGBA64LE)) conv = rgb48tobgr64_bswap; + || CONV_IS(BGR48BE, RGBA64LE)) conv = ff_rgb48tobgr64_bswap; if (CONV_IS(RGB48LE, RGBA64LE) || CONV_IS(BGR48LE, BGRA64LE) || CONV_IS(RGB48BE, RGBA64BE) - || CONV_IS(BGR48BE, BGRA64BE)) conv = rgb48to64_nobswap; + || CONV_IS(BGR48BE, BGRA64BE)) conv = ff_rgb48to64_nobswap; else if (CONV_IS(RGB48LE, RGBA64BE) || CONV_IS(BGR48LE, BGRA64BE) || CONV_IS(RGB48BE, RGBA64LE) - || CONV_IS(BGR48BE, BGRA64LE)) conv = rgb48to64_bswap; + || CONV_IS(BGR48BE, BGRA64LE)) conv = ff_rgb48to64_bswap; } else if (isRGBA64(srcFormat) && isRGB48(dstFormat)) { if (CONV_IS(RGBA64LE, BGR48LE) || CONV_IS(BGRA64LE, RGB48LE) || CONV_IS(RGBA64BE, BGR48BE) - || CONV_IS(BGRA64BE, RGB48BE)) conv = rgb64tobgr48_nobswap; + || CONV_IS(BGRA64BE, RGB48BE)) conv = ff_rgb64tobgr48_nobswap; else if (CONV_IS(RGBA64LE, BGR48BE) || CONV_IS(BGRA64LE, RGB48BE) || CONV_IS(RGBA64BE, BGR48LE) - || CONV_IS(BGRA64BE, RGB48LE)) conv = rgb64tobgr48_bswap; + || CONV_IS(BGRA64BE, RGB48LE)) conv = ff_rgb64tobgr48_bswap; else if (CONV_IS(RGBA64LE, RGB48LE) || CONV_IS(BGRA64LE, BGR48LE) || CONV_IS(RGBA64BE, RGB48BE) - || CONV_IS(BGRA64BE, BGR48BE)) conv = rgb64to48_nobswap; + || CONV_IS(BGRA64BE, BGR48BE)) conv = ff_rgb64to48_nobswap; else if (CONV_IS(RGBA64LE, RGB48BE) || CONV_IS(BGRA64LE, BGR48BE) || CONV_IS(RGBA64BE, RGB48LE) - || CONV_IS(BGRA64BE, BGR48LE)) conv = rgb64to48_bswap; + || CONV_IS(BGRA64BE, BGR48LE)) conv = ff_rgb64to48_bswap; } else /* BGR -> BGR */ if ((isBGRinInt(srcFormat) && isBGRinInt(dstFormat)) || (isRGBinInt(srcFormat) && isRGBinInt(dstFormat))) { switch (srcId | (dstId << 16)) { - case 0x000F000C: conv = rgb12to15; break; - case 0x000F0010: conv = rgb16to15; break; - case 0x000F0018: conv = rgb24to15; break; - case 0x000F0020: conv = rgb32to15; break; - case 0x0010000F: conv = rgb15to16; break; - case 0x00100018: conv = rgb24to16; break; - case 0x00100020: conv = rgb32to16; break; - case 0x0018000F: conv = rgb15to24; break; - case 0x00180010: conv = rgb16to24; break; - case 0x00180020: conv = rgb32to24; break; - case 0x0020000F: conv = rgb15to32; break; - case 0x00200010: conv = rgb16to32; break; - case 0x00200018: conv = rgb24to32; break; + case 0x000F000C: conv = ff_rgb12to15; break; + case 0x000F0010: conv = ff_rgb16to15; break; + case 0x000F0018: conv = ff_rgb24to15; break; + case 0x000F0020: conv = ff_rgb32to15; break; + case 0x0010000F: conv = ff_rgb15to16; break; + case 0x00100018: conv = ff_rgb24to16; break; + case 0x00100020: conv = ff_rgb32to16; break; + case 0x0018000F: conv = ff_rgb15to24; break; + case 0x00180010: conv = ff_rgb16to24; break; + case 0x00180020: conv = ff_rgb32to24; break; + case 0x0020000F: conv = ff_rgb15to32; break; + case 0x00200010: conv = ff_rgb16to32; break; + case 0x00200018: conv = ff_rgb24to32; break; } } else if ((isBGRinInt(srcFormat) && isRGBinInt(dstFormat)) || (isRGBinInt(srcFormat) && isBGRinInt(dstFormat))) { switch (srcId | (dstId << 16)) { - case 0x000C000C: conv = rgb12tobgr12; break; - case 0x000F000F: conv = rgb15tobgr15; break; - case 0x000F0010: conv = rgb16tobgr15; break; - case 0x000F0018: conv = rgb24tobgr15; break; - case 0x000F0020: conv = rgb32tobgr15; break; - case 0x0010000F: conv = rgb15tobgr16; break; - case 0x00100010: conv = rgb16tobgr16; break; - case 0x00100018: conv = rgb24tobgr16; break; - case 0x00100020: conv = rgb32tobgr16; break; - case 0x0018000F: conv = rgb15tobgr24; break; - case 0x00180010: conv = rgb16tobgr24; break; - case 0x00180018: conv = rgb24tobgr24; break; - case 0x00180020: conv = rgb32tobgr24; break; - case 0x0020000F: conv = rgb15tobgr32; break; - case 0x00200010: conv = rgb16tobgr32; break; - case 0x00200018: conv = rgb24tobgr32; break; + case 0x000C000C: conv = ff_rgb12tobgr12; break; + case 0x000F000F: conv = ff_rgb15tobgr15; break; + case 0x000F0010: conv = ff_rgb16tobgr15; break; + case 0x000F0018: conv = ff_rgb24tobgr15; break; + case 0x000F0020: conv = ff_rgb32tobgr15; break; + case 0x0010000F: conv = ff_rgb15tobgr16; break; + case 0x00100010: conv = ff_rgb16tobgr16; break; + case 0x00100018: conv = ff_rgb24tobgr16; break; + case 0x00100020: conv = ff_rgb32tobgr16; break; + case 0x0018000F: conv = ff_rgb15tobgr24; break; + case 0x00180010: conv = ff_rgb16tobgr24; break; + case 0x00180018: conv = ff_rgb24tobgr24; break; + case 0x00180020: conv = ff_rgb32tobgr24; break; + case 0x0020000F: conv = ff_rgb15tobgr32; break; + case 0x00200010: conv = ff_rgb16tobgr32; break; + case 0x00200018: conv = ff_rgb24tobgr32; break; } } @@ -1662,10 +1662,10 @@ static int yvu9ToYv12Wrapper(SwsContext *c, const uint8_t *src[], copyPlane(src[0], srcStride[0], srcSliceY, srcSliceH, c->srcW, dst[0], dstStride[0]); - planar2x(src[1], dst[1] + dstStride[1] * (srcSliceY >> 1), c->chrSrcW, - srcSliceH >> 2, srcStride[1], dstStride[1]); - planar2x(src[2], dst[2] + dstStride[2] * (srcSliceY >> 1), c->chrSrcW, - srcSliceH >> 2, srcStride[2], dstStride[2]); + ff_planar2x(src[1], dst[1] + dstStride[1] * (srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[1], dstStride[1]); + ff_planar2x(src[2], dst[2] + dstStride[2] * (srcSliceY >> 1), c->chrSrcW, + srcSliceH >> 2, srcStride[2], dstStride[2]); if (dst[3]) fillPlane(dst[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255); return srcSliceH; diff --git a/libswscale/tests/colorspace.c b/libswscale/tests/colorspace.c index d1eddc82bf..589b2260b4 100644 --- a/libswscale/tests/colorspace.c +++ b/libswscale/tests/colorspace.c @@ -55,42 +55,42 @@ int main(int argc, char **argv) const char *name; void (*func)(const uint8_t *src, uint8_t *dst, int src_size); } func_info[] = { - FUNC(2, 2, rgb12to15), - FUNC(2, 2, rgb15to16), - FUNC(2, 3, rgb15to24), - FUNC(2, 4, rgb15to32), - FUNC(2, 3, rgb16to24), - FUNC(2, 4, rgb16to32), - FUNC(3, 2, rgb24to15), - FUNC(3, 2, rgb24to16), - FUNC(3, 4, rgb24to32), - FUNC(4, 2, rgb32to15), - FUNC(4, 2, rgb32to16), - FUNC(4, 3, rgb32to24), - FUNC(2, 2, rgb16to15), - FUNC(2, 2, rgb12tobgr12), - FUNC(2, 2, rgb15tobgr15), - FUNC(2, 2, rgb15tobgr16), - FUNC(2, 3, rgb15tobgr24), - FUNC(2, 4, rgb15tobgr32), - FUNC(2, 2, rgb16tobgr15), - FUNC(2, 2, rgb16tobgr16), - FUNC(2, 3, rgb16tobgr24), - FUNC(2, 4, rgb16tobgr32), - FUNC(3, 2, rgb24tobgr15), - FUNC(3, 2, rgb24tobgr16), - FUNC(3, 3, rgb24tobgr24), - FUNC(3, 4, rgb24tobgr32), - FUNC(4, 2, rgb32tobgr15), - FUNC(4, 2, rgb32tobgr16), - FUNC(4, 3, rgb32tobgr24), - FUNC(4, 4, shuffle_bytes_2103), /* rgb32tobgr32 */ - FUNC(6, 6, rgb48tobgr48_nobswap), - FUNC(6, 6, rgb48tobgr48_bswap), - FUNC(8, 6, rgb64to48_nobswap), - FUNC(8, 6, rgb64to48_bswap), - FUNC(8, 6, rgb64tobgr48_nobswap), - FUNC(8, 6, rgb64tobgr48_bswap), + FUNC(2, 2, ff_rgb12to15), + FUNC(2, 2, ff_rgb15to16), + FUNC(2, 3, ff_rgb15to24), + FUNC(2, 4, ff_rgb15to32), + FUNC(2, 3, ff_rgb16to24), + FUNC(2, 4, ff_rgb16to32), + FUNC(3, 2, ff_rgb24to15), + FUNC(3, 2, ff_rgb24to16), + FUNC(3, 4, ff_rgb24to32), + FUNC(4, 2, ff_rgb32to15), + FUNC(4, 2, ff_rgb32to16), + FUNC(4, 3, ff_rgb32to24), + FUNC(2, 2, ff_rgb16to15), + FUNC(2, 2, ff_rgb12tobgr12), + FUNC(2, 2, ff_rgb15tobgr15), + FUNC(2, 2, ff_rgb15tobgr16), + FUNC(2, 3, ff_rgb15tobgr24), + FUNC(2, 4, ff_rgb15tobgr32), + FUNC(2, 2, ff_rgb16tobgr15), + FUNC(2, 2, ff_rgb16tobgr16), + FUNC(2, 3, ff_rgb16tobgr24), + FUNC(2, 4, ff_rgb16tobgr32), + FUNC(3, 2, ff_rgb24tobgr15), + FUNC(3, 2, ff_rgb24tobgr16), + FUNC(3, 3, ff_rgb24tobgr24), + FUNC(3, 4, ff_rgb24tobgr32), + FUNC(4, 2, ff_rgb32tobgr15), + FUNC(4, 2, ff_rgb32tobgr16), + FUNC(4, 3, ff_rgb32tobgr24), + FUNC(4, 4, ff_shuffle_bytes_2103), /* rgb32tobgr32 */ + FUNC(6, 6, ff_rgb48tobgr48_nobswap), + FUNC(6, 6, ff_rgb48tobgr48_bswap), + FUNC(8, 6, ff_rgb64to48_nobswap), + FUNC(8, 6, ff_rgb64to48_bswap), + FUNC(8, 6, ff_rgb64tobgr48_nobswap), + FUNC(8, 6, ff_rgb64tobgr48_bswap), FUNC(0, 0, NULL) }; int width; diff --git a/libswscale/utils.c b/libswscale/utils.c index 352a8ed116..e85c3508c5 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1200,7 +1200,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, cpu_flags = av_get_cpu_flags(); flags = c->flags; emms_c(); - if (!rgb15to16) + if (!ff_rgb15to16) ff_sws_rgb2rgb_init(); unscaled = (srcW == dstW && srcH == dstH); diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c index 4344b5f714..bd5c42e272 100644 --- a/libswscale/x86/rgb2rgb.c +++ b/libswscale/x86/rgb2rgb.c @@ -162,7 +162,7 @@ void ff_uyvytoyuv422_avx(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int lumStride, int chromStride, int srcStride); #endif -av_cold void rgb2rgb_init_x86(void) +av_cold void ff_rgb2rgb_init_x86(void) { int cpu_flags = av_get_cpu_flags(); @@ -180,23 +180,23 @@ av_cold void rgb2rgb_init_x86(void) #endif /* HAVE_INLINE_ASM */ if (EXTERNAL_MMXEXT(cpu_flags)) { - shuffle_bytes_2103 = ff_shuffle_bytes_2103_mmxext; + ff_shuffle_bytes_2103 = ff_shuffle_bytes_2103_mmxext; } if (EXTERNAL_SSE2(cpu_flags)) { #if ARCH_X86_64 - uyvytoyuv422 = ff_uyvytoyuv422_sse2; + ff_uyvytoyuv422 = ff_uyvytoyuv422_sse2; #endif } if (EXTERNAL_SSSE3(cpu_flags)) { - shuffle_bytes_0321 = ff_shuffle_bytes_0321_ssse3; - shuffle_bytes_2103 = ff_shuffle_bytes_2103_ssse3; - shuffle_bytes_1230 = ff_shuffle_bytes_1230_ssse3; - shuffle_bytes_3012 = ff_shuffle_bytes_3012_ssse3; - shuffle_bytes_3210 = ff_shuffle_bytes_3210_ssse3; + ff_shuffle_bytes_0321 = ff_shuffle_bytes_0321_ssse3; + ff_shuffle_bytes_2103 = ff_shuffle_bytes_2103_ssse3; + ff_shuffle_bytes_1230 = ff_shuffle_bytes_1230_ssse3; + ff_shuffle_bytes_3012 = ff_shuffle_bytes_3012_ssse3; + ff_shuffle_bytes_3210 = ff_shuffle_bytes_3210_ssse3; } if (EXTERNAL_AVX(cpu_flags)) { #if ARCH_X86_64 - uyvytoyuv422 = ff_uyvytoyuv422_avx; + ff_uyvytoyuv422 = ff_uyvytoyuv422_avx; #endif } } diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index ae2469e663..87f365cacf 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -1823,9 +1823,9 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ #endif /* !COMPILE_TEMPLATE_SSE2 */ #if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX -static void RENAME(interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, - int width, int height, int src1Stride, - int src2Stride, int dstStride) +static void RENAME(interleave_bytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, + int width, int height, int src1Stride, + int src2Stride, int dstStride) { int h; @@ -1906,9 +1906,9 @@ void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src2, int w, uint32_t *unused2); -static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, - int width, int height, int srcStride, - int dst1Stride, int dst2Stride) +static void RENAME(deinterleave_bytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, + int width, int height, int srcStride, + int dst1Stride, int dst2Stride) { int h; @@ -2495,51 +2495,51 @@ static av_cold void RENAME(rgb2rgb_init)(void) { #if !COMPILE_TEMPLATE_SSE2 #if !COMPILE_TEMPLATE_AMD3DNOW - rgb15to16 = RENAME(rgb15to16); - rgb15tobgr24 = RENAME(rgb15tobgr24); - rgb15to32 = RENAME(rgb15to32); - rgb16tobgr24 = RENAME(rgb16tobgr24); - rgb16to32 = RENAME(rgb16to32); - rgb16to15 = RENAME(rgb16to15); - rgb24tobgr16 = RENAME(rgb24tobgr16); - rgb24tobgr15 = RENAME(rgb24tobgr15); - rgb24tobgr32 = RENAME(rgb24tobgr32); - rgb32to16 = RENAME(rgb32to16); - rgb32to15 = RENAME(rgb32to15); - rgb32tobgr24 = RENAME(rgb32tobgr24); - rgb24to15 = RENAME(rgb24to15); - rgb24to16 = RENAME(rgb24to16); - rgb24tobgr24 = RENAME(rgb24tobgr24); - rgb32tobgr16 = RENAME(rgb32tobgr16); - rgb32tobgr15 = RENAME(rgb32tobgr15); - yv12toyuy2 = RENAME(yv12toyuy2); - yv12touyvy = RENAME(yv12touyvy); - yuv422ptoyuy2 = RENAME(yuv422ptoyuy2); - yuv422ptouyvy = RENAME(yuv422ptouyvy); - yuy2toyv12 = RENAME(yuy2toyv12); - vu9_to_vu12 = RENAME(vu9_to_vu12); - yvu9_to_yuy2 = RENAME(yvu9_to_yuy2); - uyvytoyuv422 = RENAME(uyvytoyuv422); - yuyvtoyuv422 = RENAME(yuyvtoyuv422); + ff_rgb15to16 = RENAME(rgb15to16); + ff_rgb15tobgr24 = RENAME(rgb15tobgr24); + ff_rgb15to32 = RENAME(rgb15to32); + ff_rgb16tobgr24 = RENAME(rgb16tobgr24); + ff_rgb16to32 = RENAME(rgb16to32); + ff_rgb16to15 = RENAME(rgb16to15); + ff_rgb24tobgr16 = RENAME(rgb24tobgr16); + ff_rgb24tobgr15 = RENAME(rgb24tobgr15); + ff_rgb24tobgr32 = RENAME(rgb24tobgr32); + ff_rgb32to16 = RENAME(rgb32to16); + ff_rgb32to15 = RENAME(rgb32to15); + ff_rgb32tobgr24 = RENAME(rgb32tobgr24); + ff_rgb24to15 = RENAME(rgb24to15); + ff_rgb24to16 = RENAME(rgb24to16); + ff_rgb24tobgr24 = RENAME(rgb24tobgr24); + ff_rgb32tobgr16 = RENAME(rgb32tobgr16); + ff_rgb32tobgr15 = RENAME(rgb32tobgr15); + ff_yv12toyuy2 = RENAME(yv12toyuy2); + ff_yv12touyvy = RENAME(yv12touyvy); + ff_yuv422ptoyuy2 = RENAME(yuv422ptoyuy2); + ff_yuv422ptouyvy = RENAME(yuv422ptouyvy); + ff_yuy2toyv12 = RENAME(yuy2toyv12); + ff_vu9_to_vu12 = RENAME(vu9_to_vu12); + ff_yvu9_to_yuy2 = RENAME(yvu9_to_yuy2); + ff_uyvytoyuv422 = RENAME(uyvytoyuv422); + ff_yuyvtoyuv422 = RENAME(yuyvtoyuv422); #endif /* !COMPILE_TEMPLATE_AMD3DNOW */ #if COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW - planar2x = RENAME(planar2x); + ff_planar2x = RENAME(planar2x); #endif /* COMPILE_TEMPLATE_MMXEXT || COMPILE_TEMPLATE_AMD3DNOW */ #if HAVE_7REGS - ff_rgb24toyv12 = RENAME(rgb24toyv12); + ff_rgb24toyv12 = RENAME(rgb24toyv12); #endif /* HAVE_7REGS */ - yuyvtoyuv420 = RENAME(yuyvtoyuv420); - uyvytoyuv420 = RENAME(uyvytoyuv420); + ff_yuyvtoyuv420 = RENAME(yuyvtoyuv420); + ff_uyvytoyuv420 = RENAME(uyvytoyuv420); #endif /* !COMPILE_TEMPLATE_SSE2 */ #if !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX - interleaveBytes = RENAME(interleaveBytes); + ff_interleave_bytes = RENAME(interleave_bytes); #endif /* !COMPILE_TEMPLATE_AMD3DNOW && !COMPILE_TEMPLATE_AVX */ #if !COMPILE_TEMPLATE_AVX || HAVE_AVX_EXTERNAL #if !COMPILE_TEMPLATE_AMD3DNOW && (ARCH_X86_32 || COMPILE_TEMPLATE_SSE2) && COMPILE_TEMPLATE_MMXEXT == COMPILE_TEMPLATE_SSE2 && HAVE_X86ASM - deinterleaveBytes = RENAME(deinterleaveBytes); + ff_deinterleave_bytes = RENAME(deinterleave_bytes); #endif #endif } diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index c29b75d09b..2ab5e7ea13 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -89,7 +89,7 @@ static void check_uyvy_to_422p(void) randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT * 2); memcpy(src1, src0, MAX_STRIDE * MAX_HEIGHT * 2); - if (check_func(uyvytoyuv422, "uyvytoyuv422")) { + if (check_func(ff_uyvytoyuv422, "uyvytoyuv422")) { for (i = 0; i < 6; i ++) { memset(dst_y_0, 0, MAX_STRIDE * MAX_HEIGHT); memset(dst_y_1, 0, MAX_STRIDE * MAX_HEIGHT); @@ -131,7 +131,7 @@ static void check_interleave_bytes(void) randomize_buffers(src0, MAX_STRIDE * MAX_HEIGHT); randomize_buffers(src1, MAX_STRIDE * MAX_HEIGHT); - if (check_func(interleaveBytes, "interleave_bytes")) { + if (check_func(ff_interleave_bytes, "ff_interleave_bytes")) { for (int i = 0; i <= 16; i++) { // Try all widths [1,16], and try one random width. @@ -172,7 +172,7 @@ static void check_interleave_bytes(void) bench_new(src0, src1, dst1, 127, MAX_HEIGHT, MAX_STRIDE, MAX_STRIDE, 2*MAX_STRIDE); } - if (check_func(interleaveBytes, "interleave_bytes_aligned")) { + if (check_func(ff_interleave_bytes, "interleave_bytes_aligned")) { // Bench the function in a more typical case, with aligned // buffers and widths. bench_new(src0_buf, src1_buf, dst1_buf, 128, MAX_HEIGHT, @@ -184,19 +184,19 @@ void checkasm_check_sw_rgb(void) { ff_sws_rgb2rgb_init(); - check_shuffle_bytes(shuffle_bytes_2103, "shuffle_bytes_2103"); + check_shuffle_bytes(ff_shuffle_bytes_2103, "shuffle_bytes_2103"); report("shuffle_bytes_2103"); - check_shuffle_bytes(shuffle_bytes_0321, "shuffle_bytes_0321"); + check_shuffle_bytes(ff_shuffle_bytes_0321, "shuffle_bytes_0321"); report("shuffle_bytes_0321"); - check_shuffle_bytes(shuffle_bytes_1230, "shuffle_bytes_1230"); + check_shuffle_bytes(ff_shuffle_bytes_1230, "shuffle_bytes_1230"); report("shuffle_bytes_1230"); - check_shuffle_bytes(shuffle_bytes_3012, "shuffle_bytes_3012"); + check_shuffle_bytes(ff_shuffle_bytes_3012, "shuffle_bytes_3012"); report("shuffle_bytes_3012"); - check_shuffle_bytes(shuffle_bytes_3210, "shuffle_bytes_3210"); + check_shuffle_bytes(ff_shuffle_bytes_3210, "shuffle_bytes_3210"); report("shuffle_bytes_3210"); check_uyvy_to_422p();