mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
ecee3b07cd
This allows user set hw_device_ctx instead of hw_frames_ctx for QSV decoders, hence we may remove the ad-hoc libmfx setup code from FFmpeg. "-hwaccel_output_format format" is applied to QSV decoders after removing the ad-hoc libmfx code. In order to keep compatibility with old commandlines, the default format is set to AV_PIX_FMT_QSV, but this behavior will be removed in the future. Please set "-hwaccel_output_format qsv" explicitly if AV_PIX_FMT_QSV is expected. The normal device stuff works for QSV decoders now, user may use "-init_hw_device args" to initialise device and "-hwaccel_device devicename" to select a device for QSV decoders. "-qsv_device device" which was added for workarounding device selection in the ad-hoc libmfx code still works For example: $> ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=/dev/dri/card0 -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - /dev/dri/renderD128 is actually open for h264_qsv decoder in the above command without this patch. After applying this patch, /dev/dri/card0 is used. $> ffmpeg -init_hw_device vaapi=va:/dev/dri/card0 -init_hw_device qsv=hw@va -hwaccel_device hw -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - device hw of type qsv is not usable in the above command without this patch. After applying this patch, this command works as expected. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
53 lines
1.5 KiB
Makefile
53 lines
1.5 KiB
Makefile
AVPROGS-$(CONFIG_FFMPEG) += ffmpeg
|
|
AVPROGS-$(CONFIG_FFPLAY) += ffplay
|
|
AVPROGS-$(CONFIG_FFPROBE) += ffprobe
|
|
|
|
AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
|
|
PROGS += $(AVPROGS)
|
|
|
|
AVBASENAMES = ffmpeg ffplay ffprobe
|
|
ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
|
|
ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
|
|
|
|
OBJS-ffmpeg += fftools/ffmpeg_opt.o fftools/ffmpeg_filter.o fftools/ffmpeg_hw.o
|
|
ifndef CONFIG_VIDEOTOOLBOX
|
|
OBJS-ffmpeg-$(CONFIG_VDA) += fftools/ffmpeg_videotoolbox.o
|
|
endif
|
|
OBJS-ffmpeg-$(CONFIG_VIDEOTOOLBOX) += fftools/ffmpeg_videotoolbox.o
|
|
|
|
define DOFFTOOL
|
|
OBJS-$(1) += fftools/cmdutils.o fftools/$(1).o $(OBJS-$(1)-yes)
|
|
$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
|
|
$$(OBJS-$(1)): | fftools
|
|
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
|
|
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
|
|
$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(EXTRALIBS-$(1))
|
|
-include $$(OBJS-$(1):.o=.d)
|
|
endef
|
|
|
|
$(foreach P,$(AVPROGS-yes),$(eval $(call DOFFTOOL,$(P))))
|
|
|
|
all: $(AVPROGS)
|
|
|
|
fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
|
|
OUTDIRS += fftools
|
|
|
|
ifdef AVPROGS
|
|
install: install-progs install-data
|
|
endif
|
|
|
|
install-progs-yes:
|
|
install-progs-$(CONFIG_SHARED): install-libs
|
|
|
|
install-progs: install-progs-yes $(AVPROGS)
|
|
$(Q)mkdir -p "$(BINDIR)"
|
|
$(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)"
|
|
|
|
uninstall: uninstall-progs
|
|
|
|
uninstall-progs:
|
|
$(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
|
|
|
|
clean::
|
|
$(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)
|