From patchwork Wed Jul 27 16:43:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?St=C3=A8ve_Lhomme?= X-Patchwork-Id: 15 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.67 with SMTP id o64csp343271vsd; Wed, 27 Jul 2016 09:44:25 -0700 (PDT) X-Received: by 10.194.115.4 with SMTP id jk4mr31521697wjb.109.1469637865249; Wed, 27 Jul 2016 09:44:25 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id pz7si7958298wjc.267.2016.07.27.09.44.24; Wed, 27 Jul 2016 09:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D2EAF68A58B; Wed, 27 Jul 2016 19:44:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from SNT004-OMC2S49.hotmail.com (snt004-omc2s49.hotmail.com [65.54.61.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B9D2E68A3C5 for ; Wed, 27 Jul 2016 19:44:09 +0300 (EEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com ([65.55.90.72]) by SNT004-OMC2S49.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 27 Jul 2016 09:44:12 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZjmWYPgErfzWBqXRCRsoPNkxv9lTccQRKx2BsWrUOoA=; b=MsNxtZBklOCYY039nt44rfjHzZOEC+orkfm7OVxD+ZBFbmhFUNf4GEszcJ1nH0Rd3LeJbTZbXo3b4gilgDmJCLoHV5OhB6X355tpBPxCFXSQgo3cNr4Ag4rqcvZ4MQ0BfgiKbt0Tluz8HZfv9X4Sz9E3zJEcfKVQFij2xwARnn9sy6KteqSI12OTxcuRdA21shfdyq6JsiRAM+gmPxLfEb4LW+/yYjJrroVdz87B7uQXSIHFuwZ1bW/hpxeRbxB4v7Olnp0ekOJCFxqbE0bU6dVb4X5erZMKoUZPrlRK0valPmJz/OdBPkmR470DPwK4KKGOCNR+QTUhV5TlRqS0pw== Received: from VE1EUR01FT021.eop-EUR01.prod.protection.outlook.com (10.152.2.60) by VE1EUR01HT140.eop-EUR01.prod.protection.outlook.com (10.152.3.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5; Wed, 27 Jul 2016 16:44:00 +0000 Received: from HE1PR10MB0409.EURPRD10.PROD.OUTLOOK.COM (10.152.2.51) by VE1EUR01FT021.mail.protection.outlook.com (10.152.2.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.5 via Frontend Transport; Wed, 27 Jul 2016 16:44:00 +0000 Received: from HE1PR10MB0409.EURPRD10.PROD.OUTLOOK.COM ([10.167.251.9]) by HE1PR10MB0409.EURPRD10.PROD.OUTLOOK.COM ([10.167.251.9]) with mapi id 15.01.0549.016; Wed, 27 Jul 2016 16:43:59 +0000 From: =?utf-8?B?U3TDqHZlIExob21tZQ==?= To: FFmpeg development discussions and patches Thread-Topic: [PATCH] avcodec: allow hardware decoding with multithread for FFmpeg Thread-Index: AQHR6CYSkjAyqXWDNUOACx2i2ZxnwQ== Date: Wed, 27 Jul 2016 16:43:58 +0000 Message-ID: References: <1469630606-4028-1-git-send-email-robux4@videolabs.io> In-Reply-To: <1469630606-4028-1-git-send-email-robux4@videolabs.io> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=softfail (sender IP is 10.152.2.51) smtp.mailfrom=outlook.com; ffmpeg.org; dkim=none (message not signed) header.d=none; ffmpeg.org; dmarc=none action=none header.from=videolabs.io; received-spf: SoftFail (protection.outlook.com: domain of transitioning outlook.com discourages use of 10.152.2.51 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 2 x-eopattributedmessage: 0 x-forefront-antispam-report: CIP:10.152.2.51; IPV:NLI; CTRY:; EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:VE1EUR01HT140; H:HE1PR10MB0409.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; x-microsoft-exchange-diagnostics: 1; VE1EUR01HT140; 6:WL4qybyC5cwU71VWuf+km7S04VFzA72DHGoXhN1tuDBYt0t57ISgiTAvtGElcOk+tmJp8AVDTs0aFoby9Nzp+yInA+nLG5//3e3C43rmomW1Z7JF5qHNVkC0S1QQ+sqYrIw7fXYWiZaery03xSYSW/UsYYxWt6YTzcHQhCUUFtwQJdN+ay70cEk5BgmgdaT8I0/ytybA1uXeVLUJjheVVp3WcOV3pSwFuHCg+DMXyjWIDkbPz/xjs1Z2X9kHupOJ7RZkSzO8aRw1PtFab1TsWWmloJBdKn9VvXDbR4oM3F0g/Dxtv5vU9cwuqfD8rOL/; 5:hR/87yrXEDj1Jegs2hfZue0gcMUVjE9VaFmeBuioxFYuPQKkeEpvxQQbfawY6onojU6h2aEwWsLamAdJ3wKaR8d9ZrsrFH6WveaeB9iq8IlFludmgOO11Aui3Klo/UsLTNpQP4PzKUg2eZLKwIfMvA==; 24:uWw0T4g0q+1MEbgcR4pFsNzXkU63/O+cNGOhX/BSQMtRCr6kbTkqs0YviEyDrVXnMftwgt1J8lUkKs/cEWsrNWqkrwKyhZns1lZsDCa5I54=; 7:njRnf4vN4nA6BHlSvCT/VCjTxZ7h/7PbOqS+AsXoVJHuxHRZM1YJatqEQJI15hQESwBcWiOhfkqkOgNP8SOxTRozMygPUpUKVvlyzXce5WWmKKAQqtS6DYxv0K6uUoK4d9oSP1pHV4naC+lUSmZFMlEsBc89QYKUO+ktkEf3cQ0c5Bu6UarHx3qZehXhfoIcAfxgfLsgK5q3ABf5UM2pA3Zz2qk52gVAAPf9oCWZ2MpJU64K4LxaY6fBtHVkmSiq x-ms-office365-filtering-correlation-id: fe13c98d-d9a1-435e-3b6e-08d3b63d3419 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(1601125047); SRVR:VE1EUR01HT140; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:VE1EUR01HT140; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT140; x-forefront-prvs: 0016DEFF96 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2016 16:43:58.6713 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT140 X-OriginalArrivalTime: 27 Jul 2016 16:44:12.0479 (UTC) FILETIME=[1AB2ECF0:01D1E826] Subject: [FFmpeg-devel] Fwd: [PATCH] avcodec: allow hardware decoding with multithread for FFmpeg 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hello fellow FFmpegers, Is there still an issue with hardware decoding when combined with multithread ? It seems to work fine on our Windows build. Although we have a mutex in place in the D3D11 variant of the code that may help. It mostly protects the video context... If necessary we can have the same trick for DXVA2 if there are still known issues. Steve ---------- Forwarded message ---------- From: Steve Lhomme Date: Wed, Jul 27, 2016 at 4:43 PM Subject: [PATCH] avcodec: allow hardware decoding with multithread for FFmpeg To: vlc-devel@videolan.org The context is protected by a mutex. --- modules/codec/avcodec/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) msg_Warn(p_dec, "thread type %d: disabling hardware acceleration", -- 2.8.2 diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index 0c10f9e..bbf3ebb 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -1233,7 +1233,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, if (!can_hwaccel) return swfmt; -#if (LIBAVCODEC_VERSION_MICRO >= 100) /* FFmpeg only */ +#if (LIBAVCODEC_VERSION_MICRO >= 100) && !defined(_WIN32) /* FFmpeg only */ if (p_context->active_thread_type) {