From patchwork Mon Apr 29 21:12:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fumoboy007 X-Patchwork-Id: 12941 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 53FA54451C3 for ; Tue, 30 Apr 2019 00:13:16 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3564468A60E; Tue, 30 Apr 2019 00:13:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mr85p00im-zteg06011601.me.com (mr85p00im-zteg06011601.me.com [17.58.23.186]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C32D168A5DF for ; Tue, 30 Apr 2019 00:13:09 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1556572387; bh=VdgLDYamWrUFtAIg8AMZfS83GbPaWwbJ0D6CHfS2wb8=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=jcOsLM4BfDsedHGtYSJbcwpVEFVv6Iv38XXPXStxEJQMxbmmCQKXFxXJyevZBE9Ld oB1daehCjWCYK0In1cjr/J8Es5LU9h9mPfw/+Ytvzwt6u5sqIa5r9EJLnW05/eeV/1 6nP9T8M3kl2jvw50TTJFN+47S13o56HBImPfY78ZsdLZLZB7mytIZcIg0/AYlwg834 bYNtLsbhygvgYuxsG9bxIjnI+trqhIXwmyXVkIpunyXi9WTNbstsyWp1U9Hi9qKJ+g AtMuCTSUgulYXvJZqMYi6IxBPLRCAsID8e2Q0Z2npyelRaMjvpwkzKubNwGJ1vivLD zDOCSQbCTDtOw== Received: from MacBook-Pro.localdomain (adsl-76-236-28-223.dsl.chi2ca.sbcglobal.net [76.236.28.223]) by mr85p00im-zteg06011601.me.com (Postfix) with ESMTPSA id C59A29201BA; Mon, 29 Apr 2019 21:13:07 +0000 (UTC) From: fumoboy007 To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Apr 2019 14:12:33 -0700 Message-Id: <20190429211233.80610-1-fumoboy007@me.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190428223239.66147-1-fumoboy007@me.com> References: <20190428223239.66147-1-fumoboy007@me.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-29_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=729 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1904290137 Subject: [FFmpeg-devel] [PATCH] avcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due to missing `hw_configs` property. 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: fumoboy007 , ceffmpeg@gmail.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Bug originally introduced in commit 758fbc54fef2f31957b5c5f22e05e5fd9b04f631. --- libavcodec/h263dec.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8385ddfe2e..6f001f6d47 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -743,6 +743,19 @@ const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = { AV_PIX_FMT_NONE }; +const AVCodecHWConfigInternal *ff_h263_hw_config_list[] = { +#if CONFIG_H263_VAAPI_HWACCEL + HWACCEL_VAAPI(h263), +#endif +#if CONFIG_MPEG4_VDPAU_HWACCEL + HWACCEL_VDPAU(mpeg4), +#endif +#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL + HWACCEL_VIDEOTOOLBOX(h263), +#endif + NULL +}; + AVCodec ff_h263_decoder = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), @@ -758,6 +771,7 @@ AVCodec ff_h263_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, + .hw_configs = ff_h263_hw_config_list, }; AVCodec ff_h263p_decoder = { @@ -775,16 +789,5 @@ AVCodec ff_h263p_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, - .hw_configs = (const AVCodecHWConfigInternal*[]) { -#if CONFIG_H263_VAAPI_HWACCEL - HWACCEL_VAAPI(h263), -#endif -#if CONFIG_MPEG4_VDPAU_HWACCEL - HWACCEL_VDPAU(mpeg4), -#endif -#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL - HWACCEL_VIDEOTOOLBOX(h263), -#endif - NULL - }, + .hw_configs = ff_h263_hw_config_list, };