From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id ED22A42BB4 for ; Tue, 31 May 2022 10:03:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9016D68B6A1; Tue, 31 May 2022 13:03:22 +0300 (EEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 131E868B656 for ; Tue, 31 May 2022 13:03:16 +0300 (EEST) Received: by mail-lf1-f50.google.com with SMTP id j10so20519954lfe.12 for ; Tue, 31 May 2022 03:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Qtar1IUAZxFOEmIsHOELqlYPi2U/NtUYt/jt/wybJJ8=; b=dUxEGRVyjUDsvDwoLwMFyTrEsV6SutK7mUao6q1pJE93UGrdLyA7kz73XoH+WN88hc oSz0lK/5ZNkC64wGlVf50Cacg67DqmfS5FB4uQL2ec6tA4H3EyUllQWHJJ599TXSiP71 VrV9Cdo8PmF0rjQuVL/i1sK1WrB3+iAIGzM6PPSpzOodso8U8MxQSMN8ZPiApBQCVnoD WUbUxVzbl2/MvuEAsKVw6h4/fcEblG9x4A9aG7W1EMqvZmHqGWHyp/TLKtt1JtmeahEz 0pCF1r6Fbnaah5g/G5nRDnOdkca0P9GwjI0TWEltg61tYbUc/8FFtWLC9id1hI1v+j/Q 256A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Qtar1IUAZxFOEmIsHOELqlYPi2U/NtUYt/jt/wybJJ8=; b=kETXnS5MFqghzzglWXIw9iykQGlAKnSLeTBvamQ7U64MCfk8iGYCtoAtgElzf8FEiq 6nTfOtNvrTr5kvZaLcWUrsdg9zM1rlBbUa/VJEsnMT5zY+rOHryI2kfd69NFDJFNDu+4 5jDeXKEmCBdRDe8gUpMCx+CVHoz74Jk7o6WoOKFgnVEL6rHoUKA2ya5x4JWxpZNviDQW WzH3617tj+3auXmmA6pUzsiLaBR1qFgbJhPUrX+3b8CLJRx7PSPnQpzqmC9EtDHV4t1G D8nUuSjJHU5nUuSerdNNZe9rbgRfPpMvxezuSfWqPzXClPVLXLK+I69zx1ohMMufEUO2 OJoQ== X-Gm-Message-State: AOAM531TMWnCkZWWEWjn2F0e7jiFRVNN+pTQv6L+UB/ZLRdimnk6PSo8 WIA7QPhLifyyahWA7pAdcqRRKSoMORo6QC3LY/YCrG+DstCfr8OH X-Google-Smtp-Source: ABdhPJxFGh296M/HAl77EMgBbD7nEMcaSLfI58qqe5piDCkTkwmUP1t1qe/G2lN0OX77mPWQib0lbPjWIb1SnQdPBKM= X-Received: by 2002:a05:6512:2306:b0:477:cb31:d9d1 with SMTP id o6-20020a056512230600b00477cb31d9d1mr41693806lfu.183.1653991395006; Tue, 31 May 2022 03:03:15 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?0JDQu9C10LrRgdCw0L3QtNGA?= Date: Tue, 31 May 2022 13:03:00 +0300 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [FFmpeg-devel] Weird cross platform support in ffmpeg X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: I tried to build ffmpeg 4.4 library and link with it and I received multiple unresolved references. I came across on unusual architecture in ffmpeg for multiple platforms.The library has many places with code like this: void foo() { // DO SOMETHING if (ARCH_MIPS) // maybe #if ARCH_MIPS (...) #endif should be used instead? foo_mips(...); if (ARCH_PPC) foo_ppc(c); if (ARCH_ARM) foo_arm(...); if (ARCH_AARCH64) foo_aarch64(...); } This code leads to linker errors because there is no any stub methods for other platforms. I observed root MakeFile, it optionally includes platform dependent code for each library (path like $(LIB_SUBDIR)/$(ARCH)/MakeFile) where each foo_ is defined. So, how does it work? In my opinion preprocessor directive #if should be used, otherwise we will receive unresolved reference on any platform. Maybe I missed something? because this code appears frequently for example: 1. utils.c : ff_yuv2rgb_init_tables_ppc 2. swscale_unscaled.c : ff_get_unscaled_swscale_ppc, ff_get_unscaled_swscale_arm, ff_get_unscaled_swscale_aarch64 3. cpu.c : ff_get_cpu_max_align_x86, ff_get_cpu_max_align_mips 4. float_dsp.c : ff_float_dsp_init_aarch64, ff_float_dsp_init_ppc, ff_float_dsp_init_x86 5. etc. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".