support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
This commit is contained in:
parent
b72373de79
commit
a9c7597adc
@ -105,14 +105,14 @@ testdata::
|
|||||||
|
|
||||||
xform_obj_prefix:=.objs/$(TOOLCHAIN)/
|
xform_obj_prefix:=.objs/$(TOOLCHAIN)/
|
||||||
xform_obj_path=$(if $(1),$(addprefix $(xform_obj_prefix),$(subst /,_,$(1))),$(xform_obj_prefix))
|
xform_obj_path=$(if $(1),$(addprefix $(xform_obj_prefix),$(subst /,_,$(1))),$(xform_obj_prefix))
|
||||||
xform_obj_path_o_d=$(call xform_obj_path,$(1).o) $(call xform_obj_path,$(1).d)
|
xform_obj_path_o_d=$(call xform_obj_path,$(1)).o $(call xform_obj_path,$(1)).d
|
||||||
define obj_rules_template
|
define obj_rules_template
|
||||||
$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.d: $(1)%.c
|
$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.d: $(1)%.c
|
||||||
$(if $(quiet),@echo " [DEP] $$@")
|
$(if $(quiet),@echo " [DEP] $$@")
|
||||||
$(qexec)mkdir -p $$(dir $$@)
|
$(qexec)mkdir -p $$(dir $$@)
|
||||||
$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -M $$< | $(fmt_deps) > $$@
|
$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -M $$< | $(fmt_deps) > $$@
|
||||||
|
|
||||||
$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.o: $(1)%.c
|
$(BUILD_PFX)$(call xform_obj_path,$(1))%.c.o: $(1)%.c $(BUILD_PFX)$(call xform_obj_path,$(1))%.c.d
|
||||||
$(if $(quiet),@echo " [CC] $$@")
|
$(if $(quiet),@echo " [CC] $$@")
|
||||||
$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -c -o $$@ $$<
|
$(qexec)$(CC) $$(INTERNAL_CFLAGS) $$(CFLAGS) -c -o $$@ $$<
|
||||||
|
|
||||||
|
@ -143,7 +143,9 @@ generate_filter() {
|
|||||||
if [ "${f##*.}" == "$pat" ]; then
|
if [ "${f##*.}" == "$pat" ]; then
|
||||||
unset file_list[i]
|
unset file_list[i]
|
||||||
|
|
||||||
|
objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,/,_,g')
|
||||||
open_tag File RelativePath="./$f"
|
open_tag File RelativePath="./$f"
|
||||||
|
|
||||||
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
|
if [ "$pat" == "asm" ] && $asm_use_custom_step; then
|
||||||
for plat in "${platforms[@]}"; do
|
for plat in "${platforms[@]}"; do
|
||||||
for cfg in Debug Release; do
|
for cfg in Debug Release; do
|
||||||
@ -154,13 +156,26 @@ generate_filter() {
|
|||||||
Name="VCCustomBuildTool" \
|
Name="VCCustomBuildTool" \
|
||||||
Description="Assembling \$(InputFileName)" \
|
Description="Assembling \$(InputFileName)" \
|
||||||
CommandLine="$(eval echo \$asm_${cfg}_cmdline)" \
|
CommandLine="$(eval echo \$asm_${cfg}_cmdline)" \
|
||||||
Outputs="\$(InputName).obj" \
|
Outputs="\$(IntDir)$objf" \
|
||||||
|
|
||||||
close_tag FileConfiguration
|
close_tag FileConfiguration
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if [ "$pat" == "c" ] || [ "$pat" == "cc" ] ; then
|
||||||
|
for plat in "${platforms[@]}"; do
|
||||||
|
for cfg in Debug Release; do
|
||||||
|
open_tag FileConfiguration \
|
||||||
|
Name="${cfg}|${plat}" \
|
||||||
|
|
||||||
|
tag Tool \
|
||||||
|
Name="VCCLCompilerTool" \
|
||||||
|
ObjectFile="\$(IntDir)$objf" \
|
||||||
|
|
||||||
|
close_tag FileConfiguration
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
close_tag File
|
close_tag File
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -13,3 +13,11 @@ cl /I "./" /I "%1" /nologo /c "%1/vp9/encoder/asm_enc_offsets.c"
|
|||||||
obj_int_extract.exe rvds "asm_com_offsets.obj" > "vp9_asm_com_offsets.asm"
|
obj_int_extract.exe rvds "asm_com_offsets.obj" > "vp9_asm_com_offsets.asm"
|
||||||
obj_int_extract.exe rvds "asm_dec_offsets.obj" > "vp9_asm_dec_offsets.asm"
|
obj_int_extract.exe rvds "asm_dec_offsets.obj" > "vp9_asm_dec_offsets.asm"
|
||||||
obj_int_extract.exe rvds "asm_enc_offsets.obj" > "vp9_asm_enc_offsets.asm"
|
obj_int_extract.exe rvds "asm_enc_offsets.obj" > "vp9_asm_enc_offsets.asm"
|
||||||
|
|
||||||
|
cl /I "./" /I "%1" /nologo /c "%1/vp8/common/asm_com_offsets.c"
|
||||||
|
cl /I "./" /I "%1" /nologo /c "%1/vp8/decoder/asm_dec_offsets.c"
|
||||||
|
cl /I "./" /I "%1" /nologo /c "%1/vp8/encoder/asm_enc_offsets.c"
|
||||||
|
obj_int_extract.exe rvds "asm_com_offsets.obj" > "vp8_asm_com_offsets.asm"
|
||||||
|
obj_int_extract.exe rvds "asm_dec_offsets.obj" > "vp8_asm_dec_offsets.asm"
|
||||||
|
obj_int_extract.exe rvds "asm_enc_offsets.obj" > "vp8_asm_enc_offsets.asm"
|
||||||
|
|
||||||
|
20
examples.mk
20
examples.mk
@ -38,7 +38,7 @@ vpxenc.SRCS += libmkv/EbmlWriter.c
|
|||||||
vpxenc.SRCS += libmkv/EbmlWriter.h
|
vpxenc.SRCS += libmkv/EbmlWriter.h
|
||||||
vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
|
vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
|
||||||
vpxenc.DESCRIPTION = Full featured encoder
|
vpxenc.DESCRIPTION = Full featured encoder
|
||||||
UTILS-$(CONFIG_ENCODERS) += vp8_scalable_patterns.c
|
UTILS-$(CONFIG_VP8_ENCODER) += vp8_scalable_patterns.c
|
||||||
vp8_scalable_patterns.GUID = 0D6A210B-F482-4D6F-8570-4A9C01ACC88C
|
vp8_scalable_patterns.GUID = 0D6A210B-F482-4D6F-8570-4A9C01ACC88C
|
||||||
vp8_scalable_patterns.DESCRIPTION = Temporal Scalability Encoder
|
vp8_scalable_patterns.DESCRIPTION = Temporal Scalability Encoder
|
||||||
|
|
||||||
@ -56,37 +56,37 @@ endif
|
|||||||
#example_xma.GUID = A955FC4A-73F1-44F7-135E-30D84D32F022
|
#example_xma.GUID = A955FC4A-73F1-44F7-135E-30D84D32F022
|
||||||
#example_xma.DESCRIPTION = External Memory Allocation mode usage
|
#example_xma.DESCRIPTION = External Memory Allocation mode usage
|
||||||
|
|
||||||
GEN_EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
|
GEN_EXAMPLES-$(CONFIG_VP8_DECODER) += simple_decoder.c
|
||||||
simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC
|
simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC
|
||||||
simple_decoder.DESCRIPTION = Simplified decoder loop
|
simple_decoder.DESCRIPTION = Simplified decoder loop
|
||||||
GEN_EXAMPLES-$(CONFIG_DECODERS) += postproc.c
|
GEN_EXAMPLES-$(CONFIG_VP8_DECODER) += postproc.c
|
||||||
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
|
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
|
||||||
postproc.DESCRIPTION = Decoder postprocessor control
|
postproc.DESCRIPTION = Decoder postprocessor control
|
||||||
GEN_EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
|
GEN_EXAMPLES-$(CONFIG_VP8_DECODER) += decode_to_md5.c
|
||||||
decode_to_md5.SRCS += md5_utils.h md5_utils.c
|
decode_to_md5.SRCS += md5_utils.h md5_utils.c
|
||||||
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
|
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
|
||||||
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
|
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
|
||||||
|
|
||||||
GEN_EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
|
GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += simple_encoder.c
|
||||||
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
|
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
|
||||||
simple_encoder.DESCRIPTION = Simplified encoder loop
|
simple_encoder.DESCRIPTION = Simplified encoder loop
|
||||||
GEN_EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
|
GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += twopass_encoder.c
|
||||||
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
|
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
|
||||||
twopass_encoder.DESCRIPTION = Two-pass encoder loop
|
twopass_encoder.DESCRIPTION = Two-pass encoder loop
|
||||||
GEN_EXAMPLES-$(CONFIG_ENCODERS) += force_keyframe.c
|
GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += force_keyframe.c
|
||||||
force_keyframe.GUID = 3C67CADF-029F-4C86-81F5-D6D4F51177F0
|
force_keyframe.GUID = 3C67CADF-029F-4C86-81F5-D6D4F51177F0
|
||||||
force_keyframe.DESCRIPTION = Force generation of keyframes
|
force_keyframe.DESCRIPTION = Force generation of keyframes
|
||||||
ifeq ($(CONFIG_DECODERS),yes)
|
ifeq ($(CONFIG_DECODERS),yes)
|
||||||
GEN_EXAMPLES-$(CONFIG_ENCODERS) += decode_with_drops.c
|
GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += decode_with_drops.c
|
||||||
endif
|
endif
|
||||||
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
|
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
|
||||||
decode_with_drops.DESCRIPTION = Drops frames while decoding
|
decode_with_drops.DESCRIPTION = Drops frames while decoding
|
||||||
ifeq ($(CONFIG_DECODERS),yes)
|
ifeq ($(CONFIG_VP8_DECODER),yes)
|
||||||
GEN_EXAMPLES-$(CONFIG_ERROR_CONCEALMENT) += decode_with_partial_drops.c
|
GEN_EXAMPLES-$(CONFIG_ERROR_CONCEALMENT) += decode_with_partial_drops.c
|
||||||
endif
|
endif
|
||||||
decode_with_partial_drops.GUID = 61C2D026-5754-46AC-916F-1343ECC5537E
|
decode_with_partial_drops.GUID = 61C2D026-5754-46AC-916F-1343ECC5537E
|
||||||
decode_with_partial_drops.DESCRIPTION = Drops parts of frames while decoding
|
decode_with_partial_drops.DESCRIPTION = Drops parts of frames while decoding
|
||||||
GEN_EXAMPLES-$(CONFIG_ENCODERS) += error_resilient.c
|
GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += error_resilient.c
|
||||||
error_resilient.GUID = DF5837B9-4145-4F92-A031-44E4F832E00C
|
error_resilient.GUID = DF5837B9-4145-4F92-A031-44E4F832E00C
|
||||||
error_resilient.DESCRIPTION = Error Resiliency Feature
|
error_resilient.DESCRIPTION = Error Resiliency Feature
|
||||||
|
|
||||||
|
34
libs.mk
34
libs.mk
@ -44,6 +44,19 @@ endef
|
|||||||
endif # rvct
|
endif # rvct
|
||||||
endif # !gcc
|
endif # !gcc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Rule to generate runtime cpu detection files
|
||||||
|
#
|
||||||
|
define rtcd_h_template
|
||||||
|
$$(BUILD_PFX)$(1).h: $$(SRC_PATH_BARE)/$(2)
|
||||||
|
@echo " [CREATE] $$@"
|
||||||
|
$$(qexec)$$(SRC_PATH_BARE)/build/make/rtcd.sh --arch=$$(TGT_ISA) \
|
||||||
|
--sym=$(1) \
|
||||||
|
--config=$$(target)$$(if $$(FAT_ARCHS),,-$$(TOOLCHAIN)).mk \
|
||||||
|
$$(RTCD_OPTIONS) $$^ > $$@
|
||||||
|
CLEAN-OBJS += $$(BUILD_PFX)$(1).h
|
||||||
|
RTCD += $$(BUILD_PFX)$(1).h
|
||||||
|
endef
|
||||||
|
|
||||||
CODEC_SRCS-yes += CHANGELOG
|
CODEC_SRCS-yes += CHANGELOG
|
||||||
CODEC_SRCS-yes += libs.mk
|
CODEC_SRCS-yes += libs.mk
|
||||||
@ -190,7 +203,8 @@ INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
|
|||||||
INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
|
INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CODEC_SRCS=$(filter-out %_test.cc,$(call enabled,CODEC_SRCS))
|
CODEC_SRCS=$(filter-out %_offsets.c,\
|
||||||
|
$(filter-out %_test.cc,$(call enabled,CODEC_SRCS)))
|
||||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS)
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS)
|
||||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS)
|
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS)
|
||||||
|
|
||||||
@ -245,7 +259,7 @@ vpx.vcproj: $(CODEC_SRCS) vpx.def
|
|||||||
PROJECTS-$(BUILD_LIBVPX) += vpx.vcproj
|
PROJECTS-$(BUILD_LIBVPX) += vpx.vcproj
|
||||||
|
|
||||||
vpx.vcproj: vpx_config.asm
|
vpx.vcproj: vpx_config.asm
|
||||||
vpx.vcproj: vpx_rtcd.h
|
vpx.vcproj: $(RTCD)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@ -362,18 +376,6 @@ $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm
|
|||||||
$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
|
$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h)
|
||||||
CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
|
CLEAN-OBJS += $(BUILD_PFX)vpx_version.h
|
||||||
|
|
||||||
#
|
|
||||||
# Rule to generate runtime cpu detection files
|
|
||||||
#
|
|
||||||
$(BUILD_PFX)vpx_rtcd.h: $(SRC_PATH_BARE)/$(sort $(filter %rtcd_defs.sh,$(CODEC_SRCS)))
|
|
||||||
@echo " [CREATE] $@"
|
|
||||||
$(qexec)$(SRC_PATH_BARE)/build/make/rtcd.sh --arch=$(TGT_ISA) \
|
|
||||||
--sym=vpx_rtcd \
|
|
||||||
--config=$(target)$(if $(FAT_ARCHS),,-$(TOOLCHAIN)).mk \
|
|
||||||
$(RTCD_OPTIONS) $^ > $@
|
|
||||||
CLEAN-OBJS += $(BUILD_PFX)vpx_rtcd.h
|
|
||||||
|
|
||||||
|
|
||||||
CODEC_DOC_SRCS += vpx/vpx_codec.h \
|
CODEC_DOC_SRCS += vpx/vpx_codec.h \
|
||||||
vpx/vpx_decoder.h \
|
vpx/vpx_decoder.h \
|
||||||
vpx/vpx_encoder.h \
|
vpx/vpx_encoder.h \
|
||||||
@ -501,8 +503,8 @@ libs.doxy: $(CODEC_DOC_SRCS)
|
|||||||
@echo "INCLUDE_PATH += ." >> $@;
|
@echo "INCLUDE_PATH += ." >> $@;
|
||||||
@echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@
|
@echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@
|
||||||
|
|
||||||
## Generate vpx_rtcd.h for all objects
|
## Generate rtcd.h for all objects
|
||||||
$(OBJS-yes:.o=.d): $(BUILD_PFX)vpx_rtcd.h
|
$(OBJS-yes:.o=.d): $(RTCD)
|
||||||
|
|
||||||
## Update the global src list
|
## Update the global src list
|
||||||
SRCS += $(CODEC_SRCS) $(LIBVPX_TEST_SRCS) $(GTEST_SRCS)
|
SRCS += $(CODEC_SRCS) $(LIBVPX_TEST_SRCS) $(GTEST_SRCS)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vp9/common/entropy.h"
|
#include "vp9/common/entropy.h"
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "acm_random.h"
|
#include "acm_random.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "acm_random.h"
|
#include "acm_random.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "acm_random.h"
|
#include "acm_random.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "acm_random.h"
|
#include "acm_random.h"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
}
|
}
|
||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "third_party/googletest/src/include/gtest/gtest.h"
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vp8_rtcd.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vp8/encoder/block.h"
|
#include "vp8/encoder/block.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vp9/encoder/variance.h"
|
#include "vp9/encoder/variance.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "test/acm_random.h"
|
#include "test/acm_random.h"
|
||||||
|
@ -5,7 +5,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
LONG_OPTIONS = ["shard=", "shards="]
|
LONG_OPTIONS = ["shard=", "shards="]
|
||||||
BASE_COMMAND = "./configure --disable-vp8 --disable-unit-tests --enable-internal-stats --enable-experimental"
|
BASE_COMMAND = "./configure --enable-internal-stats --enable-experimental"
|
||||||
|
|
||||||
def RunCommand(command):
|
def RunCommand(command):
|
||||||
run = subprocess.Popen(command, shell=True)
|
run = subprocess.Popen(command, shell=True)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
|
|
||||||
void vp8_dequant_idct_add_y_block_v6(short *q, short *dq,
|
void vp8_dequant_idct_add_y_block_v6(short *q, short *dq,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "vp8/common/filter.h"
|
#include "vp8/common/filter.h"
|
||||||
#include "bilinearfilter_arm.h"
|
#include "bilinearfilter_arm.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "vp8/common/filter.h"
|
#include "vp8/common/filter.h"
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/loopfilter.h"
|
#include "vp8/common/loopfilter.h"
|
||||||
#include "vp8/common/onyxc_int.h"
|
#include "vp8/common/onyxc_int.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
/* place these declarations here because we don't want to maintain them
|
/* place these declarations here because we don't want to maintain them
|
||||||
* outside of this scope
|
* outside of this scope
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/variance.h"
|
#include "vp8/common/variance.h"
|
||||||
#include "vp8/common/filter.h"
|
#include "vp8/common/filter.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#if ARCH_ARM
|
#if ARCH_ARM
|
||||||
#include "vpx_ports/arm.h"
|
#include "vpx_ports/arm.h"
|
||||||
#elif ARCH_X86 || ARCH_X86_64
|
#elif ARCH_X86 || ARCH_X86_64
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
void vp8_dequant_idct_add_c(short *input, short *dq,
|
void vp8_dequant_idct_add_c(short *input, short *dq,
|
||||||
unsigned char *dest, int stride);
|
unsigned char *dest, int stride);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define __INC_INVTRANS_H
|
#define __INC_INVTRANS_H
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "blockd.h"
|
#include "blockd.h"
|
||||||
#include "onyxc_int.h"
|
#include "onyxc_int.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "loopfilter.h"
|
#include "loopfilter.h"
|
||||||
#include "onyxc_int.h"
|
#include "onyxc_int.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
#define MAX_LOOP_FILTER 63
|
#define MAX_LOOP_FILTER 63
|
||||||
/* fraction of total macroblock rows to be used in fast filter level picking */
|
/* fraction of total macroblock rows to be used in fast filter level picking */
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "postproc.h"
|
#include "postproc.h"
|
||||||
#include "variance.h"
|
#include "variance.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_scale/yv12config.h"
|
#include "vpx_scale/yv12config.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
#define CROP_WIDTH 256
|
#define CROP_WIDTH 256
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/onyxc_int.h"
|
#include "vp8/common/onyxc_int.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
#if HAVE_DSPR2
|
#if HAVE_DSPR2
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define __INC_VP8C_INT_H
|
#define __INC_VP8C_INT_H
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/internal/vpx_codec_internal.h"
|
#include "vpx/internal/vpx_codec_internal.h"
|
||||||
#include "loopfilter.h"
|
#include "loopfilter.h"
|
||||||
#include "entropymv.h"
|
#include "entropymv.h"
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
#include "vpx_scale_rtcd.h"
|
||||||
#include "vpx_scale/yv12config.h"
|
#include "vpx_scale/yv12config.h"
|
||||||
#include "postproc.h"
|
#include "postproc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "blockd.h"
|
#include "blockd.h"
|
||||||
#include "reconinter.h"
|
#include "reconinter.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "blockd.h"
|
#include "blockd.h"
|
||||||
|
|
||||||
|
@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "blockd.h"
|
#include "blockd.h"
|
||||||
|
|
||||||
void vp8_intra4x4_predict_c(unsigned char *Above,
|
void vp8_intra4x4_predict_c(unsigned char *Above,
|
||||||
unsigned char *yleft, int left_stride,
|
unsigned char *yleft, int left_stride,
|
||||||
B_PREDICTION_MODE b_mode,
|
int _b_mode,
|
||||||
unsigned char *dst, int dst_stride,
|
unsigned char *dst, int dst_stride,
|
||||||
unsigned char top_left)
|
unsigned char top_left)
|
||||||
{
|
{
|
||||||
int i, r, c;
|
int i, r, c;
|
||||||
|
B_PREDICTION_MODE b_mode = (B_PREDICTION_MODE)_b_mode;
|
||||||
unsigned char Left[4];
|
unsigned char Left[4];
|
||||||
Left[0] = yleft[0];
|
Left[0] = yleft[0];
|
||||||
Left[1] = yleft[left_stride];
|
Left[1] = yleft[left_stride];
|
||||||
|
@ -9,97 +9,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#define RTCD_C
|
#define RTCD_C
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
#include "vpx_ports/vpx_once.h"
|
||||||
|
|
||||||
#if CONFIG_MULTITHREAD && defined(_WIN32)
|
extern void vpx_scale_rtcd(void);
|
||||||
#include <windows.h>
|
|
||||||
#include <stdlib.h>
|
void vp8_rtcd()
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static CRITICAL_SECTION *lock;
|
|
||||||
static LONG waiters;
|
|
||||||
static int done;
|
|
||||||
void *lock_ptr = &lock;
|
|
||||||
|
|
||||||
/* If the initialization is complete, return early. This isn't just an
|
|
||||||
* optimization, it prevents races on the destruction of the global
|
|
||||||
* lock.
|
|
||||||
*/
|
|
||||||
if(done)
|
|
||||||
return;
|
|
||||||
|
|
||||||
InterlockedIncrement(&waiters);
|
|
||||||
|
|
||||||
/* Get a lock. We create one and try to make it the one-true-lock,
|
|
||||||
* throwing it away if we lost the race.
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
|
||||||
/* Scope to protect access to new_lock */
|
|
||||||
CRITICAL_SECTION *new_lock = malloc(sizeof(CRITICAL_SECTION));
|
|
||||||
InitializeCriticalSection(new_lock);
|
|
||||||
if (InterlockedCompareExchangePointer(lock_ptr, new_lock, NULL) != NULL)
|
|
||||||
{
|
|
||||||
DeleteCriticalSection(new_lock);
|
|
||||||
free(new_lock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point, we have a lock that can be synchronized on. We don't
|
|
||||||
* care which thread actually performed the allocation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EnterCriticalSection(lock);
|
|
||||||
|
|
||||||
if (!done)
|
|
||||||
{
|
|
||||||
func();
|
|
||||||
done = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveCriticalSection(lock);
|
|
||||||
|
|
||||||
/* Last one out should free resources. The destructed objects are
|
|
||||||
* protected by checking if(done) above.
|
|
||||||
*/
|
|
||||||
if(!InterlockedDecrement(&waiters))
|
|
||||||
{
|
|
||||||
DeleteCriticalSection(lock);
|
|
||||||
free(lock);
|
|
||||||
lock = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#elif CONFIG_MULTITHREAD && HAVE_PTHREAD_H
|
|
||||||
#include <pthread.h>
|
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static pthread_once_t lock = PTHREAD_ONCE_INIT;
|
|
||||||
pthread_once(&lock, func);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
/* No-op version that performs no synchronization. vpx_rtcd() is idempotent,
|
|
||||||
* so as long as your platform provides atomic loads/stores of pointers
|
|
||||||
* no synchronization is strictly necessary.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static int done;
|
|
||||||
|
|
||||||
if(!done)
|
|
||||||
{
|
|
||||||
func();
|
|
||||||
done = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void vpx_rtcd()
|
|
||||||
{
|
{
|
||||||
|
vpx_scale_rtcd();
|
||||||
once(setup_rtcd_internal);
|
once(setup_rtcd_internal);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
common_forward_decls() {
|
vp8_common_forward_decls() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
#include "vp8/common/blockd.h"
|
/*
|
||||||
|
* VP8
|
||||||
|
*/
|
||||||
|
|
||||||
struct blockd;
|
struct blockd;
|
||||||
struct macroblockd;
|
struct macroblockd;
|
||||||
@ -14,7 +16,7 @@ union int_mv;
|
|||||||
struct yv12_buffer_config;
|
struct yv12_buffer_config;
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
forward_decls common_forward_decls
|
forward_decls vp8_common_forward_decls
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dequant
|
# Dequant
|
||||||
@ -146,7 +148,7 @@ specialize vp8_build_intra_predictors_mby_s sse2 ssse3
|
|||||||
prototype void vp8_build_intra_predictors_mbuv_s "struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride"
|
prototype void vp8_build_intra_predictors_mbuv_s "struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride"
|
||||||
specialize vp8_build_intra_predictors_mbuv_s sse2 ssse3
|
specialize vp8_build_intra_predictors_mbuv_s sse2 ssse3
|
||||||
|
|
||||||
prototype void vp8_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, B_PREDICTION_MODE b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
|
prototype void vp8_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, int b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
|
||||||
specialize vp8_intra4x4_predict media
|
specialize vp8_intra4x4_predict media
|
||||||
vp8_intra4x4_predict_media=vp8_intra4x4_predict_armv6
|
vp8_intra4x4_predict_media=vp8_intra4x4_predict_armv6
|
||||||
|
|
||||||
@ -530,39 +532,3 @@ fi
|
|||||||
|
|
||||||
# End of encoder only functions
|
# End of encoder only functions
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scaler functions
|
|
||||||
if [ "CONFIG_SPATIAL_RESAMPLING" != "yes" ]; then
|
|
||||||
prototype void vp8_horizontal_line_4_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_last_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_2_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_last_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_3_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_last_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_3_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_last_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_1_2_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_last_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_5_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_5_4_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_5_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_5_3_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_horizontal_line_2_1_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_2_1_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
prototype void vp8_vertical_band_2_1_scale_i "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
|
||||||
fi
|
|
||||||
|
|
||||||
prototype void vp8_yv12_extend_frame_borders "struct yv12_buffer_config *ybf"
|
|
||||||
specialize vp8_yv12_extend_frame_borders neon
|
|
||||||
|
|
||||||
prototype void vp8_yv12_copy_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
|
|
||||||
specialize vp8_yv12_copy_frame neon
|
|
||||||
|
|
||||||
prototype void vp8_yv12_copy_y "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
|
|
||||||
specialize vp8_yv12_copy_y neon
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
|
|
||||||
extern void vp8_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
|
extern void vp8_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
void vp8_idct_dequant_0_2x_sse2
|
void vp8_idct_dequant_0_2x_sse2
|
||||||
(short *q, short *dq ,
|
(short *q, short *dq ,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
#include "filter_x86.h"
|
#include "filter_x86.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "onyxd_int.h"
|
#include "onyxd_int.h"
|
||||||
#include "vp8/common/header.h"
|
#include "vp8/common/header.h"
|
||||||
#include "vp8/common/reconintra4x4.h"
|
#include "vp8/common/reconintra4x4.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "vp8/common/quant_common.h"
|
#include "vp8/common/quant_common.h"
|
||||||
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "vpx_scale/vpxscale.h"
|
#include "vpx_scale/vpxscale.h"
|
||||||
#include "vp8/common/systemdependent.h"
|
#include "vp8/common/systemdependent.h"
|
||||||
#include "vpx_ports/vpx_timer.h"
|
#include "vpx_ports/vpx_timer.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#if !defined(WIN32) && CONFIG_OS_SUPPORT == 1
|
#if !defined(WIN32) && CONFIG_OS_SUPPORT == 1
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
#if HAVE_MEDIA
|
#if HAVE_MEDIA
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/encoder/block.h"
|
#include "vp8/encoder/block.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "vp8/common/reconinter.h"
|
#include "vp8/common/reconinter.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
static const unsigned int NOISE_MOTION_THRESHOLD = 25 * 25;
|
static const unsigned int NOISE_MOTION_THRESHOLD = 25 * 25;
|
||||||
/* SSE_DIFF_THRESHOLD is selected as ~95% confidence assuming
|
/* SSE_DIFF_THRESHOLD is selected as ~95% confidence assuming
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "quantize.h"
|
#include "quantize.h"
|
||||||
#include "vp8/common/reconintra4x4.h"
|
#include "vp8/common/reconintra4x4.h"
|
||||||
#include "encodemb.h"
|
#include "encodemb.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "encodemb.h"
|
#include "encodemb.h"
|
||||||
#include "vp8/common/reconinter.h"
|
#include "vp8/common/reconinter.h"
|
||||||
#include "quantize.h"
|
#include "quantize.h"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "block.h"
|
#include "block.h"
|
||||||
#include "onyx_int.h"
|
#include "onyx_int.h"
|
||||||
#include "vp8/common/variance.h"
|
#include "vp8/common/variance.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "vp8/common/onyxc_int.h"
|
#include "vp8/common/onyxc_int.h"
|
||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
#include "onyx_int.h"
|
#include "onyx_int.h"
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "vp8/common/onyxc_int.h"
|
#include "vp8/common/onyxc_int.h"
|
||||||
#include "onyx_int.h"
|
#include "onyx_int.h"
|
||||||
#include "quantize.h"
|
#include "quantize.h"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vp8/common/pragmas.h"
|
#include "vp8/common/pragmas.h"
|
||||||
#include "tokenize.h"
|
#include "tokenize.h"
|
||||||
#include "treewriter.h"
|
#include "treewriter.h"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "vp8/common/reconinter.h"
|
#include "vp8/common/reconinter.h"
|
||||||
#include "vpx/vpx_integer.h"
|
#include "vpx/vpx_integer.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
|
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_ports/x86.h"
|
#include "vpx_ports/x86.h"
|
||||||
#include "vp8/encoder/block.h"
|
#include "vp8/encoder/block.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx_ports/x86.h"
|
#include "vpx_ports/x86.h"
|
||||||
#include "vp8/encoder/block.h"
|
#include "vp8/encoder/block.h"
|
||||||
|
|
||||||
|
@ -194,3 +194,5 @@ VP8_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/vp8_subpixelvariance16x16s_neon
|
|||||||
|
|
||||||
$(eval $(call asm_offsets_template,\
|
$(eval $(call asm_offsets_template,\
|
||||||
vp8_asm_com_offsets.asm, $(VP8_PREFIX)common/asm_com_offsets.c))
|
vp8_asm_com_offsets.asm, $(VP8_PREFIX)common/asm_com_offsets.c))
|
||||||
|
|
||||||
|
$(eval $(call rtcd_h_template,vp8_rtcd,vp8/common/rtcd_defs.sh))
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
#include "vpx/internal/vpx_codec_internal.h"
|
#include "vpx/internal/vpx_codec_internal.h"
|
||||||
#include "vpx_version.h"
|
#include "vpx_version.h"
|
||||||
@ -582,7 +582,7 @@ static vpx_codec_err_t vp8e_init(vpx_codec_ctx_t *ctx,
|
|||||||
|
|
||||||
struct VP8_COMP *optr;
|
struct VP8_COMP *optr;
|
||||||
|
|
||||||
vpx_rtcd();
|
vp8_rtcd();
|
||||||
|
|
||||||
if (!ctx->priv)
|
if (!ctx->priv)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "vpx_rtcd.h"
|
#include "vp8_rtcd.h"
|
||||||
#include "vpx/vpx_decoder.h"
|
#include "vpx/vpx_decoder.h"
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/internal/vpx_codec_internal.h"
|
#include "vpx/internal/vpx_codec_internal.h"
|
||||||
@ -194,7 +194,7 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx,
|
|||||||
vpx_codec_err_t res = VPX_CODEC_OK;
|
vpx_codec_err_t res = VPX_CODEC_OK;
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
vpx_rtcd();
|
vp8_rtcd();
|
||||||
|
|
||||||
/* This function only allocates space for the vpx_codec_alg_priv_t
|
/* This function only allocates space for the vpx_codec_alg_priv_t
|
||||||
* structure. More memory may be required at the time the stream
|
* structure. More memory may be required at the time the stream
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
DECLARE_ALIGNED(16, const short, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = {
|
DECLARE_ALIGNED(16, const short, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = {
|
||||||
{ 128, 0 },
|
{ 128, 0 },
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_ports/config.h"
|
#include "vpx_ports/config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "vp9/common/subpixel.h"
|
#include "vp9/common/subpixel.h"
|
||||||
#include "vp9/common/loopfilter.h"
|
#include "vp9/common/loopfilter.h"
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
@ -84,5 +84,5 @@ void vp9_machine_specific_config(VP9_COMMON *ctx) {
|
|||||||
vp9_arch_arm_common_init(ctx);
|
vp9_arch_arm_common_init(ctx);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vpx_rtcd();
|
vp9_rtcd();
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "vpx/internal/vpx_codec_internal.h"
|
#include "vpx/internal/vpx_codec_internal.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "loopfilter.h"
|
#include "loopfilter.h"
|
||||||
#include "entropymv.h"
|
#include "entropymv.h"
|
||||||
#include "entropy.h"
|
#include "entropy.h"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "vpx_ports/config.h"
|
#include "vpx_ports/config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "blockd.h"
|
#include "blockd.h"
|
||||||
|
|
||||||
void vp9_recon_b_c
|
void vp9_recon_b_c
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "vpx_ports/config.h"
|
#include "vpx_ports/config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "reconintra.h"
|
#include "reconintra.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "vpx_ports/config.h"
|
#include "vpx_ports/config.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "reconintra.h"
|
#include "reconintra.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
#if CONFIG_NEWBINTRAMODES
|
#if CONFIG_NEWBINTRAMODES
|
||||||
static int find_grad_measure(unsigned char *x, int stride, int n, int t,
|
static int find_grad_measure(unsigned char *x, int stride, int n, int t,
|
||||||
|
@ -9,97 +9,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#define RTCD_C
|
#define RTCD_C
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
#include "vpx_ports/vpx_once.h"
|
||||||
|
|
||||||
#if CONFIG_MULTITHREAD && defined(_WIN32)
|
extern void vpx_scale_rtcd(void);
|
||||||
#include <windows.h>
|
|
||||||
#include <stdlib.h>
|
void vp9_rtcd()
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static CRITICAL_SECTION *lock;
|
|
||||||
static LONG waiters;
|
|
||||||
static int done;
|
|
||||||
void *lock_ptr = &lock;
|
|
||||||
|
|
||||||
/* If the initialization is complete, return early. This isn't just an
|
|
||||||
* optimization, it prevents races on the destruction of the global
|
|
||||||
* lock.
|
|
||||||
*/
|
|
||||||
if(done)
|
|
||||||
return;
|
|
||||||
|
|
||||||
InterlockedIncrement(&waiters);
|
|
||||||
|
|
||||||
/* Get a lock. We create one and try to make it the one-true-lock,
|
|
||||||
* throwing it away if we lost the race.
|
|
||||||
*/
|
|
||||||
|
|
||||||
{
|
|
||||||
/* Scope to protect access to new_lock */
|
|
||||||
CRITICAL_SECTION *new_lock = malloc(sizeof(CRITICAL_SECTION));
|
|
||||||
InitializeCriticalSection(new_lock);
|
|
||||||
if (InterlockedCompareExchangePointer(lock_ptr, new_lock, NULL) != NULL)
|
|
||||||
{
|
|
||||||
DeleteCriticalSection(new_lock);
|
|
||||||
free(new_lock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point, we have a lock that can be synchronized on. We don't
|
|
||||||
* care which thread actually performed the allocation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EnterCriticalSection(lock);
|
|
||||||
|
|
||||||
if (!done)
|
|
||||||
{
|
|
||||||
func();
|
|
||||||
done = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveCriticalSection(lock);
|
|
||||||
|
|
||||||
/* Last one out should free resources. The destructed objects are
|
|
||||||
* protected by checking if(done) above.
|
|
||||||
*/
|
|
||||||
if(!InterlockedDecrement(&waiters))
|
|
||||||
{
|
|
||||||
DeleteCriticalSection(lock);
|
|
||||||
free(lock);
|
|
||||||
lock = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#elif CONFIG_MULTITHREAD && HAVE_PTHREAD_H
|
|
||||||
#include <pthread.h>
|
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static pthread_once_t lock = PTHREAD_ONCE_INIT;
|
|
||||||
pthread_once(&lock, func);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
|
||||||
/* No-op version that performs no synchronization. vpx_rtcd() is idempotent,
|
|
||||||
* so as long as your platform provides atomic loads/stores of pointers
|
|
||||||
* no synchronization is strictly necessary.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void once(void (*func)(void))
|
|
||||||
{
|
|
||||||
static int done;
|
|
||||||
|
|
||||||
if(!done)
|
|
||||||
{
|
|
||||||
func();
|
|
||||||
done = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void vpx_rtcd()
|
|
||||||
{
|
{
|
||||||
|
vpx_scale_rtcd();
|
||||||
once(setup_rtcd_internal);
|
once(setup_rtcd_internal);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
common_forward_decls() {
|
vp9_common_forward_decls() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
/*
|
||||||
|
* VP9
|
||||||
|
*/
|
||||||
|
|
||||||
struct loop_filter_info;
|
struct loop_filter_info;
|
||||||
struct blockd;
|
struct blockd;
|
||||||
@ -12,14 +15,11 @@ struct macroblock;
|
|||||||
struct variance_vtable;
|
struct variance_vtable;
|
||||||
|
|
||||||
#define DEC_MVCOSTS int *mvjcost, int *mvcost[2]
|
#define DEC_MVCOSTS int *mvjcost, int *mvcost[2]
|
||||||
|
|
||||||
/* Encoder forward decls */
|
|
||||||
struct variance_vtable;
|
|
||||||
union int_mv;
|
union int_mv;
|
||||||
struct yv12_buffer_config;
|
struct yv12_buffer_config;
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
forward_decls common_forward_decls
|
forward_decls vp9_common_forward_decls
|
||||||
|
|
||||||
prototype void vp9_filter_block2d_4x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
|
prototype void vp9_filter_block2d_4x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
|
||||||
prototype void vp9_filter_block2d_8x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
|
prototype void vp9_filter_block2d_8x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
|
||||||
@ -94,9 +94,6 @@ vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
|
|||||||
prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
|
prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
|
||||||
specialize vp9_copy_mem8x4 mmx
|
specialize vp9_copy_mem8x4 mmx
|
||||||
|
|
||||||
prototype void vp9_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, B_PREDICTION_MODE b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
|
|
||||||
specialize vp9_intra4x4_predict
|
|
||||||
|
|
||||||
prototype void vp9_avg_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
|
prototype void vp9_avg_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
|
||||||
specialize vp9_avg_mem16x16
|
specialize vp9_avg_mem16x16
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <emmintrin.h> // SSE2
|
#include <emmintrin.h> // SSE2
|
||||||
#include "vp9/common/filter.h"
|
#include "vp9/common/filter.h"
|
||||||
#include "vpx_ports/mem.h" // for DECLARE_ALIGNED
|
#include "vpx_ports/mem.h" // for DECLARE_ALIGNED
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
// TODO(cd): After cleanup, commit faster versions for non 4x4 size. This is
|
// TODO(cd): After cleanup, commit faster versions for non 4x4 size. This is
|
||||||
// just a quick partial snapshot so that other can already use some
|
// just a quick partial snapshot so that other can already use some
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <smmintrin.h> // SSE4.1
|
#include <smmintrin.h> // SSE4.1
|
||||||
#include "vp9/common/filter.h"
|
#include "vp9/common/filter.h"
|
||||||
#include "vpx_ports/mem.h" // for DECLARE_ALIGNED
|
#include "vpx_ports/mem.h" // for DECLARE_ALIGNED
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
// TODO(cd): After cleanup, commit faster versions for non 4x4 size. This is
|
// TODO(cd): After cleanup, commit faster versions for non 4x4 size. This is
|
||||||
// just a quick partial snapshot so that other can already use some
|
// just a quick partial snapshot so that other can already use some
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <emmintrin.h> // SSE2
|
#include <emmintrin.h> // SSE2
|
||||||
#include "./vpx_config.h"
|
#include "./vpx_config.h"
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vp9_rtcd.h"
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_SSE2
|
#if HAVE_SSE2
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "vp9/common/seg_common.h"
|
#include "vp9/common/seg_common.h"
|
||||||
#include "vp9/common/entropy.h"
|
#include "vp9/common/entropy.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "dequantize.h"
|
#include "dequantize.h"
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
|
|
||||||
void vp9_dequant_dc_idct_add_y_block_c(short *q, short *dq,
|
void vp9_dequant_dc_idct_add_y_block_c(short *q, short *dq,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_config.h"
|
#include "vpx_config.h"
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vp9_rtcd.h"
|
||||||
|
|
||||||
#if HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "vp9/common/reconintra.h"
|
#include "vp9/common/reconintra.h"
|
||||||
#include "vp9/common/seg_common.h"
|
#include "vp9/common/seg_common.h"
|
||||||
#include "vp9/encoder/tokenize.h"
|
#include "vp9/encoder/tokenize.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vpx_ports/config.h"
|
#include "vpx_ports/config.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "vp9/common/idct.h"
|
#include "vp9/common/idct.h"
|
||||||
#include "quantize.h"
|
#include "quantize.h"
|
||||||
#include "vp9/common/reconintra.h"
|
#include "vp9/common/reconintra.h"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "rdopt.h"
|
#include "rdopt.h"
|
||||||
#include "vp9/common/systemdependent.h"
|
#include "vp9/common/systemdependent.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
|
|
||||||
#if CONFIG_RUNTIME_CPU_DETECT
|
#if CONFIG_RUNTIME_CPU_DETECT
|
||||||
#define IF_RTCD(x) (x)
|
#define IF_RTCD(x) (x)
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "vp9/common/seg_common.h"
|
#include "vp9/common/seg_common.h"
|
||||||
#include "vp9/common/pred_common.h"
|
#include "vp9/common/pred_common.h"
|
||||||
#include "vp9/common/entropy.h"
|
#include "vp9/common/entropy.h"
|
||||||
#include "vpx_rtcd.h"
|
#include "vp9_rtcd.h"
|
||||||
#include "vp9/common/mvref_common.h"
|
#include "vp9/common/mvref_common.h"
|
||||||
|
|
||||||
#if CONFIG_RUNTIME_CPU_DETECT
|
#if CONFIG_RUNTIME_CPU_DETECT
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vp9_rtcd.h"
|
||||||
unsigned int vp9_satd16x16_c(const unsigned char *src_ptr,
|
unsigned int vp9_satd16x16_c(const unsigned char *src_ptr,
|
||||||
int src_stride,
|
int src_stride,
|
||||||
const unsigned char *ref_ptr,
|
const unsigned char *ref_ptr,
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
data vpx_codec_vp8_dx_algo
|
data vpx_codec_vp9_dx_algo
|
||||||
text vpx_codec_vp8_dx
|
text vpx_codec_vp9_dx
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
data vpx_codec_vp8_cx_algo
|
data vpx_codec_vp9_cx_algo
|
||||||
text vpx_codec_vp8_cx
|
text vpx_codec_vp9_cx
|
||||||
data vpx_codec_vp8x_cx_algo
|
data vpx_codec_vp9x_cx_algo
|
||||||
text vpx_codec_vp8x_cx
|
text vpx_codec_vp9x_cx
|
||||||
|
@ -182,3 +182,5 @@ VP9_COMMON_SRCS-$(HAVE_ARMV7) += common/arm/neon/recon_neon.c
|
|||||||
|
|
||||||
$(eval $(call asm_offsets_template,\
|
$(eval $(call asm_offsets_template,\
|
||||||
vp9_asm_com_offsets.asm, $(VP9_PREFIX)common/asm_com_offsets.c))
|
vp9_asm_com_offsets.asm, $(VP9_PREFIX)common/asm_com_offsets.c))
|
||||||
|
|
||||||
|
$(eval $(call rtcd_h_template,vp9_rtcd,vp9/common/rtcd_defs.sh))
|
||||||
|
@ -1083,8 +1083,8 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] = {
|
|||||||
#ifndef VERSION_STRING
|
#ifndef VERSION_STRING
|
||||||
#define VERSION_STRING
|
#define VERSION_STRING
|
||||||
#endif
|
#endif
|
||||||
CODEC_INTERFACE(vpx_codec_vp8_cx) = {
|
CODEC_INTERFACE(vpx_codec_vp9_cx) = {
|
||||||
"WebM Project VP8 Encoder" VERSION_STRING,
|
"WebM Project VP9 Encoder" VERSION_STRING,
|
||||||
VPX_CODEC_INTERNAL_ABI_VERSION,
|
VPX_CODEC_INTERNAL_ABI_VERSION,
|
||||||
VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR |
|
VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR |
|
||||||
VPX_CODEC_CAP_OUTPUT_PARTITION,
|
VPX_CODEC_CAP_OUTPUT_PARTITION,
|
||||||
@ -1113,7 +1113,7 @@ CODEC_INTERFACE(vpx_codec_vp8_cx) = {
|
|||||||
|
|
||||||
#if CONFIG_EXPERIMENTAL
|
#if CONFIG_EXPERIMENTAL
|
||||||
|
|
||||||
CODEC_INTERFACE(vpx_codec_vp8x_cx) = {
|
CODEC_INTERFACE(vpx_codec_vp9x_cx) = {
|
||||||
"VP8 Experimental Encoder" VERSION_STRING,
|
"VP8 Experimental Encoder" VERSION_STRING,
|
||||||
VPX_CODEC_INTERNAL_ABI_VERSION,
|
VPX_CODEC_INTERNAL_ABI_VERSION,
|
||||||
VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR,
|
VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR,
|
||||||
|
@ -659,8 +659,8 @@ static vpx_codec_ctrl_fn_map_t ctf_maps[] = {
|
|||||||
#ifndef VERSION_STRING
|
#ifndef VERSION_STRING
|
||||||
#define VERSION_STRING
|
#define VERSION_STRING
|
||||||
#endif
|
#endif
|
||||||
CODEC_INTERFACE(vpx_codec_vp8_dx) = {
|
CODEC_INTERFACE(vpx_codec_vp9_dx) = {
|
||||||
"WebM Project VP8 Decoder" VERSION_STRING,
|
"WebM Project VP9 Decoder" VERSION_STRING,
|
||||||
VPX_CODEC_INTERNAL_ABI_VERSION,
|
VPX_CODEC_INTERNAL_ABI_VERSION,
|
||||||
VPX_CODEC_CAP_DECODER | VP8_CAP_POSTPROC,
|
VPX_CODEC_CAP_DECODER | VP8_CAP_POSTPROC,
|
||||||
/* vpx_codec_caps_t caps; */
|
/* vpx_codec_caps_t caps; */
|
||||||
|
@ -34,8 +34,10 @@ extern vpx_codec_iface_t vpx_codec_vp8_cx_algo;
|
|||||||
extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
|
extern vpx_codec_iface_t *vpx_codec_vp8_cx(void);
|
||||||
|
|
||||||
/* TODO(jkoleszar): These move to VP9 in a later patch set. */
|
/* TODO(jkoleszar): These move to VP9 in a later patch set. */
|
||||||
extern vpx_codec_iface_t vpx_codec_vp8x_cx_algo;
|
extern vpx_codec_iface_t vpx_codec_vp9_cx_algo;
|
||||||
extern vpx_codec_iface_t *vpx_codec_vp8x_cx(void);
|
extern vpx_codec_iface_t *vpx_codec_vp9_cx(void);
|
||||||
|
extern vpx_codec_iface_t vpx_codec_vp9x_cx_algo;
|
||||||
|
extern vpx_codec_iface_t *vpx_codec_vp9x_cx(void);
|
||||||
|
|
||||||
/*!@} - end algorithm interface member group*/
|
/*!@} - end algorithm interface member group*/
|
||||||
|
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
*/
|
*/
|
||||||
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
|
||||||
extern vpx_codec_iface_t *vpx_codec_vp8_dx(void);
|
extern vpx_codec_iface_t *vpx_codec_vp8_dx(void);
|
||||||
|
|
||||||
|
/* TODO(jkoleszar): These move to VP9 in a later patch set. */
|
||||||
|
extern vpx_codec_iface_t vpx_codec_vp9_dx_algo;
|
||||||
|
extern vpx_codec_iface_t *vpx_codec_vp9_dx(void);
|
||||||
/*!@} - end algorithm interface member group*/
|
/*!@} - end algorithm interface member group*/
|
||||||
|
|
||||||
/* Include controls common to both the encoder and decoder */
|
/* Include controls common to both the encoder and decoder */
|
||||||
|
97
vpx_ports/vpx_once.h
Normal file
97
vpx_ports/vpx_once.h
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include "vpx_config.h"
|
||||||
|
|
||||||
|
#if CONFIG_MULTITHREAD && defined(_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
static void once(void (*func)(void))
|
||||||
|
{
|
||||||
|
static CRITICAL_SECTION *lock;
|
||||||
|
static LONG waiters;
|
||||||
|
static int done;
|
||||||
|
void *lock_ptr = &lock;
|
||||||
|
|
||||||
|
/* If the initialization is complete, return early. This isn't just an
|
||||||
|
* optimization, it prevents races on the destruction of the global
|
||||||
|
* lock.
|
||||||
|
*/
|
||||||
|
if(done)
|
||||||
|
return;
|
||||||
|
|
||||||
|
InterlockedIncrement(&waiters);
|
||||||
|
|
||||||
|
/* Get a lock. We create one and try to make it the one-true-lock,
|
||||||
|
* throwing it away if we lost the race.
|
||||||
|
*/
|
||||||
|
|
||||||
|
{
|
||||||
|
/* Scope to protect access to new_lock */
|
||||||
|
CRITICAL_SECTION *new_lock = malloc(sizeof(CRITICAL_SECTION));
|
||||||
|
InitializeCriticalSection(new_lock);
|
||||||
|
if (InterlockedCompareExchangePointer(lock_ptr, new_lock, NULL) != NULL)
|
||||||
|
{
|
||||||
|
DeleteCriticalSection(new_lock);
|
||||||
|
free(new_lock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* At this point, we have a lock that can be synchronized on. We don't
|
||||||
|
* care which thread actually performed the allocation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EnterCriticalSection(lock);
|
||||||
|
|
||||||
|
if (!done)
|
||||||
|
{
|
||||||
|
func();
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
LeaveCriticalSection(lock);
|
||||||
|
|
||||||
|
/* Last one out should free resources. The destructed objects are
|
||||||
|
* protected by checking if(done) above.
|
||||||
|
*/
|
||||||
|
if(!InterlockedDecrement(&waiters))
|
||||||
|
{
|
||||||
|
DeleteCriticalSection(lock);
|
||||||
|
free(lock);
|
||||||
|
lock = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#elif CONFIG_MULTITHREAD && HAVE_PTHREAD_H
|
||||||
|
#include <pthread.h>
|
||||||
|
static void once(void (*func)(void))
|
||||||
|
{
|
||||||
|
static pthread_once_t lock = PTHREAD_ONCE_INIT;
|
||||||
|
pthread_once(&lock, func);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
/* No-op version that performs no synchronization. vp8_rtcd() is idempotent,
|
||||||
|
* so as long as your platform provides atomic loads/stores of pointers
|
||||||
|
* no synchronization is strictly necessary.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void once(void (*func)(void))
|
||||||
|
{
|
||||||
|
static int done;
|
||||||
|
|
||||||
|
if(!done)
|
||||||
|
{
|
||||||
|
func();
|
||||||
|
done = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
@ -20,7 +20,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Header Files
|
* Header Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#include "./vpx_rtcd.h"
|
#include "./vpx_scale_rtcd.h"
|
||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
#include "vpx_scale/yv12config.h"
|
#include "vpx_scale/yv12config.h"
|
||||||
#include "vpx_scale/scale_mode.h"
|
#include "vpx_scale/scale_mode.h"
|
||||||
|
18
vpx_scale/rtcd.c
Normal file
18
vpx_scale/rtcd.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The WebM project authors. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license
|
||||||
|
* that can be found in the LICENSE file in the root of the source
|
||||||
|
* tree. An additional intellectual property rights grant can be found
|
||||||
|
* in the file PATENTS. All contributing project authors may
|
||||||
|
* be found in the AUTHORS file in the root of the source tree.
|
||||||
|
*/
|
||||||
|
#include "vpx_config.h"
|
||||||
|
#define RTCD_C
|
||||||
|
#include "vpx_scale_rtcd.h"
|
||||||
|
#include "vpx_ports/vpx_once.h"
|
||||||
|
|
||||||
|
void vpx_scale_rtcd()
|
||||||
|
{
|
||||||
|
once(setup_rtcd_internal);
|
||||||
|
}
|
@ -6,6 +6,7 @@ SCALE_SRCS-yes += generic/vpxscale.c
|
|||||||
SCALE_SRCS-yes += generic/yv12config.c
|
SCALE_SRCS-yes += generic/yv12config.c
|
||||||
SCALE_SRCS-yes += generic/yv12extend.c
|
SCALE_SRCS-yes += generic/yv12extend.c
|
||||||
SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c
|
SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c
|
||||||
|
SCALE_SRCS-yes += rtcd.c
|
||||||
|
|
||||||
#neon
|
#neon
|
||||||
SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM)
|
SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM)
|
||||||
@ -15,3 +16,5 @@ SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_extendframeborders_neon$(ASM)
|
|||||||
SCALE_SRCS-$(HAVE_NEON) += arm/neon/yv12extend_arm.c
|
SCALE_SRCS-$(HAVE_NEON) += arm/neon/yv12extend_arm.c
|
||||||
|
|
||||||
SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes)
|
SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes)
|
||||||
|
|
||||||
|
$(eval $(call rtcd_h_template,vpx_scale_rtcd,vpx_scale/vpx_scale_rtcd.sh))
|
||||||
|
41
vpx_scale/vpx_scale_rtcd.sh
Normal file
41
vpx_scale/vpx_scale_rtcd.sh
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
vpx_scale_forward_decls() {
|
||||||
|
cat <<EOF
|
||||||
|
struct yv12_buffer_config;
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
forward_decls vpx_scale_forward_decls
|
||||||
|
|
||||||
|
# Scaler functions
|
||||||
|
if [ "CONFIG_SPATIAL_RESAMPLING" != "yes" ]; then
|
||||||
|
prototype void vp8_horizontal_line_4_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_last_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_2_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_last_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_3_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_last_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_3_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_last_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_1_2_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_last_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_5_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_5_4_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_5_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_5_3_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_horizontal_line_2_1_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_2_1_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
prototype void vp8_vertical_band_2_1_scale_i "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
|
||||||
|
fi
|
||||||
|
|
||||||
|
prototype void vp8_yv12_extend_frame_borders "struct yv12_buffer_config *ybf"
|
||||||
|
specialize vp8_yv12_extend_frame_borders neon
|
||||||
|
|
||||||
|
prototype void vp8_yv12_copy_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
|
||||||
|
specialize vp8_yv12_copy_frame neon
|
||||||
|
|
||||||
|
prototype void vp8_yv12_copy_y "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
|
||||||
|
specialize vp8_yv12_copy_y neon
|
13
vpxdec.c
13
vpxdec.c
@ -49,6 +49,7 @@
|
|||||||
static const char *exec_name;
|
static const char *exec_name;
|
||||||
|
|
||||||
#define VP8_FOURCC (0x00385056)
|
#define VP8_FOURCC (0x00385056)
|
||||||
|
#define VP9_FOURCC (0x00395056)
|
||||||
static const struct {
|
static const struct {
|
||||||
char const *name;
|
char const *name;
|
||||||
const vpx_codec_iface_t *(*iface)(void);
|
const vpx_codec_iface_t *(*iface)(void);
|
||||||
@ -59,7 +60,7 @@ static const struct {
|
|||||||
{"vp8", vpx_codec_vp8_dx, VP8_FOURCC, 0x00FFFFFF},
|
{"vp8", vpx_codec_vp8_dx, VP8_FOURCC, 0x00FFFFFF},
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_VP9_DECODER
|
#if CONFIG_VP9_DECODER
|
||||||
{"vp9", vpx_codec_vp8_dx, VP8_FOURCC, 0x00FFFFFF},
|
{"vp9", vpx_codec_vp9_dx, VP9_FOURCC, 0x00FFFFFF},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,7 +110,7 @@ static const arg_def_t *all_args[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER
|
||||||
static const arg_def_t addnoise_level = ARG_DEF(NULL, "noise-level", 1,
|
static const arg_def_t addnoise_level = ARG_DEF(NULL, "noise-level", 1,
|
||||||
"Enable VP8 postproc add noise");
|
"Enable VP8 postproc add noise");
|
||||||
static const arg_def_t deblock = ARG_DEF(NULL, "deblock", 0,
|
static const arg_def_t deblock = ARG_DEF(NULL, "deblock", 0,
|
||||||
@ -142,7 +143,7 @@ static void usage_exit() {
|
|||||||
fprintf(stderr, "Usage: %s <options> filename\n\n"
|
fprintf(stderr, "Usage: %s <options> filename\n\n"
|
||||||
"Options:\n", exec_name);
|
"Options:\n", exec_name);
|
||||||
arg_show_usage(stderr, all_args);
|
arg_show_usage(stderr, all_args);
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER
|
||||||
fprintf(stderr, "\nVP8 Postprocessing Options:\n");
|
fprintf(stderr, "\nVP8 Postprocessing Options:\n");
|
||||||
arg_show_usage(stderr, vp8_pp_args);
|
arg_show_usage(stderr, vp8_pp_args);
|
||||||
#endif
|
#endif
|
||||||
@ -692,7 +693,7 @@ int main(int argc, const char **argv_) {
|
|||||||
unsigned int fps_num;
|
unsigned int fps_num;
|
||||||
void *out = NULL;
|
void *out = NULL;
|
||||||
vpx_codec_dec_cfg_t cfg = {0};
|
vpx_codec_dec_cfg_t cfg = {0};
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER
|
||||||
vp8_postproc_cfg_t vp8_pp_cfg = {0};
|
vp8_postproc_cfg_t vp8_pp_cfg = {0};
|
||||||
int vp8_dbg_color_ref_frame = 0;
|
int vp8_dbg_color_ref_frame = 0;
|
||||||
int vp8_dbg_color_mb_modes = 0;
|
int vp8_dbg_color_mb_modes = 0;
|
||||||
@ -752,7 +753,7 @@ int main(int argc, const char **argv_) {
|
|||||||
else if (arg_match(&arg, &verbosearg, argi))
|
else if (arg_match(&arg, &verbosearg, argi))
|
||||||
quiet = 0;
|
quiet = 0;
|
||||||
|
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER
|
||||||
else if (arg_match(&arg, &addnoise_level, argi)) {
|
else if (arg_match(&arg, &addnoise_level, argi)) {
|
||||||
postproc = 1;
|
postproc = 1;
|
||||||
vp8_pp_cfg.post_proc_flag |= VP8_ADDNOISE;
|
vp8_pp_cfg.post_proc_flag |= VP8_ADDNOISE;
|
||||||
@ -924,7 +925,7 @@ int main(int argc, const char **argv_) {
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
fprintf(stderr, "%s\n", decoder.name);
|
fprintf(stderr, "%s\n", decoder.name);
|
||||||
|
|
||||||
#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
|
#if CONFIG_VP8_DECODER
|
||||||
|
|
||||||
if (vp8_pp_cfg.post_proc_flag
|
if (vp8_pp_cfg.post_proc_flag
|
||||||
&& vpx_codec_control(&decoder, VP8_SET_POSTPROC, &vp8_pp_cfg)) {
|
&& vpx_codec_control(&decoder, VP8_SET_POSTPROC, &vp8_pp_cfg)) {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user