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 618AD48D2F for ; Thu, 25 Jan 2024 13:46:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 05CC368D105; Thu, 25 Jan 2024 15:44:52 +0200 (EET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B5E468D119 for ; Thu, 25 Jan 2024 15:44:40 +0200 (EET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1d50d0c98c3so6200935ad.1 for ; Thu, 25 Jan 2024 05:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706190278; x=1706795078; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MjitALp9XWyfEd6jOA5rNKI/Q80R2V3qc8z+daJ2g8M=; b=YeuOcCJ78niQ6uaMoMxf6g3LaZPh/EVM9+XdQesN3u3BT6p+6EtMs+0VVFH8tzDDlP spsrusv3Mrcun+B0c5bTArFNtR8yQztbZGl/lmez0geQOFftVR8h+8pILmk+E6Q4AJuM BpVRCuN0AP1eu1HZRRPoGiO77TUkQPpBOMPD/tyYoXX18Nay1V3JXJ9fSWII9rx3UcY/ xA/HUyI9raQ6PyDiva15MJOAKOpWir6DL+JXkMiPSHMoohr37CXLhHu1x0JtJ9YsSoUk OEv4gHwOAm5HmRVX69C1mppGBVLJVasQWdTC86PRAGI9Vxzf1CeBWfmFqC4+cFf8k9pH 1fgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706190278; x=1706795078; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MjitALp9XWyfEd6jOA5rNKI/Q80R2V3qc8z+daJ2g8M=; b=CV++quHePSfln93wpt44qTs+VzFet+nhpAKCho8/sePiFNO27KCASkPmgZsglMoKd/ 5o5JYxN6GyHVrxQZrhdR3wA3Q/tmWpOA2etlkOEedAwlkd25SYQYUDZeDPqtbnSu3p6p AzlH4J8juD8mOyzGwE/BKAfXtbzyQAOUwijNpLqmJTA0trox5D5DCsgB1MJu2ghI05+S /2dwTaqlccLxjGLMLaRuZRD+SI3zylrwZMCU67Lwfz9kXOpiAxxXi42lJGsQsBsO0Pvi C526Jt9Y2NfbP8K/S0GEpikIWnbgeLLgrKByZaIuQGNhiIXwXPZrpPBOGzkHfo+uOMez EpFQ== X-Gm-Message-State: AOJu0Yzv9BHHPNubJlsf2qSmDYuHYSEce6fKBwT5FmYLWp7PKpmbhdDq v8qiiCBomENsoWPhgiYXTL4hhJouMn3dKlUV9eoOkmFHyUaymSTTwXf4ki7M X-Google-Smtp-Source: AGHT+IHC4QqVdYy9kgFoMoWkaTx7HKNKwJcnPTU9NSvJA2p0QEeD2Gku6koiv1oUB4VoYC5Nyy+GiA== X-Received: by 2002:a17:903:452:b0:1d0:af63:2403 with SMTP id iw18-20020a170903045200b001d0af632403mr1139118plb.50.1706190278474; Thu, 25 Jan 2024 05:44:38 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id k17-20020a170902f29100b001d707a14316sm11785146plc.75.2024.01.25.05.44.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 05:44:38 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Jan 2024 10:43:29 -0300 Message-ID: <20240125134425.374-7-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240125134425.374-1-jamrial@gmail.com> References: <20240125134425.374-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/24] avcodec: remove deprecated FF_API_VT_HWACCEL_CONTEXT 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: Signed-off-by: James Almer --- libavcodec/version_major.h | 1 - libavcodec/videotoolbox.c | 31 --------------------- libavcodec/videotoolbox.h | 56 -------------------------------------- 3 files changed, 88 deletions(-) diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h index 88cc975713..79c6f6dd05 100644 --- a/libavcodec/version_major.h +++ b/libavcodec/version_major.h @@ -38,7 +38,6 @@ */ #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61) -#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61) #define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 61) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index f2269766a2..f4da80640d 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -1398,35 +1398,4 @@ const FFHWAccel ff_prores_videotoolbox_hwaccel = { .priv_data_size = sizeof(VTContext), }; - - -#if FF_API_VT_HWACCEL_CONTEXT -AVVideotoolboxContext *av_videotoolbox_alloc_context(void) -{ - return videotoolbox_alloc_context_with_pix_fmt(AV_PIX_FMT_NONE, false); -} - -int av_videotoolbox_default_init(AVCodecContext *avctx) -{ - return av_videotoolbox_default_init2(avctx, NULL); -} - -int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx) -{ - enum AVPixelFormat pix_fmt = videotoolbox_best_pixel_format(avctx); - bool full_range = avctx->color_range == AVCOL_RANGE_JPEG; - avctx->hwaccel_context = vtctx ?: videotoolbox_alloc_context_with_pix_fmt(pix_fmt, full_range); - if (!avctx->hwaccel_context) - return AVERROR(ENOMEM); - return 0; -} - -void av_videotoolbox_default_free(AVCodecContext *avctx) -{ - - videotoolbox_stop(avctx); - av_freep(&avctx->hwaccel_context); -} -#endif /* FF_API_VT_HWACCEL_CONTEXT */ - #endif /* CONFIG_VIDEOTOOLBOX */ diff --git a/libavcodec/videotoolbox.h b/libavcodec/videotoolbox.h index 11b5315f7d..d68d76e400 100644 --- a/libavcodec/videotoolbox.h +++ b/libavcodec/videotoolbox.h @@ -78,62 +78,6 @@ typedef struct AVVideotoolboxContext { int cm_codec_type; } AVVideotoolboxContext; -#if FF_API_VT_HWACCEL_CONTEXT - -/** - * Allocate and initialize a Videotoolbox context. - * - * This function should be called from the get_format() callback when the caller - * selects the AV_PIX_FMT_VIDETOOLBOX format. The caller must then create - * the decoder object (using the output callback provided by libavcodec) that - * will be used for Videotoolbox-accelerated decoding. - * - * When decoding with Videotoolbox is finished, the caller must destroy the decoder - * object and free the Videotoolbox context using av_free(). - * - * @return the newly allocated context or NULL on failure - * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. - */ -attribute_deprecated -AVVideotoolboxContext *av_videotoolbox_alloc_context(void); - -/** - * This is a convenience function that creates and sets up the Videotoolbox context using - * an internal implementation. - * - * @param avctx the corresponding codec context - * - * @return >= 0 on success, a negative AVERROR code on failure - * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. - */ -attribute_deprecated -int av_videotoolbox_default_init(AVCodecContext *avctx); - -/** - * This is a convenience function that creates and sets up the Videotoolbox context using - * an internal implementation. - * - * @param avctx the corresponding codec context - * @param vtctx the Videotoolbox context to use - * - * @return >= 0 on success, a negative AVERROR code on failure - * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. - */ -attribute_deprecated -int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx); - -/** - * This function must be called to free the Videotoolbox context initialized with - * av_videotoolbox_default_init(). - * - * @param avctx the corresponding codec context - * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. - */ -attribute_deprecated -void av_videotoolbox_default_free(AVCodecContext *avctx); - -#endif /* FF_API_VT_HWACCEL_CONTEXT */ - /** * @} */ -- 2.43.0 _______________________________________________ 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".