You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avcodec/hwconfig: Move HWACCEL_CAP_* to a new header
libavcodec/hwconfig.h currently contains HWACCEL_CAP_* flags as well as the definition of AVCodecHWConfigInternal and some macros to create them. The users of these two are nearly disjoint: The flags are used by files providing AVHWAccels whereas AVCodecHWConfigInternal is used by files providing codecs (for FFCodec.hw_configs). This patch therefore moves these flags to a new file hwaccel_internal.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		
							
								
								
									
										29
									
								
								libavcodec/hwaccel_internal.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								libavcodec/hwaccel_internal.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,29 @@ | |||||||
|  | /* | ||||||
|  |  * 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 | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Header providing the internals of AVHWAccel. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #ifndef AVCODEC_HWACCEL_INTERNAL_H | ||||||
|  | #define AVCODEC_HWACCEL_INTERNAL_H | ||||||
|  |  | ||||||
|  | #define HWACCEL_CAP_ASYNC_SAFE      (1 << 0) | ||||||
|  | #define HWACCEL_CAP_THREAD_SAFE     (1 << 1) | ||||||
|  |  | ||||||
|  | #endif /* AVCODEC_HWACCEL_INTERNAL */ | ||||||
| @@ -22,11 +22,6 @@ | |||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hwaccels.h" | #include "hwaccels.h" | ||||||
|  |  | ||||||
|  |  | ||||||
| #define HWACCEL_CAP_ASYNC_SAFE      (1 << 0) |  | ||||||
| #define HWACCEL_CAP_THREAD_SAFE     (1 << 1) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| typedef struct AVCodecHWConfigInternal { | typedef struct AVCodecHWConfigInternal { | ||||||
|     /** |     /** | ||||||
|      * This is the structure which will be returned to the user by |      * This is the structure which will be returned to the user by | ||||||
|   | |||||||
| @@ -31,6 +31,7 @@ | |||||||
| #include "avcodec_internal.h" | #include "avcodec_internal.h" | ||||||
| #include "codec_internal.h" | #include "codec_internal.h" | ||||||
| #include "decode.h" | #include "decode.h" | ||||||
|  | #include "hwaccel_internal.h" | ||||||
| #include "hwconfig.h" | #include "hwconfig.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "pthread_internal.h" | #include "pthread_internal.h" | ||||||
|   | |||||||
| @@ -19,8 +19,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/frame.h" | #include "libavutil/frame.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "hwaccel_internal.h" | ||||||
| #include "hwconfig.h" |  | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "av1dec.h" | #include "av1dec.h" | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
|  |  | ||||||
| #include "h264dec.h" | #include "h264dec.h" | ||||||
| #include "h264_ps.h" | #include "h264_ps.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
|  |  | ||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hevcdec.h" | #include "hevcdec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "vaapi_hevc.h" | #include "vaapi_hevc.h" | ||||||
| #include "h265_profile_level.h" | #include "h265_profile_level.h" | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ | |||||||
| #include <va/va.h> | #include <va/va.h> | ||||||
| #include <va/va_dec_jpeg.h> | #include <va/va_dec_jpeg.h> | ||||||
|  |  | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "mjpegdec.h" | #include "mjpegdec.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
|  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpegutils.h" | #include "mpegutils.h" | ||||||
| #include "mpegvideo.h" | #include "mpegvideo.h" | ||||||
| #include "mpegvideodec.h" | #include "mpegvideodec.h" | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ | |||||||
| #include "config_components.h" | #include "config_components.h" | ||||||
|  |  | ||||||
| #include "h263.h" | #include "h263.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpeg4videodec.h" | #include "mpeg4videodec.h" | ||||||
| #include "mpegvideo.h" | #include "mpegvideo.h" | ||||||
| #include "mpegvideodec.h" | #include "mpegvideodec.h" | ||||||
|   | |||||||
| @@ -22,11 +22,10 @@ | |||||||
|  |  | ||||||
| #include "config_components.h" | #include "config_components.h" | ||||||
|  |  | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpegvideodec.h" | #include "mpegvideodec.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "vc1.h" | #include "vc1.h" | ||||||
| #include "vc1data.h" |  | ||||||
|  |  | ||||||
| /** Translate FFmpeg MV modes to VA API */ | /** Translate FFmpeg MV modes to VA API */ | ||||||
| static int get_VAMvModeVC1(enum MVModes mv_mode) | static int get_VAMvModeVC1(enum MVModes mv_mode) | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ | |||||||
| #include <va/va.h> | #include <va/va.h> | ||||||
| #include <va/va_dec_vp8.h> | #include <va/va_dec_vp8.h> | ||||||
|  |  | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "vp8.h" | #include "vp8.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
|  |  | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
|  |  | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vaapi_decode.h" | #include "vaapi_decode.h" | ||||||
| #include "vp9shared.h" | #include "vp9shared.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "av1dec.h" | #include "av1dec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "h264dec.h" | #include "h264dec.h" | ||||||
| #include "h264_ps.h" | #include "h264_ps.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpegutils.h" | #include "mpegutils.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ | |||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hevc_data.h" | #include "hevc_data.h" | ||||||
| #include "hevcdec.h" | #include "hevcdec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
| #include "h265_profile_level.h" | #include "h265_profile_level.h" | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| #include <vdpau/vdpau.h> | #include <vdpau/vdpau.h> | ||||||
|  |  | ||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpegvideo.h" | #include "mpegvideo.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ | |||||||
| #include <vdpau/vdpau.h> | #include <vdpau/vdpau.h> | ||||||
|  |  | ||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "mpeg4videodec.h" | #include "mpeg4videodec.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ | |||||||
| #include <vdpau/vdpau.h> | #include <vdpau/vdpau.h> | ||||||
|  |  | ||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "vc1.h" | #include "vc1.h" | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|   | |||||||
| @@ -23,9 +23,8 @@ | |||||||
| #include <vdpau/vdpau.h> | #include <vdpau/vdpau.h> | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avcodec.h" | #include "avcodec.h" | ||||||
| #include "vp9data.h" | #include "hwaccel_internal.h" | ||||||
| #include "vp9dec.h" | #include "vp9dec.h" | ||||||
| #include "hwconfig.h" |  | ||||||
| #include "vdpau.h" | #include "vdpau.h" | ||||||
| #include "vdpau_internal.h" | #include "vdpau_internal.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ | |||||||
| #define AVCODEC_VULKAN_DECODE_H | #define AVCODEC_VULKAN_DECODE_H | ||||||
|  |  | ||||||
| #include "decode.h" | #include "decode.h" | ||||||
| #include "hwconfig.h" | #include "hwaccel_internal.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
|  |  | ||||||
| #include "vulkan_video.h" | #include "vulkan_video.h" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user