Compare commits
426 Commits
openh264v1
...
v1.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2610ab1832 | ||
|
|
1072deea64 | ||
|
|
9e1f1790e3 | ||
|
|
fdc713099e | ||
|
|
32c51ecb11 | ||
|
|
c24aad5654 | ||
|
|
f99f65099b | ||
|
|
e007606545 | ||
|
|
9c88070c6e | ||
|
|
6e052edcef | ||
|
|
fcab199083 | ||
|
|
aa2c5cee0d | ||
|
|
68c6835c76 | ||
|
|
e86a91498d | ||
|
|
97ba688a54 | ||
|
|
02904aa40e | ||
|
|
a58e169ee8 | ||
|
|
0b2d724c3e | ||
|
|
d6b1680842 | ||
|
|
c6714d395f | ||
|
|
ba5a21705b | ||
|
|
b548bd098e | ||
|
|
ccf994f00a | ||
|
|
7fc14895ee | ||
|
|
8599789ac0 | ||
|
|
a1e09bf8c0 | ||
|
|
53c057a8a8 | ||
|
|
5c301defba | ||
|
|
829f216dbf | ||
|
|
d0d7ad57c2 | ||
|
|
8994f1f757 | ||
|
|
f383137fe1 | ||
|
|
0474068503 | ||
|
|
c31e4e23f2 | ||
|
|
1c3f7b2b11 | ||
|
|
e0d43a8a1f | ||
|
|
77bd41ca7e | ||
|
|
4d063b84cc | ||
|
|
5373b8a3aa | ||
|
|
64657d3cfd | ||
|
|
69a62ea58e | ||
|
|
28d7d303e3 | ||
|
|
12d50ad565 | ||
|
|
e8d09bac0c | ||
|
|
e84284523a | ||
|
|
2c830e64d7 | ||
|
|
c48f47ab19 | ||
|
|
9add9883b1 | ||
|
|
fdabca4cc9 | ||
|
|
f21fffda3b | ||
|
|
fd7a02b557 | ||
|
|
8c7ef9c1a7 | ||
|
|
d1fc002430 | ||
|
|
646f3e92de | ||
|
|
96de6e0158 | ||
|
|
7b286bc637 | ||
|
|
5d9b95288f | ||
|
|
7da20f8738 | ||
|
|
27a9af0b09 | ||
|
|
195dbdd5bd | ||
|
|
ab4e0df75a | ||
|
|
1173f879f1 | ||
|
|
2b59746c68 | ||
|
|
47d6ac3b57 | ||
|
|
bf33bde15d | ||
|
|
c9f19241fb | ||
|
|
d569a0276b | ||
|
|
82e7dcd84f | ||
|
|
8a96d06fa2 | ||
|
|
669089d63a | ||
|
|
5ebb64cc45 | ||
|
|
c0808f1f1d | ||
|
|
97351a5cdf | ||
|
|
0fb5242b86 | ||
|
|
68d9bc230d | ||
|
|
2273624a6a | ||
|
|
d7b344f18d | ||
|
|
e90068c234 | ||
|
|
c45e08a984 | ||
|
|
6ba10ce6f3 | ||
|
|
be2b7f196f | ||
|
|
6ab697ef78 | ||
|
|
47dcacee83 | ||
|
|
6b4912c716 | ||
|
|
930161c6cc | ||
|
|
9aafb779eb | ||
|
|
e621610776 | ||
|
|
e42ce60cc9 | ||
|
|
6b503843ec | ||
|
|
bc8dfcd1f4 | ||
|
|
11e0fc8376 | ||
|
|
0400792778 | ||
|
|
87c7307391 | ||
|
|
ab370cd607 | ||
|
|
3c06753dcc | ||
|
|
091805b883 | ||
|
|
f30ad4e512 | ||
|
|
36a7aca674 | ||
|
|
9319301621 | ||
|
|
2c7857ab53 | ||
|
|
4ecdd071ff | ||
|
|
a0c9f02bde | ||
|
|
057799e298 | ||
|
|
c0feee817d | ||
|
|
24d8b8a82c | ||
|
|
b6ddfabf2b | ||
|
|
11c7bfa098 | ||
|
|
2407292882 | ||
|
|
d48b8b49d0 | ||
|
|
663bd94038 | ||
|
|
70d08736dd | ||
|
|
7c739795b7 | ||
|
|
f743f04ed7 | ||
|
|
282eda21cb | ||
|
|
41caf38152 | ||
|
|
1f8ef8f0a3 | ||
|
|
703cce0214 | ||
|
|
95ad76f65d | ||
|
|
e70621c194 | ||
|
|
cae5af52d7 | ||
|
|
a8ae134610 | ||
|
|
49b569a018 | ||
|
|
ee09f4d7bf | ||
|
|
9f0d51d8d2 | ||
|
|
a4bddf417e | ||
|
|
338a448946 | ||
|
|
d04c7b9347 | ||
|
|
522639f768 | ||
|
|
507ffbadb6 | ||
|
|
159ca4461f | ||
|
|
43ca6db9f5 | ||
|
|
f265ab8e85 | ||
|
|
bee0d7d230 | ||
|
|
1308027377 | ||
|
|
57bd721b2f | ||
|
|
dfcc78eaf5 | ||
|
|
82a0d3e4a2 | ||
|
|
e6e46f84f3 | ||
|
|
4c8347aa22 | ||
|
|
0f1371e461 | ||
|
|
d0a1b58374 | ||
|
|
2a15a7975f | ||
|
|
25dd5c3c6f | ||
|
|
a4fb978bb7 | ||
|
|
c51975acdf | ||
|
|
c8bed8a9bd | ||
|
|
3a131800a8 | ||
|
|
99aaf3198c | ||
|
|
fe965a2444 | ||
|
|
9be80c088d | ||
|
|
356f081f0a | ||
|
|
93af25eaef | ||
|
|
2ca6af54b9 | ||
|
|
dea4303357 | ||
|
|
443630b098 | ||
|
|
e9429e2f93 | ||
|
|
bf44265c2c | ||
|
|
ee4dafaa70 | ||
|
|
3cb417f14a | ||
|
|
daee3dcf22 | ||
|
|
9ecc671fc3 | ||
|
|
22cb778730 | ||
|
|
71d0a7f71f | ||
|
|
89d5ad249f | ||
|
|
4fb4c9536f | ||
|
|
dea37ce439 | ||
|
|
52cd5d99ab | ||
|
|
6ff4ef3b38 | ||
|
|
78e0ec6130 | ||
|
|
3052b7ac64 | ||
|
|
764793d74b | ||
|
|
ca51ee0f44 | ||
|
|
51efa57a3d | ||
|
|
723044837a | ||
|
|
43767cddb6 | ||
|
|
e1840a0ed6 | ||
|
|
8796e40f89 | ||
|
|
c2b79fa51d | ||
|
|
2ff38e9175 | ||
|
|
84b441d4e4 | ||
|
|
6f64f2372e | ||
|
|
0237194f6e | ||
|
|
32d1510d29 | ||
|
|
682b0b7335 | ||
|
|
aeed1fa677 | ||
|
|
b2c08598bc | ||
|
|
70de76a253 | ||
|
|
f2d391980e | ||
|
|
c930424642 | ||
|
|
8ca76ec342 | ||
|
|
a3c96509ec | ||
|
|
ebbcb67fb7 | ||
|
|
26c1ce2d05 | ||
|
|
c618b44b9e | ||
|
|
c134aa753a | ||
|
|
b052a9580e | ||
|
|
8c60f84f7b | ||
|
|
0298b3f580 | ||
|
|
a9d0d90ed2 | ||
|
|
ece17ff1b4 | ||
|
|
f76325edc7 | ||
|
|
87f22d35fb | ||
|
|
c3cfce5223 | ||
|
|
b0a822dd30 | ||
|
|
b55292413b | ||
|
|
9d1ff982a7 | ||
|
|
87eabf2721 | ||
|
|
ed73d51945 | ||
|
|
5588e82fce | ||
|
|
7150d4feb1 | ||
|
|
93a5597c11 | ||
|
|
b8592d105b | ||
|
|
92237fa329 | ||
|
|
fc97e3a602 | ||
|
|
9ed902a8d7 | ||
|
|
3a42ae54cf | ||
|
|
ccaf242b80 | ||
|
|
1239bb24ba | ||
|
|
5eb11b5329 | ||
|
|
9442a7a0b5 | ||
|
|
11c159b6a2 | ||
|
|
8b7af7cbef | ||
|
|
585b61626c | ||
|
|
1b97daab20 | ||
|
|
d15afbbee0 | ||
|
|
7a3ef3a003 | ||
|
|
4da932426c | ||
|
|
a62784e482 | ||
|
|
e757dce0e4 | ||
|
|
a484681202 | ||
|
|
7d7a5c28bc | ||
|
|
a3ab13c30d | ||
|
|
85869921d3 | ||
|
|
b90eca78cd | ||
|
|
89728faf8d | ||
|
|
5994075317 | ||
|
|
df994fa3f5 | ||
|
|
61027613dd | ||
|
|
b05468b5c1 | ||
|
|
31453e3072 | ||
|
|
853423b5ad | ||
|
|
1d1b4f1d30 | ||
|
|
f5b7513df6 | ||
|
|
0ca7ff49e2 | ||
|
|
95ac72754e | ||
|
|
5c7fe31277 | ||
|
|
d152c25485 | ||
|
|
8c66a7c2f8 | ||
|
|
569e7d1253 | ||
|
|
8c5f36ba23 | ||
|
|
0185a07e7a | ||
|
|
7a80c21526 | ||
|
|
dd913ef878 | ||
|
|
239e22d088 | ||
|
|
652ee84e0d | ||
|
|
2af19fa654 | ||
|
|
cf33d7031e | ||
|
|
2453042bf0 | ||
|
|
6e3e42b625 | ||
|
|
9ac4c8208e | ||
|
|
b2f1cbaae9 | ||
|
|
b7fb9414c5 | ||
|
|
6d5ef0ba2d | ||
|
|
b3342fa11a | ||
|
|
f1d1af0d34 | ||
|
|
84a5f883db | ||
|
|
38ffbf7df4 | ||
|
|
00168404b7 | ||
|
|
7c868cab4d | ||
|
|
61b82d28c4 | ||
|
|
55a5272f68 | ||
|
|
3aed85f717 | ||
|
|
fc4e905891 | ||
|
|
b19041c1b0 | ||
|
|
f21aaa1cd4 | ||
|
|
65d6826470 | ||
|
|
ad9e65b96a | ||
|
|
8d34c68ad6 | ||
|
|
613a7a0ead | ||
|
|
67723a5122 | ||
|
|
2bd89983cd | ||
|
|
2d2c5d0112 | ||
|
|
15a8977ad8 | ||
|
|
9bda41b1ae | ||
|
|
617f7c5d73 | ||
|
|
a9c6a9d760 | ||
|
|
02354832cf | ||
|
|
ec99a3bcc5 | ||
|
|
f324c354b1 | ||
|
|
baf93a340e | ||
|
|
3c8e2a1792 | ||
|
|
ecd6102688 | ||
|
|
5cf163449f | ||
|
|
faf1bdde0f | ||
|
|
b1570b17be | ||
|
|
a00e2e7229 | ||
|
|
7d3bb19bed | ||
|
|
db750af868 | ||
|
|
8e26d9c31c | ||
|
|
31a9fb6913 | ||
|
|
486f2daf3d | ||
|
|
81df4c6972 | ||
|
|
f78db981f8 | ||
|
|
c24c967c65 | ||
|
|
9ebab7094f | ||
|
|
f077d51f7e | ||
|
|
75251b5af7 | ||
|
|
33e4f14be4 | ||
|
|
fed2043f8d | ||
|
|
4f527a0fb6 | ||
|
|
615b0b53d1 | ||
|
|
dac13639c9 | ||
|
|
15b7bc22c3 | ||
|
|
dc59a7586f | ||
|
|
3b01ce3f82 | ||
|
|
e9916c7592 | ||
|
|
9acca331c0 | ||
|
|
24f8f2138a | ||
|
|
a436676bc8 | ||
|
|
350b69bbf0 | ||
|
|
2b33c74993 | ||
|
|
e5439b4533 | ||
|
|
dc661a6139 | ||
|
|
473f2e3d42 | ||
|
|
d0eec6df78 | ||
|
|
c8ee9a0308 | ||
|
|
cffd2df923 | ||
|
|
91800fbc49 | ||
|
|
aa0fa56cdc | ||
|
|
95a46f1fc6 | ||
|
|
0e99473a46 | ||
|
|
8368f66afe | ||
|
|
513dfde31c | ||
|
|
4f8c4f5925 | ||
|
|
f39f58e9db | ||
|
|
15c71312d2 | ||
|
|
f619c16840 | ||
|
|
864ff21021 | ||
|
|
f092b2a478 | ||
|
|
18dc37a887 | ||
|
|
7e3c06421f | ||
|
|
ea4f7f1b89 | ||
|
|
052a379ec3 | ||
|
|
7b52c402db | ||
|
|
8c2ee58fd9 | ||
|
|
cfea91666c | ||
|
|
1922b533f6 | ||
|
|
8b679cad73 | ||
|
|
6a31bc3785 | ||
|
|
2a9035a571 | ||
|
|
d718ad89f4 | ||
|
|
46d1c93016 | ||
|
|
2f0b6c8f14 | ||
|
|
cf3845779f | ||
|
|
60a6dceb7d | ||
|
|
4d913096a1 | ||
|
|
78ab4000c0 | ||
|
|
20f28cd2f2 | ||
|
|
050c683a27 | ||
|
|
f771347483 | ||
|
|
8abe601d33 | ||
|
|
ee4ae13ce3 | ||
|
|
819f379837 | ||
|
|
649456a2a3 | ||
|
|
7751d756b0 | ||
|
|
ae0f6cc465 | ||
|
|
0995390c4a | ||
|
|
d8202cf38f | ||
|
|
cdce1b73ca | ||
|
|
0b0884874d | ||
|
|
573a9f394e | ||
|
|
2b1c815184 | ||
|
|
62bcf95d8c | ||
|
|
4768087556 | ||
|
|
b60d91f78e | ||
|
|
b98e7c1f7d | ||
|
|
19bcb45c22 | ||
|
|
b6a1e1ce83 | ||
|
|
2673f0a579 | ||
|
|
cbc5681c01 | ||
|
|
149e029c27 | ||
|
|
4c352d13f3 | ||
|
|
3dbc36cdda | ||
|
|
91b186ddc8 | ||
|
|
dd1d979d33 | ||
|
|
bd8ad20e8a | ||
|
|
88f5d1dde7 | ||
|
|
a384df3246 | ||
|
|
da8646f5b2 | ||
|
|
403cc57dc6 | ||
|
|
e7fb44c451 | ||
|
|
cce966fbba | ||
|
|
499be24cda | ||
|
|
821a0c981b | ||
|
|
2e8e0d0a28 | ||
|
|
18a595468f | ||
|
|
3956bccc3d | ||
|
|
858e73c4be | ||
|
|
b66703133e | ||
|
|
4f43624eec | ||
|
|
74545d3d6b | ||
|
|
4780c6a8f8 | ||
|
|
df1435835a | ||
|
|
09fcc93575 | ||
|
|
45d13338ed | ||
|
|
cd3ebfa3d4 | ||
|
|
b4a9e99823 | ||
|
|
7f3d6d8411 | ||
|
|
2d5a94ca75 | ||
|
|
9243fdf58a | ||
|
|
17e5ea95c0 | ||
|
|
ae9c5e2516 | ||
|
|
52808550d8 | ||
|
|
12046fba2e | ||
|
|
5f3fef469d | ||
|
|
2394e793bc | ||
|
|
36360c521d | ||
|
|
60f6f13d7e | ||
|
|
ed1140b846 | ||
|
|
c109f4dc8d | ||
|
|
d7af7cedf9 | ||
|
|
fd7cd76b60 | ||
|
|
585855b00e | ||
|
|
a93e4647df | ||
|
|
698ba11bb6 | ||
|
|
82cd357bae |
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
# Object files
|
# Object files
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
|
*.res
|
||||||
|
|
||||||
# Dependency files
|
# Dependency files
|
||||||
*.d
|
*.d
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Adam Roach
|
|||||||
Sawyer Shan
|
Sawyer Shan
|
||||||
Siping Tao
|
Siping Tao
|
||||||
Martin Storsjö
|
Martin Storsjö
|
||||||
|
Brion Vibber
|
||||||
James Wang
|
James Wang
|
||||||
Juanny Wang
|
Juanny Wang
|
||||||
Zhiliang Wang
|
Zhiliang Wang
|
||||||
|
|||||||
124
Makefile
@@ -4,8 +4,10 @@ vpath %.cc $(SRC_PATH)
|
|||||||
vpath %.cpp $(SRC_PATH)
|
vpath %.cpp $(SRC_PATH)
|
||||||
vpath %.asm $(SRC_PATH)
|
vpath %.asm $(SRC_PATH)
|
||||||
vpath %.S $(SRC_PATH)
|
vpath %.S $(SRC_PATH)
|
||||||
|
vpath %.rc $(SRC_PATH)
|
||||||
|
vpath %.pc.in $(SRC_PATH)
|
||||||
|
|
||||||
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
|
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:]. | sed -E 's/^(net|open|free)bsd/bsd/')
|
||||||
ARCH=$(shell uname -m)
|
ARCH=$(shell uname -m)
|
||||||
LIBPREFIX=lib
|
LIBPREFIX=lib
|
||||||
LIBSUFFIX=a
|
LIBSUFFIX=a
|
||||||
@@ -23,14 +25,17 @@ PREFIX=/usr/local
|
|||||||
SHARED=-shared
|
SHARED=-shared
|
||||||
OBJ=o
|
OBJ=o
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
|
LIBDIR_NAME=lib
|
||||||
SHAREDLIB_DIR=$(PREFIX)/lib
|
SHAREDLIB_DIR=$(PREFIX)/lib
|
||||||
PROJECT_NAME=openh264
|
PROJECT_NAME=openh264
|
||||||
MODULE_NAME=gmpopenh264
|
MODULE_NAME=gmpopenh264
|
||||||
GMP_API_BRANCH=Firefox38
|
GMP_API_BRANCH=Firefox39
|
||||||
CCASFLAGS=$(CFLAGS)
|
CCASFLAGS=$(CFLAGS)
|
||||||
VERSION=1.4
|
|
||||||
STATIC_LDFLAGS=-lstdc++
|
STATIC_LDFLAGS=-lstdc++
|
||||||
|
|
||||||
|
VERSION=1.5
|
||||||
|
SHAREDLIBVERSION=1
|
||||||
|
|
||||||
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
|
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
|
||||||
HAVE_GMP_API=No
|
HAVE_GMP_API=No
|
||||||
else
|
else
|
||||||
@@ -57,7 +62,9 @@ CFLAGS += -fsanitize=address
|
|||||||
LDFLAGS += -fsanitize=address
|
LDFLAGS += -fsanitize=address
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SHAREDLIBVERSION=0
|
# Make sure the all target is the first one
|
||||||
|
all: libraries binaries
|
||||||
|
|
||||||
include $(SRC_PATH)build/platform-$(OS).mk
|
include $(SRC_PATH)build/platform-$(OS).mk
|
||||||
|
|
||||||
|
|
||||||
@@ -76,11 +83,12 @@ ifneq ($(V),Yes)
|
|||||||
QUIET_CCAS = @printf "CCAS\t$@\n";
|
QUIET_CCAS = @printf "CCAS\t$@\n";
|
||||||
QUIET_ASM = @printf "ASM\t$@\n";
|
QUIET_ASM = @printf "ASM\t$@\n";
|
||||||
QUIET_AR = @printf "AR\t$@\n";
|
QUIET_AR = @printf "AR\t$@\n";
|
||||||
|
QUIET_RC = @printf "RC\t$@\n";
|
||||||
QUIET = @
|
QUIET = @
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc
|
INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc -Icodec/common/inc
|
||||||
|
|
||||||
DECODER_INCLUDES += \
|
DECODER_INCLUDES += \
|
||||||
-I$(SRC_PATH)codec/decoder/core/inc \
|
-I$(SRC_PATH)codec/decoder/core/inc \
|
||||||
@@ -136,10 +144,8 @@ COMMON_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
|
|||||||
|
|
||||||
.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc $(PROJECT_NAME)-static.pc
|
.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc $(PROJECT_NAME)-static.pc
|
||||||
|
|
||||||
all: libraries binaries
|
|
||||||
|
|
||||||
generate-version:
|
generate-version:
|
||||||
$(QUIET)cd $(SRC_PATH) && sh ./codec/common/generate_version.sh
|
$(QUIET)sh $(SRC_PATH)codec/common/generate_version.sh $(SRC_PATH)
|
||||||
|
|
||||||
codec/decoder/plus/src/welsDecoderExt.$(OBJ): | generate-version
|
codec/decoder/plus/src/welsDecoderExt.$(OBJ): | generate-version
|
||||||
codec/encoder/plus/src/welsEncoderExt.$(OBJ): | generate-version
|
codec/encoder/plus/src/welsEncoderExt.$(OBJ): | generate-version
|
||||||
@@ -148,7 +154,7 @@ clean:
|
|||||||
ifeq (android,$(OS))
|
ifeq (android,$(OS))
|
||||||
clean: clean_Android
|
clean: clean_Android
|
||||||
endif
|
endif
|
||||||
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so *.exe *.pdb *.exp *.pc
|
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so *.exe *.pdb *.exp *.pc *.res
|
||||||
|
|
||||||
gmp-bootstrap:
|
gmp-bootstrap:
|
||||||
if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
|
if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
|
||||||
@@ -159,12 +165,18 @@ gtest-bootstrap:
|
|||||||
|
|
||||||
ifeq ($(HAVE_GTEST),Yes)
|
ifeq ($(HAVE_GTEST),Yes)
|
||||||
|
|
||||||
test: codec_unittest$(EXEEXT)
|
|
||||||
ifneq (android,$(OS))
|
ifneq (android,$(OS))
|
||||||
ifneq (ios,$(OS))
|
ifneq (ios,$(OS))
|
||||||
./codec_unittest
|
ifneq (msvc-wp,$(OS))
|
||||||
|
BUILD_UT_EXE=Yes
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
test: codec_unittest$(EXEEXT)
|
||||||
|
ifeq ($(BUILD_UT_EXE), Yes)
|
||||||
|
./codec_unittest
|
||||||
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
test:
|
test:
|
||||||
@@ -183,16 +195,19 @@ endif
|
|||||||
|
|
||||||
ifneq (android, $(OS))
|
ifneq (android, $(OS))
|
||||||
ifneq (ios, $(OS))
|
ifneq (ios, $(OS))
|
||||||
|
ifneq (msvc-wp, $(OS))
|
||||||
include $(SRC_PATH)codec/console/dec/targets.mk
|
include $(SRC_PATH)codec/console/dec/targets.mk
|
||||||
include $(SRC_PATH)codec/console/enc/targets.mk
|
include $(SRC_PATH)codec/console/enc/targets.mk
|
||||||
include $(SRC_PATH)codec/console/common/targets.mk
|
include $(SRC_PATH)codec/console/common/targets.mk
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (ios, $(OS))
|
|
||||||
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
|
|
||||||
else
|
|
||||||
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
||||||
|
|
||||||
|
# No point in building dylib for ios
|
||||||
|
ifneq (ios, $(OS))
|
||||||
|
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
|
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
|
||||||
@@ -229,39 +244,42 @@ $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(LIBPREFIX)$(MODULE_NAME).$(SHAR
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
|
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
|
||||||
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $(PROJECT_NAME).pc.in > $@
|
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
|
||||||
|
|
||||||
$(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
|
$(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
|
||||||
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $(PROJECT_NAME).pc.in > $@
|
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
|
||||||
|
|
||||||
install-headers:
|
install-headers:
|
||||||
mkdir -p $(DESTDIR)/$(PREFIX)/include/wels
|
mkdir -p $(DESTDIR)$(PREFIX)/include/wels
|
||||||
install -m 644 codec/api/svc/codec*.h $(DESTDIR)/$(PREFIX)/include/wels
|
install -m 644 $(SRC_PATH)/codec/api/svc/codec*.h $(DESTDIR)$(PREFIX)/include/wels
|
||||||
|
|
||||||
install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
|
install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
|
||||||
mkdir -p $(DESTDIR)/$(PREFIX)/lib
|
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
|
||||||
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(DESTDIR)/$(PREFIX)/lib
|
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
|
||||||
|
|
||||||
install-static: install-static-lib $(PROJECT_NAME)-static.pc
|
install-static: install-static-lib $(PROJECT_NAME)-static.pc
|
||||||
mkdir -p $(DESTDIR)/$(PREFIX)/lib/pkgconfig
|
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
|
||||||
install -m 644 $(PROJECT_NAME)-static.pc $(DESTDIR)/$(PREFIX)/lib/pkgconfig/$(PROJECT_NAME).pc
|
install -m 644 $(PROJECT_NAME)-static.pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig/$(PROJECT_NAME).pc
|
||||||
|
|
||||||
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
|
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
|
||||||
mkdir -p $(DESTDIR)/$(SHAREDLIB_DIR)
|
mkdir -p $(DESTDIR)$(SHAREDLIB_DIR)
|
||||||
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) $(DESTDIR)/$(SHAREDLIB_DIR)
|
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) $(DESTDIR)$(SHAREDLIB_DIR)
|
||||||
if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \
|
if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \
|
||||||
cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)/$(SHAREDLIB_DIR); \
|
cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR); \
|
||||||
fi
|
fi
|
||||||
mkdir -p $(DESTDIR)/$(PREFIX)/lib/pkgconfig
|
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
|
||||||
install -m 644 $(PROJECT_NAME).pc $(DESTDIR)/$(PREFIX)/lib/pkgconfig
|
install -m 644 $(PROJECT_NAME).pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
|
||||||
ifneq ($(EXTRA_LIBRARY),)
|
ifneq ($(EXTRA_LIBRARY),)
|
||||||
install -m 644 $(EXTRA_LIBRARY) $(DESTDIR)/$(PREFIX)/lib
|
install -m 644 $(EXTRA_LIBRARY) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install: install-static-lib install-shared
|
install: install-static-lib install-shared
|
||||||
@:
|
@:
|
||||||
|
|
||||||
ifeq ($(HAVE_GTEST),Yes)
|
ifneq ($(HAVE_GTEST),Yes)
|
||||||
|
binaries:
|
||||||
|
@:
|
||||||
|
else
|
||||||
include $(SRC_PATH)build/gtest-targets.mk
|
include $(SRC_PATH)build/gtest-targets.mk
|
||||||
include $(SRC_PATH)test/api/targets.mk
|
include $(SRC_PATH)test/api/targets.mk
|
||||||
include $(SRC_PATH)test/decoder/targets.mk
|
include $(SRC_PATH)test/decoder/targets.mk
|
||||||
@@ -278,42 +296,40 @@ $(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $
|
|||||||
LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
||||||
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS)
|
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS)
|
||||||
$(QUIET)rm -f $@
|
$(QUIET)rm -f $@
|
||||||
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(CODEC_UNITTEST_LDFLAGS)
|
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(UTSHLDFLAGS) $(CODEC_UNITTEST_LDFLAGS)
|
||||||
|
|
||||||
binaries: codec_unittest$(EXEEXT)
|
binaries: codec_unittest$(EXEEXT)
|
||||||
BINARIES += codec_unittest$(EXEEXT)
|
BINARIES += codec_unittest$(EXEEXT)
|
||||||
|
|
||||||
ifeq (ios,$(OS))
|
ifeq ($(BUILD_UT_EXE), Yes)
|
||||||
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
# Build a normal command line executable
|
||||||
|
|
||||||
else
|
|
||||||
ifeq (android,$(OS))
|
|
||||||
ifeq (./,$(SRC_PATH))
|
|
||||||
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
|
||||||
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
|
|
||||||
|
|
||||||
clean_Android: clean_Android_ut
|
|
||||||
clean_Android_ut:
|
|
||||||
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
|
|
||||||
|
|
||||||
else
|
|
||||||
codec_unittest$(EXEEXT):
|
|
||||||
@:
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) | res
|
codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) | res
|
||||||
$(QUIET)rm -f $@
|
$(QUIET)rm -f $@
|
||||||
$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
|
$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
res:
|
res:
|
||||||
$(QUIET)if [ ! -e res ]; then ln -s $(SRC_PATH)res .; fi
|
$(QUIET)if [ ! -e res ]; then ln -s $(SRC_PATH)res .; fi
|
||||||
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
else
|
else
|
||||||
binaries:
|
|
||||||
@:
|
# Build the unit test suite into a library that is included in a project file
|
||||||
|
ifeq (ios,$(OS))
|
||||||
|
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
|
||||||
|
else
|
||||||
|
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq (android,$(OS))
|
||||||
|
ifeq (./,$(SRC_PATH))
|
||||||
|
codec_unittest$(EXEEXT):
|
||||||
|
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
|
||||||
|
|
||||||
|
clean_Android: clean_Android_ut
|
||||||
|
clean_Android_ut:
|
||||||
|
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-include $(OBJS:.$(OBJ)=.d)
|
-include $(OBJS:.$(OBJ)=.d)
|
||||||
|
|||||||
78
README.md
@@ -40,6 +40,7 @@ OS Support
|
|||||||
- Linux 64-bit and 32-bit
|
- Linux 64-bit and 32-bit
|
||||||
- Android 64-bit and 32-bit
|
- Android 64-bit and 32-bit
|
||||||
- iOS 64-bit and 32-bit
|
- iOS 64-bit and 32-bit
|
||||||
|
- Windows Phone 32-bit
|
||||||
|
|
||||||
Processor Support
|
Processor Support
|
||||||
-----------------
|
-----------------
|
||||||
@@ -50,43 +51,43 @@ Processor Support
|
|||||||
Building the Library
|
Building the Library
|
||||||
--------------------
|
--------------------
|
||||||
NASM needed to be installed for assembly code: workable version 2.07 or above, nasm can downloaded from http://www.nasm.us/
|
NASM needed to be installed for assembly code: workable version 2.07 or above, nasm can downloaded from http://www.nasm.us/
|
||||||
|
For Mac OSX 64-bit NASM needed to be below version 2.11.08 as nasm 2.11.08 will introduce error when using RIP-relative addresses in Mac OSX 64-bit
|
||||||
|
|
||||||
To build the arm assembly for Windows Phone, gas-preprocessor is required. It can be downloaded from git://git.libav.org/gas-preprocessor.git
|
To build the arm assembly for Windows Phone, gas-preprocessor is required. It can be downloaded from git://git.libav.org/gas-preprocessor.git
|
||||||
|
|
||||||
For Android Builds
|
For Android Builds
|
||||||
------------------
|
------------------
|
||||||
To build for android platform, You need to install android sdk and ndk. You also need to export **ANDROID_SDK**/tools to PATH. On Linux, this can be done by
|
To build for android platform, You need to install android sdk and ndk. You also need to export `**ANDROID_SDK**/tools` to PATH. On Linux, this can be done by
|
||||||
|
|
||||||
'export PATH=**ANDROID_SDK**/tools:$PATH'
|
export PATH=**ANDROID_SDK**/tools:$PATH
|
||||||
|
|
||||||
The codec and demo can be built by
|
The codec and demo can be built by
|
||||||
|
|
||||||
'make OS=android NDKROOT=**ANDROID_NDK** TARGET= **ANDROID_TARGET**'
|
make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**
|
||||||
|
|
||||||
Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as android-12.
|
Valid `**ANDROID_TARGET**` can be found in `**ANDROID_SDK**/platforms`, such as `android-12`.
|
||||||
You can also set ARCH, NDKLEVEL according to your device and NDK version.
|
You can also set `ARCH`, `NDKLEVEL` according to your device and NDK version.
|
||||||
ARCH specifies the architecture of android device. Currently only arm and x86 are supported, the default is arm.
|
`ARCH` specifies the architecture of android device. Currently `arm`, `arm64`, `x86` and `x86_64` are supported, the default is `arm`. (`mips` and `mips64` can also be used, but there's no specific optimization for those architectures.)
|
||||||
NDKLEVEL specifies android api level, the api level can be 12-19, the default is 12.
|
`NDKLEVEL` specifies android api level, the api level can be 12-19, the default is 12.
|
||||||
|
|
||||||
By default these commands build for the armeabi-v7a ABI. To build for the other android
|
By default these commands build for the `armeabi-v7a` ABI. To build for the other android
|
||||||
ABIs, add "ARCH=arm64", "ARCH=x86", "ARCH=x86_64", "ARCH=mips" or "ARCH=mips64".
|
ABIs, add `ARCH=arm64`, `ARCH=x86`, `ARCH=x86_64`, `ARCH=mips` or `ARCH=mips64`.
|
||||||
To build for the older armeabi ABI (which has armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
|
To build for the older `armeabi` ABI (which has armv5te as baseline), add `APP_ABI=armeabi` (`ARCH=arm` is implicit).
|
||||||
|
|
||||||
For iOS Builds
|
For iOS Builds
|
||||||
--------------
|
--------------
|
||||||
You can build the libraries and demo applications using xcode project files
|
You can build the libraries and demo applications using xcode project files
|
||||||
located in codec/build/iOS/dec and codec/build/iOS/enc.
|
located in `codec/build/iOS/dec` and `codec/build/iOS/enc`.
|
||||||
|
|
||||||
You can also build the libraries (but not the demo applications) using the
|
You can also build the libraries (but not the demo applications) using the
|
||||||
make based build system from the command line. Build with
|
make based build system from the command line. Build with
|
||||||
|
|
||||||
'make OS=ios ARCH=**ARCH**'
|
make OS=ios ARCH=**ARCH**
|
||||||
|
|
||||||
Valid values for **ARCH** are the normal iOS architecture names such as
|
Valid values for `**ARCH**` are the normal iOS architecture names such as
|
||||||
armv7, armv7s, arm64, and i386 and x86_64 for the simulator. Additionally,
|
`armv7`, `armv7s`, `arm64`, and `i386` and `x86_64` for the simulator.
|
||||||
one might need to add 'SDK=X.Y' to the make command line in case the default
|
Another settable iOS specific parameter
|
||||||
SDK version isn't available. Another settable iOS specific parameter
|
is `SDK_MIN`, specifying the minimum deployment target for the built library.
|
||||||
is SDK_MIN, specifying the minimum deployment target for the built library.
|
|
||||||
For other details on building using make on the command line, see
|
For other details on building using make on the command line, see
|
||||||
'For All Platforms' below.
|
'For All Platforms' below.
|
||||||
|
|
||||||
@@ -95,7 +96,7 @@ For Windows Builds
|
|||||||
|
|
||||||
Our Windows builds use MinGW which can be found here - http://www.mingw.org/
|
Our Windows builds use MinGW which can be found here - http://www.mingw.org/
|
||||||
|
|
||||||
To build with gcc, add the MinGW bin directory (e.g. /c/MinGW/bin) to your path and follow the 'For All Platforms' instructions below.
|
To build with gcc, add the MinGW bin directory (e.g. `/c/MinGW/bin`) to your path and follow the 'For All Platforms' instructions below.
|
||||||
|
|
||||||
To build with Visual Studio you will need to set up your path to run cl.exe. The easiest way is to start MSYS from a developer command line session - http://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx If you need to do it by hand here is an example from a Windows 64bit install of VS2012:
|
To build with Visual Studio you will need to set up your path to run cl.exe. The easiest way is to start MSYS from a developer command line session - http://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx If you need to do it by hand here is an example from a Windows 64bit install of VS2012:
|
||||||
|
|
||||||
@@ -106,29 +107,42 @@ You will also need to set your INCLUDE and LIB paths to point to your VS and SDK
|
|||||||
export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include;C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\Program Files (x86)\Windows Kits\8.0\Include\shared"
|
export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include;C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\Program Files (x86)\Windows Kits\8.0\Include\shared"
|
||||||
export LIB="C:\Program Files (x86)\Windows Kits\8.0\Lib\Win8\um\x86;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib"
|
export LIB="C:\Program Files (x86)\Windows Kits\8.0\Lib\Win8\um\x86;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib"
|
||||||
|
|
||||||
Then add 'OS=msvc' to the make line of the 'For All Platforms' instructions.
|
Then add `OS=msvc` to the make line of the 'For All Platforms' instructions.
|
||||||
|
|
||||||
|
For Windows Phone builds
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Follow the instructions above for normal Windows builds, but use `OS=msvc-wp`
|
||||||
|
instead of `OS=msvc`. You will also need gas-preprocessor (as mentioned below
|
||||||
|
"Building the Library").
|
||||||
|
|
||||||
|
If building for Windows Phone with MSVC 2013, there's no included bat file that sets the lib paths to the Windows Phone kit, but that can be done with a command like this:
|
||||||
|
|
||||||
|
export LIB="c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\store\arm;c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm;c:\Program Files (x86)\Windows Phone Kits\8.1\lib\arm"
|
||||||
|
|
||||||
|
This is only necessary for building the DLL; the static library can be built without setting this.
|
||||||
|
|
||||||
For All Platforms
|
For All Platforms
|
||||||
-------------------
|
-------------------
|
||||||
From the main project directory:
|
From the main project directory:
|
||||||
'make' for automatically detecting 32/64bit and building accordingly
|
- `make` for automatically detecting architecture and building accordingly
|
||||||
'make ENABLE64BIT=No' for 32bit builds
|
- `make ARCH=i386` for x86 32bit builds
|
||||||
'make ENABLE64BIT=Yes' for 64bit builds
|
- `make ARCH=x86_64` for x86 64bit builds
|
||||||
'make V=No' for a silent build (not showing the actual compiler commands)
|
- `make V=No` for a silent build (not showing the actual compiler commands)
|
||||||
|
|
||||||
The command line programs h264enc and h264dec will appear in the main project directory.
|
The command line programs `h264enc` and `h264dec` will appear in the main project directory.
|
||||||
|
|
||||||
A shell script to run the command-line apps is in testbin/CmdLineExample.sh
|
A shell script to run the command-line apps is in `testbin/CmdLineExample.sh`
|
||||||
|
|
||||||
Usage information can be found in testbin/CmdLineReadMe
|
Usage information can be found in `testbin/CmdLineReadMe`
|
||||||
|
|
||||||
Using the Source
|
Using the Source
|
||||||
----------------
|
----------------
|
||||||
codec - encoder, decoder, console (test app), build (makefile, vcproj)
|
- `codec` - encoder, decoder, console (test app), build (makefile, vcproj)
|
||||||
build - scripts for Makefile build system.
|
- `build` - scripts for Makefile build system.
|
||||||
test - GTest unittest files.
|
- `test` - GTest unittest files.
|
||||||
testbin - autobuild scripts, test app config files
|
- `testbin` - autobuild scripts, test app config files
|
||||||
res - yuv and bitstream test files
|
- `res` - yuv and bitstream test files
|
||||||
|
|
||||||
Known Issues
|
Known Issues
|
||||||
------------
|
------------
|
||||||
@@ -141,4 +155,4 @@ See the issue tracker on https://github.com/cisco/openh264/issues
|
|||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
BSD, see LICENSE file for details.
|
BSD, see `LICENSE` file for details.
|
||||||
|
|||||||
48
RELEASES
@@ -1,6 +1,34 @@
|
|||||||
|
|
||||||
Releases
|
Releases
|
||||||
-----------
|
-----------
|
||||||
|
v1.5.0
|
||||||
|
------
|
||||||
|
- Correct a typo in codec return value (github issue#2046, cmUnkonwReason -> cmUnknownReason)
|
||||||
|
- Added Codec demo and auto build script for WP8
|
||||||
|
- Decoder support of 'Constrained High Profile' of H.264
|
||||||
|
- Encoder support of CABAC of H.264
|
||||||
|
- Encoder support of input frame rate 60
|
||||||
|
- Improved syntax of gaps_in_frame_num_value_allowed_flag in encoder
|
||||||
|
- Improved memory usage for multi-threading in encoder
|
||||||
|
- Added VUI info for base layer in encoder
|
||||||
|
- Added encoder interface to get external setting of iMaxQp and iMinQp for rate control
|
||||||
|
- Bug fixes for Rate Control, multi-threading and simulcasting in encoder
|
||||||
|
- Bug fixes for NoDelay API, ParseOnly functions, error-concealment off functiond and error-detection in decoder
|
||||||
|
- Bug fixes for UT
|
||||||
|
- Fixes to avoid valgrind warnings, potential crash and calculation overflow
|
||||||
|
- Merged files for decoder/encoder and remove unused files
|
||||||
|
- Improvements on build scripts, UT, error-protection in decoder, input param checking in encoder, assembly for 64bit support, downsampling, logging and documentation
|
||||||
|
|
||||||
|
Note:
|
||||||
|
'Constrained High Profile' = 'Constrained Baseline Profile' plus:
|
||||||
|
- CABAC
|
||||||
|
- Intra 8x8 mode support
|
||||||
|
- 8x8 transform
|
||||||
|
- QP scaling matrices
|
||||||
|
- QP per chroma component
|
||||||
|
- Mono 4:0:0 (experimental)
|
||||||
|
- Weighted prediction
|
||||||
|
|
||||||
v1.4.0
|
v1.4.0
|
||||||
------
|
------
|
||||||
- Decoder new interface of DecodeFrameNoDelay
|
- Decoder new interface of DecodeFrameNoDelay
|
||||||
@@ -67,6 +95,26 @@ Binaries
|
|||||||
These binary releases are distributed under this license:
|
These binary releases are distributed under this license:
|
||||||
http://www.openh264.org/BINARY_LICENSE.txt
|
http://www.openh264.org/BINARY_LICENSE.txt
|
||||||
|
|
||||||
|
v1.4.0
|
||||||
|
------
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.4.0-android19.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.4.0-linux32.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.4.0-linux64.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.4.0-osx32.dylib.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.4.0-osx64.dylib.bz2
|
||||||
|
http://ciscobinary.openh264.org/openh264-1.4.0-win32msvc.dll.bz2
|
||||||
|
http://ciscobinary.openh264.org/openh264-1.4.0-win64msvc.dll.bz2
|
||||||
|
|
||||||
|
v1.3.1
|
||||||
|
------
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.3.1-android19.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.3.1-linux32.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.3.1-linux64.so.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.3.1-osx32.dylib.bz2
|
||||||
|
http://ciscobinary.openh264.org/libopenh264-1.3.1-osx64.dylib.bz2
|
||||||
|
http://ciscobinary.openh264.org/openh264-1.3.1-win32msvc.dll.bz2
|
||||||
|
http://ciscobinary.openh264.org/openh264-1.3.1-win64msvc.dll.bz2
|
||||||
|
|
||||||
v1.3.0
|
v1.3.0
|
||||||
------
|
------
|
||||||
http://ciscobinary.openh264.org/libopenh264-1.3.0-android19.so.bz2
|
http://ciscobinary.openh264.org/libopenh264-1.3.0-android19.so.bz2
|
||||||
|
|||||||
424
build/AutoBuildForWPAndWindows.bat
Normal file
@@ -0,0 +1,424 @@
|
|||||||
|
@echo off
|
||||||
|
rem *************************************************************************************************
|
||||||
|
rem usage:
|
||||||
|
rem AutoBuildForWPAndWindows.bat % Configuration %
|
||||||
|
rem --For debug version:
|
||||||
|
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Debug-C
|
||||||
|
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Debug-ASM
|
||||||
|
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Debug-C
|
||||||
|
rem Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Debug-ASM
|
||||||
|
rem ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-Debug-C
|
||||||
|
rem ARM-ASM: AutoBuildForWPAndWindows.bat ARM-Debug-ASM
|
||||||
|
rem --For release version:
|
||||||
|
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Release-C
|
||||||
|
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Release-ASM
|
||||||
|
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Release-C
|
||||||
|
rem Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Release-ASM
|
||||||
|
rem ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-Release-C
|
||||||
|
rem ARM-ASM: AutoBuildForWPAndWindows.bat ARM-Release-ASM
|
||||||
|
rem --For debug and release version:
|
||||||
|
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-All-C
|
||||||
|
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-All-ASM
|
||||||
|
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-All-C
|
||||||
|
rem Win64-ASM: AutoBuildForWPAndWindows.bat Win64-All-ASM
|
||||||
|
rem ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-All-C
|
||||||
|
rem ARM-ASM: AutoBuildForWPAndWindows.bat ARM-All-ASM
|
||||||
|
rem --For default:
|
||||||
|
rem AutoBuildForWPAndWindows.bat
|
||||||
|
rem ARM-All-ASM
|
||||||
|
rem
|
||||||
|
rem --lib/dll files will be copied to folder .\bin
|
||||||
|
rem --win32 folder bin\i386*
|
||||||
|
rem --win64 folder bin\x86_64*
|
||||||
|
rem --arm folder bin\arm*
|
||||||
|
rem
|
||||||
|
rem Environment:
|
||||||
|
rem ----for windows phone, Visual studio with update 3 or later is needed
|
||||||
|
rem ----gas-preprocessor(windows phone build only)
|
||||||
|
rem --you can clone it from git://git.libav.org/gas-preprocessor.git
|
||||||
|
rem --for more detail, please refer to https://git.libav.org/?p=gas-preprocessor.git
|
||||||
|
rem -- and then set gas-preprocessor path to the %GasScriptPath% variable in this script
|
||||||
|
rem or just copy to VC2013 bin's path,you can refer to variable %VC12Path%
|
||||||
|
rem
|
||||||
|
rem ----MinGW
|
||||||
|
rem --install MinGW tools
|
||||||
|
rem --more detail, please refer to http://www.mingw.org/
|
||||||
|
rem
|
||||||
|
rem 2015/03/15 huashi@cisco.com
|
||||||
|
rem *************************************************************************************************
|
||||||
|
call :BasicSetting
|
||||||
|
call :PathSetting
|
||||||
|
call :SetBuildOption %1
|
||||||
|
if not %ERRORLEVEL%==0 (
|
||||||
|
echo not suppot option!
|
||||||
|
goto :ErrorReturn
|
||||||
|
)
|
||||||
|
call :EnvSetting %1
|
||||||
|
call :BuildResultInit
|
||||||
|
call :RunBuild
|
||||||
|
call :OutputBuildResult
|
||||||
|
call :GetFinalReturnCode
|
||||||
|
echo ReturnCode is %ReturnCode%
|
||||||
|
cd %WorkingDir%
|
||||||
|
goto :End
|
||||||
|
|
||||||
|
:RunBuild
|
||||||
|
for %%j in ( %aConfigurationList% ) do (
|
||||||
|
set BuildFlag=0
|
||||||
|
call :Build %%j
|
||||||
|
call :BuildCheck %%j
|
||||||
|
call :CopyDll %%j
|
||||||
|
)
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
|
||||||
|
rem function for setting
|
||||||
|
rem ***********************************************
|
||||||
|
:BasicSetting
|
||||||
|
set DllFile=openh264.dll
|
||||||
|
set LibFile=openh264.lib
|
||||||
|
set PDBFile=openh264.pdb
|
||||||
|
set UTDllFile=ut.dll
|
||||||
|
set UTBinFile=codec_unittest.exe
|
||||||
|
set EncBinFile=h264enc.exe
|
||||||
|
set DecBinFile=h264dec.exe
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:PathSetting
|
||||||
|
set WorkingDir=%cd%
|
||||||
|
cd ..
|
||||||
|
set RootDir=%cd%
|
||||||
|
set BinDir=%RootDir%\bin
|
||||||
|
cd %WorkingDir%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:EnvSetting
|
||||||
|
set MinGWPath=C:\MinGW\bin
|
||||||
|
set MsysPath=C:\MinGW\msys\1.0\bin
|
||||||
|
set GitPath=C:\Program Files (x86)\Git\bin
|
||||||
|
set GasScriptPath=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
|
||||||
|
|
||||||
|
set VC12Path=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
|
||||||
|
set VC11Path=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
|
||||||
|
set VC10Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
|
||||||
|
set VC9Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
|
||||||
|
|
||||||
|
set VC12ArmLib01=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\store\arm
|
||||||
|
set VC12ArmLib02=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm
|
||||||
|
set WP8KitLib=C:\Program Files (x86)\Windows Phone Kits\8.1\lib\arm
|
||||||
|
|
||||||
|
if exist "%VC9Path%" set VCPATH=%VC9Path%
|
||||||
|
if exist "%VC10Path%" set VCPATH=%VC10Path%
|
||||||
|
if exist "%VC11Path%" set VCPATH=%VC11Path%
|
||||||
|
if exist "%VC12Path%" set VCPATH=%VC12Path%
|
||||||
|
|
||||||
|
if "%vArcType%" =="i386" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
|
||||||
|
if "%vArcType%" =="x86_64" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
|
||||||
|
if "%vArcType%" =="arm" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
|
||||||
|
rem if "%vArcType%" =="arm" set PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;C:\Program Files (x86)\Git\bin;%PATH%
|
||||||
|
|
||||||
|
if "%vArcType%" =="i386" call "%VCPATH%\vcvarsall.bat" x86
|
||||||
|
if "%vArcType%" =="x86_64" call "%VCPATH%\vcvarsall.bat" x64
|
||||||
|
if "%vArcType%" =="arm" call "%VCPATH%\vcvarsall.bat" x86_arm
|
||||||
|
if "%vArcType%" =="arm" call :WPSetting
|
||||||
|
|
||||||
|
echo PATH is %PATH%
|
||||||
|
echo LIB is %LIB%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:WPSetting
|
||||||
|
set LIB=%VC12ArmLib01%;%VC12ArmLib02%;%WP8KitLib%
|
||||||
|
if not exist "%VC12Path%" (
|
||||||
|
echo VC12 does not exist,
|
||||||
|
echo ******************************************
|
||||||
|
echo VC12 does not exist,
|
||||||
|
echo which is needed for windows phone
|
||||||
|
echo ******************************************
|
||||||
|
goto :ErrorReturn
|
||||||
|
)
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:SetBuildOption
|
||||||
|
if "aaa%1"=="aaa" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo default setting
|
||||||
|
) else if "%1"=="Win32-Debug-C" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo Win32-Debug-C setting
|
||||||
|
) else if "%1"=="Win32-Release-C" (
|
||||||
|
set aConfigurationList=Release
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo Win32-Release-C setting
|
||||||
|
) else if "%1"=="Win64-Debug-C" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=No
|
||||||
|
echo All-C setting
|
||||||
|
) else if "%1"=="Win64-Release-C" (
|
||||||
|
set aConfigurationList=Release
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=No
|
||||||
|
echo Win64-Release-C setting
|
||||||
|
) else if "%1"=="ARM-Debug-C" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo ARM-Debug-C setting
|
||||||
|
) else if "%1"=="ARM-Release-C" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo ARM-Release-C setting
|
||||||
|
) else if "%1"=="Win32-All-C" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo Win32-All-C setting
|
||||||
|
) else if "%1"=="Win64-All-C" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=No
|
||||||
|
echo All-C setting
|
||||||
|
) else if "%1"=="ARM-All-C" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=No
|
||||||
|
echo ARM-All-C setting
|
||||||
|
) else if "%1"=="Win32-Debug-ASM" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo Win32-Debug-ASM setting
|
||||||
|
) else if "%1"=="Win32-Release-ASM" (
|
||||||
|
set aConfigurationList=Release
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo Win32-Release-ASM setting
|
||||||
|
) else if "%1"=="Win64-Debug-ASM" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo All-ASM setting
|
||||||
|
) else if "%1"=="Win64-Release-ASM" (
|
||||||
|
set aConfigurationList=Release
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo Win64-Release-ASM setting
|
||||||
|
) else if "%1"=="ARM-Debug-ASM" (
|
||||||
|
set aConfigurationList=Debug
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo ARM-Debug-ASM setting
|
||||||
|
) else if "%1"=="ARM-Release-ASM" (
|
||||||
|
set aConfigurationList=Release
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo ARM-Release-ASM setting
|
||||||
|
) else if "%1"=="Win32-All-ASM" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=i386
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo Win32-All-ASM setting
|
||||||
|
) else if "%1"=="Win64-All-ASM" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=x86_64
|
||||||
|
set vOSType=msvc
|
||||||
|
set vEnable64BitFlag=Yes
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo All-ASM setting
|
||||||
|
) else if "%1"=="ARM-All-ASM" (
|
||||||
|
set aConfigurationList=Debug Release
|
||||||
|
set vArcType=arm
|
||||||
|
set vOSType=msvc-wp
|
||||||
|
set vEnable64BitFlag=No
|
||||||
|
set vASMFlag=Yes
|
||||||
|
echo ARM-All-ASM setting
|
||||||
|
) else (
|
||||||
|
call :help
|
||||||
|
goto :ErrorReturn
|
||||||
|
)
|
||||||
|
echo aConfigurationList is %aConfigurationList%
|
||||||
|
echo vArcType is %vArcType%
|
||||||
|
echo vOSType is %vOSType%
|
||||||
|
echo vEnable64BitFlag is %vEnable64BitFlag%
|
||||||
|
echo vASMFlag is %vASMFlag%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
rem function for build result
|
||||||
|
rem ***********************************************
|
||||||
|
:BuildResultInit
|
||||||
|
set BuildDebugFlag=0
|
||||||
|
set BuildReleaseFlag=0
|
||||||
|
set BuildDebugInfo=NULL
|
||||||
|
set BuildReleaseInfo=NULL
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:OutputBuildResult
|
||||||
|
echo BuildDebugFlag =%BuildDebugFlag%
|
||||||
|
echo BuildReleaseFlag =%BuildReleaseFlag%
|
||||||
|
echo BuildDebugInfo =%BuildDebugInfo%
|
||||||
|
echo BuildReleaseInfo =%BuildReleaseInfo%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:BuildCheck
|
||||||
|
set vConfiguration=%1
|
||||||
|
if not %BuildFlag%==0 (
|
||||||
|
if "%vConfiguration%"=="Debug" (
|
||||||
|
set BuildDebugFlag=1
|
||||||
|
set BuildDebugInfo="build debug--failed"
|
||||||
|
) else (
|
||||||
|
set BuildReleaseFlag=1
|
||||||
|
set BuildReleaseInfo="build release--failed"
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if "%vConfiguration%"=="Debug" (
|
||||||
|
set BuildDebugFlag=0
|
||||||
|
set BuildDebugInfo="build debug--succeed"
|
||||||
|
) else (
|
||||||
|
set BuildReleaseFlag=0
|
||||||
|
set BuildReleaseInfo="build release--succeed"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:GetFinalReturnCode
|
||||||
|
set aBuildFlagList=%BuildDebugFlag% %BuildReleaseFlag%
|
||||||
|
echo aBuildFlagList is %aBuildFlagList%
|
||||||
|
set ReturnCode=0
|
||||||
|
for %%k in (%aBuildFlagList%) do (
|
||||||
|
if not %%k == 0 (
|
||||||
|
set ReturnCode=1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
rem function for help
|
||||||
|
rem ***********************************************
|
||||||
|
:help
|
||||||
|
echo *******************************************************************************
|
||||||
|
echo usage:
|
||||||
|
echo AutoBuildForWPAndWindows.bat % Configuration %
|
||||||
|
echo --For debug version:
|
||||||
|
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Debug-C
|
||||||
|
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Debug-ASM
|
||||||
|
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Debug-C
|
||||||
|
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Debug-ASM
|
||||||
|
echo ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-Debug-C
|
||||||
|
echo ARM-ASM: AutoBuildForWPAndWindows.bat ARM-Debug-ASM
|
||||||
|
echo --For release version:
|
||||||
|
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Release-C
|
||||||
|
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Release-ASM
|
||||||
|
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Release-C
|
||||||
|
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Release-ASM
|
||||||
|
echo ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-Release-C
|
||||||
|
echo ARM-ASM: AutoBuildForWPAndWindows.bat ARM-Release-ASM
|
||||||
|
echo --For debug and release version:
|
||||||
|
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-All-C
|
||||||
|
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-All-ASM
|
||||||
|
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-All-C
|
||||||
|
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-All-ASM
|
||||||
|
echo ARM-C-Only: AutoBuildForWPAndWindows.bat ARM-All-C
|
||||||
|
echo ARM-ASM: AutoBuildForWPAndWindows.bat ARM-All-ASM
|
||||||
|
echo --For default:
|
||||||
|
echo AutoBuildForWPAndWindows.bat
|
||||||
|
echo ARM-All-ASM
|
||||||
|
echo *******************************************************************************
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
rem function for build
|
||||||
|
rem ***********************************************
|
||||||
|
:Build
|
||||||
|
set vConfiguration=%1
|
||||||
|
cd %RootDir%
|
||||||
|
echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
|
||||||
|
echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
|
||||||
|
bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
|
||||||
|
bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
|
||||||
|
if not %ERRORLEVEL%==0 (
|
||||||
|
set BuildFlag=1
|
||||||
|
)
|
||||||
|
cd %WorkingDir%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:CopyDll
|
||||||
|
set vConfiguration=%1
|
||||||
|
set vBuildOption=%2
|
||||||
|
cd %RootDir%
|
||||||
|
if "%vArcType%"=="arm" (
|
||||||
|
set vBinDirName=ARM
|
||||||
|
) else if "%vArcType%"=="i386" (
|
||||||
|
set vBinDirName=Win32
|
||||||
|
) else (
|
||||||
|
set vBinDirName=x64
|
||||||
|
)
|
||||||
|
set ArchDestDir=%BinDir%\%vBinDirName%
|
||||||
|
set FullDestDir=%BinDir%\%vBinDirName%\%vConfiguration%
|
||||||
|
echo copying dll files to destination folder...
|
||||||
|
echo FullDestDir is %FullDestDir%
|
||||||
|
if not exist %ArchDestDir% md %ArchDestDir%
|
||||||
|
if exist %FullDestDir% (
|
||||||
|
rd /s /q %FullDestDir%
|
||||||
|
)
|
||||||
|
md %FullDestDir%
|
||||||
|
|
||||||
|
echo current dir is:
|
||||||
|
cd
|
||||||
|
set DestDir=bin/%vBinDirName%/%vConfiguration%
|
||||||
|
echo DestDir is %DestDir%
|
||||||
|
if "%vOSType%"=="msvc-wp" (
|
||||||
|
set aFileList=%DllFile% %LibFile% %PDBFile% %UTDllFile%
|
||||||
|
) else (
|
||||||
|
set aFileList=%DllFile% %LibFile% %PDBFile% %UTBinFile% %EncBinFile% %DecBinFile%
|
||||||
|
)
|
||||||
|
for %%k in (%aFileList%) do (
|
||||||
|
bash -c "cp -f %%k %DestDir%"
|
||||||
|
)
|
||||||
|
cd %WorkingDir%
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:ErrorReturn
|
||||||
|
endlocal
|
||||||
|
exit /b 2
|
||||||
|
|
||||||
|
:End
|
||||||
|
endlocal
|
||||||
|
exit /b %ReturnCode%
|
||||||
@@ -7,3 +7,4 @@
|
|||||||
--unpad-paren
|
--unpad-paren
|
||||||
--pad-first-paren-out
|
--pad-first-paren-out
|
||||||
--lineend=linux
|
--lineend=linux
|
||||||
|
--convert-tabs
|
||||||
|
|||||||
15
build/msvc-app.mk
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
include $(SRC_PATH)build/msvc-common.mk
|
||||||
|
CFLAGS_OPT += -MD
|
||||||
|
CFLAGS_DEBUG += -MDd
|
||||||
|
CFLAGS += -DUNICODE
|
||||||
|
# Ignore warnings about the main function prototype when building with -ZW
|
||||||
|
CXXFLAGS += -ZW -wd4447
|
||||||
|
# Ignore warnings about code built with -ZW in .lib files
|
||||||
|
AR_OPTS += -ignore:4264
|
||||||
|
|
||||||
|
# WelsThreadLib requires building with -ZW, since it uses new Windows Runtime
|
||||||
|
# classes for creating threads.
|
||||||
|
# If linking an .exe that contains Windows Runtime code, the first object
|
||||||
|
# file linked into the exe also needs to be built with -ZW (otherwise the build
|
||||||
|
# fails with "vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker",
|
||||||
|
# so set it on all files.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
include $(SRC_PATH)build/arch.mk
|
include $(SRC_PATH)build/arch.mk
|
||||||
ifeq ($(ASM_ARCH), x86)
|
ifeq ($(ASM_ARCH), x86)
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ARCH), x86_64)
|
||||||
ASMFLAGS += -f win64
|
ASMFLAGS += -f win64
|
||||||
ASMFLAGS_PLATFORM = -DWIN64
|
ASMFLAGS_PLATFORM = -DWIN64
|
||||||
else
|
else
|
||||||
@@ -40,6 +40,10 @@ SHAREDLIBSUFFIX=dll
|
|||||||
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
|
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
|
||||||
SHARED=-LD
|
SHARED=-LD
|
||||||
EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
|
EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
|
||||||
SHLDFLAGS=-Fd$(PROJECT_NAME).pdb -link -def:openh264.def -implib:$(EXTRA_LIBRARY)
|
LDFLAGS += -link
|
||||||
|
SHLDFLAGS=-pdb:$(PROJECT_NAME).pdb -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY)
|
||||||
STATIC_LDFLAGS=
|
STATIC_LDFLAGS=
|
||||||
CODEC_UNITTEST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS
|
CODEC_UNITTEST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
|
%.res: %.rc
|
||||||
|
$(QUIET_RC)rc -fo $@ $<
|
||||||
|
|||||||
@@ -79,8 +79,6 @@ clean_Android_dec:
|
|||||||
clean_Android_enc:
|
clean_Android_enc:
|
||||||
-cd ./codec/build/android/enc && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
|
-cd ./codec/build/android/enc && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
|
||||||
else
|
else
|
||||||
all:
|
|
||||||
@:
|
|
||||||
clean_Android:
|
clean_Android:
|
||||||
@:
|
@:
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
|
|||||||
CFLAGS += -fPIC
|
CFLAGS += -fPIC
|
||||||
LDFLAGS += -lpthread
|
LDFLAGS += -lpthread
|
||||||
ifeq ($(ASM_ARCH), x86)
|
ifeq ($(ASM_ARCH), x86)
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ARCH), x86_64)
|
||||||
ASMFLAGS += -f elf64
|
ASMFLAGS += -f elf64
|
||||||
else
|
else
|
||||||
ASMFLAGS += -f elf
|
ASMFLAGS += -f elf
|
||||||
@@ -10,7 +10,7 @@ CFLAGS += -Wall -fPIC -MMD -MP
|
|||||||
LDFLAGS += -lpthread
|
LDFLAGS += -lpthread
|
||||||
ifeq ($(ASM_ARCH), x86)
|
ifeq ($(ASM_ARCH), x86)
|
||||||
ASMFLAGS += -DPREFIX
|
ASMFLAGS += -DPREFIX
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ARCH), x86_64)
|
||||||
ASMFLAGS += -f macho64
|
ASMFLAGS += -f macho64
|
||||||
else
|
else
|
||||||
ASMFLAGS += -f macho
|
ASMFLAGS += -f macho
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION)
|
|||||||
SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
|
SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
|
||||||
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
|
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
|
||||||
LDFLAGS += -lpthread
|
LDFLAGS += -lpthread
|
||||||
|
AR_OPTS = crD $@
|
||||||
ifeq ($(ASM_ARCH), x86)
|
ifeq ($(ASM_ARCH), x86)
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ARCH), x86_64)
|
||||||
ASMFLAGS += -f elf64
|
ASMFLAGS += -f elf64
|
||||||
else
|
else
|
||||||
ASMFLAGS += -f elf
|
ASMFLAGS += -f elf
|
||||||
@@ -15,3 +16,7 @@ ifeq ($(ASM_ARCH), arm)
|
|||||||
ASMFLAGS += -march=armv7-a -mfpu=neon
|
ASMFLAGS += -march=armv7-a -mfpu=neon
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CXX), clang++)
|
||||||
|
CXXFLAGS += -Wc++11-compat-reserved-user-defined-literal
|
||||||
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ EXTRA_LIBRARY=$(LIBPREFIX)$(PROJECT_NAME).dll.a
|
|||||||
SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY)
|
SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY)
|
||||||
CFLAGS += -MMD -MP
|
CFLAGS += -MMD -MP
|
||||||
LDFLAGS +=
|
LDFLAGS +=
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ARCH), x86_64)
|
||||||
ASMFLAGS += -f win64
|
ASMFLAGS += -f win64
|
||||||
ASMFLAGS_PLATFORM = -DWIN64
|
ASMFLAGS_PLATFORM = -DWIN64
|
||||||
CC = x86_64-w64-mingw32-gcc
|
CC = x86_64-w64-mingw32-gcc
|
||||||
|
|||||||
3
build/platform-msvc-app.mk
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
include $(SRC_PATH)build/msvc-app.mk
|
||||||
|
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
||||||
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
ARCH = arm
|
ARCH = arm
|
||||||
include $(SRC_PATH)build/msvc-common.mk
|
include $(SRC_PATH)build/msvc-app.mk
|
||||||
CFLAGS_OPT += -MD
|
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE
|
||||||
CFLAGS_DEBUG += -MDd
|
LDFLAGS += -nodefaultlib:kernel32.lib -nodefaultlib:ole32.lib WindowsPhoneCore.lib
|
||||||
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
UTSHLDFLAGS = -def:$(SRC_PATH)ut.def
|
||||||
CXXFLAGS +=
|
|
||||||
LDFLAGS +=
|
|
||||||
|
|
||||||
codec/common/src/WelsThreadLib.$(OBJ): CXXFLAGS += -ZW
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ LDFLAGS += user32.lib
|
|||||||
CFLAGS_OPT += -MT
|
CFLAGS_OPT += -MT
|
||||||
CFLAGS_DEBUG += -MTd -Gm
|
CFLAGS_DEBUG += -MTd -Gm
|
||||||
|
|
||||||
|
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): openh264.res
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
CFLAGS_M32=-m32
|
CFLAGS_M32=-m32
|
||||||
CFLAGS_M64=-m64
|
CFLAGS_M64=-m64
|
||||||
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
|
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
|
||||||
ifeq (, $(ENABLE64BIT))
|
ifneq ($(ENABLE64BIT),)
|
||||||
ifeq ($(ARCH), x86_64)
|
|
||||||
ENABLE64BIT=Yes
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(ENABLE64BIT), Yes)
|
ifeq ($(ENABLE64BIT), Yes)
|
||||||
|
ARCH = x86_64
|
||||||
|
else
|
||||||
|
ARCH = x86
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(ARCH), x86_64)
|
||||||
CFLAGS += $(CFLAGS_M64)
|
CFLAGS += $(CFLAGS_M64)
|
||||||
LDFLAGS += $(CFLAGS_M64)
|
LDFLAGS += $(CFLAGS_M64)
|
||||||
ASMFLAGS_PLATFORM = -DUNIX64
|
ASMFLAGS_PLATFORM = -DUNIX64
|
||||||
@@ -17,6 +19,9 @@ ASMFLAGS_PLATFORM = -DX86_32
|
|||||||
endif
|
endif
|
||||||
ifeq ($(USE_ASM),Yes)
|
ifeq ($(USE_ASM),Yes)
|
||||||
CFLAGS += -DX86_ASM
|
CFLAGS += -DX86_ASM
|
||||||
|
ifneq ($(ARCH), x86_64)
|
||||||
|
CFLAGS += -DX86_32_ASM
|
||||||
|
endif
|
||||||
ASM_ARCH = x86
|
ASM_ARCH = x86
|
||||||
endif
|
endif
|
||||||
ASM = nasm
|
ASM = nasm
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#define WELS_VIDEO_CODEC_SVC_API_H__
|
#define WELS_VIDEO_CODEC_SVC_API_H__
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||||
typedef unsigned char bool;
|
typedef unsigned char bool;
|
||||||
#else
|
#else
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ typedef enum {
|
|||||||
ENCODER_OPTION_MAX_BITRATE,
|
ENCODER_OPTION_MAX_BITRATE,
|
||||||
ENCODER_OPTION_INTER_SPATIAL_PRED,
|
ENCODER_OPTION_INTER_SPATIAL_PRED,
|
||||||
ENCODER_OPTION_RC_MODE,
|
ENCODER_OPTION_RC_MODE,
|
||||||
|
ENCODER_OPTION_RC_FRAME_SKIP,
|
||||||
ENCODER_PADDING_PADDING, ///< 0:disable padding;1:padding
|
ENCODER_PADDING_PADDING, ///< 0:disable padding;1:padding
|
||||||
|
|
||||||
ENCODER_OPTION_PROFILE, ///< assgin the profile for each layer
|
ENCODER_OPTION_PROFILE, ///< assgin the profile for each layer
|
||||||
@@ -284,7 +285,8 @@ typedef enum {
|
|||||||
RC_BITRATE_MODE = 1, ///< bitrate mode
|
RC_BITRATE_MODE = 1, ///< bitrate mode
|
||||||
RC_BUFFERBASED_MODE = 2, ///< no bitrate control,only using buffer status,adjust the video quality
|
RC_BUFFERBASED_MODE = 2, ///< no bitrate control,only using buffer status,adjust the video quality
|
||||||
RC_TIMESTAMP_MODE = 3, //rate control based timestamp
|
RC_TIMESTAMP_MODE = 3, //rate control based timestamp
|
||||||
RC_OFF_MODE = -1 ///< rate control off mode
|
RC_BITRATE_MODE_POST_SKIP = 4, ///< this is in-building RC MODE, WILL BE DELETED after algorithm tuning!
|
||||||
|
RC_OFF_MODE = -1, ///< rate control off mode
|
||||||
} RC_MODES;
|
} RC_MODES;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -358,8 +360,8 @@ typedef struct {
|
|||||||
int iVideoWidth; ///< width of picture in luminance samples of a layer
|
int iVideoWidth; ///< width of picture in luminance samples of a layer
|
||||||
int iVideoHeight; ///< height of picture in luminance samples of a layer
|
int iVideoHeight; ///< height of picture in luminance samples of a layer
|
||||||
float fFrameRate; ///< frame rate specified for a layer
|
float fFrameRate; ///< frame rate specified for a layer
|
||||||
int iSpatialBitrate; ///< target bitrate for a spatial layer
|
int iSpatialBitrate; ///< target bitrate for a spatial layer, in unit of bps
|
||||||
int iMaxSpatialBitrate; ///< maximum bitrate for a spatial layer
|
int iMaxSpatialBitrate; ///< maximum bitrate for a spatial layer, in unit of bps
|
||||||
EProfileIdc uiProfileIdc; ///< value of profile IDC (PRO_UNKNOWN for auto-detection)
|
EProfileIdc uiProfileIdc; ///< value of profile IDC (PRO_UNKNOWN for auto-detection)
|
||||||
ELevelIdc uiLevelIdc; ///< value of profile IDC (0 for auto-detection)
|
ELevelIdc uiLevelIdc; ///< value of profile IDC (0 for auto-detection)
|
||||||
int iDLayerQp; ///< value of level IDC (0 for auto-detection)
|
int iDLayerQp; ///< value of level IDC (0 for auto-detection)
|
||||||
@@ -406,7 +408,7 @@ typedef struct TagEncParamBase {
|
|||||||
|
|
||||||
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
|
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
|
||||||
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
|
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
|
||||||
int iTargetBitrate; ///< target bitrate desired
|
int iTargetBitrate; ///< target bitrate desired, in unit of bps
|
||||||
RC_MODES iRCMode; ///< rate control mode
|
RC_MODES iRCMode; ///< rate control mode
|
||||||
float fMaxFrameRate; ///< maximal input frame rate
|
float fMaxFrameRate; ///< maximal input frame rate
|
||||||
|
|
||||||
@@ -421,7 +423,7 @@ typedef struct TagEncParamExt {
|
|||||||
|
|
||||||
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
|
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
|
||||||
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
|
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
|
||||||
int iTargetBitrate; ///< target bitrate desired
|
int iTargetBitrate; ///< target bitrate desired, in unit of bps
|
||||||
RC_MODES iRCMode; ///< rate control mode
|
RC_MODES iRCMode; ///< rate control mode
|
||||||
float fMaxFrameRate; ///< maximal input frame rate
|
float fMaxFrameRate; ///< maximal input frame rate
|
||||||
|
|
||||||
@@ -442,7 +444,7 @@ typedef struct TagEncParamExt {
|
|||||||
|
|
||||||
/* rc control */
|
/* rc control */
|
||||||
bool bEnableFrameSkip; ///< False: don't skip frame even if VBV buffer overflow.True: allow skipping frames to keep the bitrate within limits
|
bool bEnableFrameSkip; ///< False: don't skip frame even if VBV buffer overflow.True: allow skipping frames to keep the bitrate within limits
|
||||||
int iMaxBitrate; ///< the maximum bitrate
|
int iMaxBitrate; ///< the maximum bitrate, in unit of bps, set it to UNSPECIFIED_BIT_RATE if not needed
|
||||||
int iMaxQp; ///< the maximum QP encoder supports
|
int iMaxQp; ///< the maximum QP encoder supports
|
||||||
int iMinQp; ///< the minmum QP encoder supports
|
int iMinQp; ///< the minmum QP encoder supports
|
||||||
unsigned int uiMaxNalSize; ///< the maximum NAL size. This value should be not 0 for dynamic slice mode
|
unsigned int uiMaxNalSize; ///< the maximum NAL size. This value should be not 0 for dynamic slice mode
|
||||||
@@ -537,7 +539,7 @@ typedef struct Source_Picture_s {
|
|||||||
unsigned char* pData[4]; ///< plane pData
|
unsigned char* pData[4]; ///< plane pData
|
||||||
int iPicWidth; ///< luma picture width in x coordinate
|
int iPicWidth; ///< luma picture width in x coordinate
|
||||||
int iPicHeight; ///< luma picture height in y coordinate
|
int iPicHeight; ///< luma picture height in y coordinate
|
||||||
long long uiTimeStamp;
|
long long uiTimeStamp; ///< timestamp of the source picture, unit: millisecond
|
||||||
} SSourcePicture;
|
} SSourcePicture;
|
||||||
/**
|
/**
|
||||||
* @brief Structure for bit rate info
|
* @brief Structure for bit rate info
|
||||||
@@ -655,8 +657,7 @@ typedef struct TagVideoDecoderStatistics {
|
|||||||
unsigned int uiEcIDRNum; ///< number of actual unintegrity IDR or not received but eced
|
unsigned int uiEcIDRNum; ///< number of actual unintegrity IDR or not received but eced
|
||||||
unsigned int uiEcFrameNum; ///<
|
unsigned int uiEcFrameNum; ///<
|
||||||
unsigned int uiIDRLostNum; ///< number of whole lost IDR
|
unsigned int uiIDRLostNum; ///< number of whole lost IDR
|
||||||
unsigned int
|
unsigned int uiFreezingIDRNum; ///< number of freezing IDR with error (partly received), under resolution change
|
||||||
uiFreezingIDRNum; ///< number of freezing IDR with error (partly received), under resolution change
|
|
||||||
unsigned int uiFreezingNonIDRNum; ///< number of freezing non-IDR with error
|
unsigned int uiFreezingNonIDRNum; ///< number of freezing non-IDR with error
|
||||||
int iAvgLumaQp; ///< average luma QP. default: -1, no correct frame outputted
|
int iAvgLumaQp; ///< average luma QP. default: -1, no correct frame outputted
|
||||||
int iSpsReportErrorNum; ///< number of Sps Invalid report
|
int iSpsReportErrorNum; ///< number of Sps Invalid report
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
cmResultSuccess, ///< successful
|
cmResultSuccess, ///< successful
|
||||||
cmInitParaError, ///< parameters are invalid
|
cmInitParaError, ///< parameters are invalid
|
||||||
cmUnkonwReason,
|
cmUnknownReason,
|
||||||
cmMallocMemeError, ///< malloc a memory error
|
cmMallocMemeError, ///< malloc a memory error
|
||||||
cmInitExpected, ///< initial action is expected
|
cmInitExpected, ///< initial action is expected
|
||||||
cmUnsupportedData
|
cmUnsupportedData
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
#include "codec_app_def.h"
|
#include "codec_app_def.h"
|
||||||
|
|
||||||
static const OpenH264Version g_stCodecVersion = {1,4,0,0};
|
static const OpenH264Version g_stCodecVersion = {1, 5, 0, 0};
|
||||||
static const char* const g_strCodecVer = "OpenH264 version:1.4.0.0";
|
static const char* const g_strCodecVer = "OpenH264 version:1.5.0.0";
|
||||||
|
|
||||||
#define OPENH264_MAJOR (1)
|
#define OPENH264_MAJOR (1)
|
||||||
#define OPENH264_MINOR (4)
|
#define OPENH264_MINOR (5)
|
||||||
#define OPENH264_REVISION (0)
|
#define OPENH264_REVISION (0)
|
||||||
#define OPENH264_RESERVED (0)
|
#define OPENH264_RESERVED (0)
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,17 @@ echo "" >>codec_ver.h
|
|||||||
echo "#include \"codec_app_def.h\"" >>codec_ver.h
|
echo "#include \"codec_app_def.h\"" >>codec_ver.h
|
||||||
echo "" >>codec_ver.h
|
echo "" >>codec_ver.h
|
||||||
|
|
||||||
echo "static const OpenH264Version g_stCodecVersion = {$1};"|tr '.' ',' >>codec_ver.h
|
fullver="$1"
|
||||||
echo "static const char* const g_strCodecVer = \"OpenH264 version:$1\";" >>codec_ver.h
|
major="${1%%.*}"
|
||||||
|
tmp=${1#*.}
|
||||||
|
minor="${tmp%%.*}"
|
||||||
|
tmp=${tmp#*.}
|
||||||
|
revnr="${tmp%%.*}"
|
||||||
|
tmp=${tmp#*.}
|
||||||
|
resnr="${tmp%%.*}"
|
||||||
|
|
||||||
|
echo "static const OpenH264Version g_stCodecVersion = {$major, $minor, $revnr, $resnr};" >>codec_ver.h
|
||||||
|
echo "static const char* const g_strCodecVer = \"OpenH264 version:$fullver\";" >>codec_ver.h
|
||||||
#if [ "$2"x = ""x ]; then
|
#if [ "$2"x = ""x ]; then
|
||||||
#echo "static const char* const g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
|
#echo "static const char* const g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
|
||||||
#else
|
#else
|
||||||
@@ -37,18 +46,17 @@ echo "static const char* const g_strCodecVer = \"OpenH264 version:$1\";" >>code
|
|||||||
echo "" >>codec_ver.h
|
echo "" >>codec_ver.h
|
||||||
|
|
||||||
#define OPENH264_MAJOR 1, #define OPENH264_MINOR 2 #define OPENH264_REVISION 3 #define OPENH264_RESERVED 0
|
#define OPENH264_MAJOR 1, #define OPENH264_MINOR 2 #define OPENH264_REVISION 3 #define OPENH264_RESERVED 0
|
||||||
echo "#define OPENH264_MAJOR (${1%%.*})" >>codec_ver.h
|
echo "#define OPENH264_MAJOR ($major)" >>codec_ver.h
|
||||||
|
echo "#define OPENH264_MINOR ($minor)" >>codec_ver.h
|
||||||
tmp=${1#*.}
|
echo "#define OPENH264_REVISION ($revnr)" >>codec_ver.h
|
||||||
echo "#define OPENH264_MINOR (${tmp%%.*})" >>codec_ver.h
|
echo "#define OPENH264_RESERVED ($resnr)" >>codec_ver.h
|
||||||
|
|
||||||
tmp=${tmp#*.}
|
|
||||||
echo "#define OPENH264_REVISION (${tmp%%.*})" >>codec_ver.h
|
|
||||||
|
|
||||||
tmp=${tmp#*.}
|
|
||||||
echo "#define OPENH264_RESERVED (${tmp%%.*})" >>codec_ver.h
|
|
||||||
echo "" >>codec_ver.h
|
echo "" >>codec_ver.h
|
||||||
|
|
||||||
echo "#endif // CODEC_VER_H" >>codec_ver.h
|
echo "#endif // CODEC_VER_H" >>codec_ver.h
|
||||||
|
|
||||||
mv -f codec_ver.h ../api/svc/codec_ver.h
|
mv -f codec_ver.h ../api/svc/codec_ver.h
|
||||||
|
|
||||||
|
# Ignore non-utf8 chars in the input
|
||||||
|
export LC_ALL=C
|
||||||
|
cat ../../openh264.rc.template | sed "s/\$MAJOR/$major/g" | sed "s/\$MINOR/$minor/g" | sed "s/\$REVISION/$revnr/g" | sed "s/\$RESERVED/$resnr/g" > openh264.rc.tmp
|
||||||
|
mv openh264.rc.tmp ../../openh264.rc
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
4CE4427918B6FC360017DF25 /* libwelsdec.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwelsdec.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
4CE4427918B6FC360017DF25 /* libwelsdec.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwelsdec.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
4CE4427C18B6FC360017DF25 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
4CE4427C18B6FC360017DF25 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
4CE4428D18B6FC360017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
|
4CE4428D18B6FC360017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
4CE4464518BC5EAA0017DF25 /* as264_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = as264_common.h; sourceTree = "<group>"; };
|
|
||||||
4CE4464618BC5EAA0017DF25 /* au_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_parser.h; sourceTree = "<group>"; };
|
4CE4464618BC5EAA0017DF25 /* au_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_parser.h; sourceTree = "<group>"; };
|
||||||
4CE4464718BC5EAA0017DF25 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bit_stream.h; sourceTree = "<group>"; };
|
4CE4464718BC5EAA0017DF25 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bit_stream.h; sourceTree = "<group>"; };
|
||||||
4CE4464818BC5EAA0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
|
4CE4464818BC5EAA0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
|
||||||
@@ -192,7 +191,6 @@
|
|||||||
6A3E814019D79AD900C19C1F /* cabac_decoder.h */,
|
6A3E814019D79AD900C19C1F /* cabac_decoder.h */,
|
||||||
9AED665A1946A21D009A3567 /* utils.h */,
|
9AED665A1946A21D009A3567 /* utils.h */,
|
||||||
F0B204FA18FD23CF005DA23F /* error_concealment.h */,
|
F0B204FA18FD23CF005DA23F /* error_concealment.h */,
|
||||||
4CE4464518BC5EAA0017DF25 /* as264_common.h */,
|
|
||||||
4CE4464618BC5EAA0017DF25 /* au_parser.h */,
|
4CE4464618BC5EAA0017DF25 /* au_parser.h */,
|
||||||
4CE4464718BC5EAA0017DF25 /* bit_stream.h */,
|
4CE4464718BC5EAA0017DF25 /* bit_stream.h */,
|
||||||
4CE4464818BC5EAA0017DF25 /* deblocking.h */,
|
4CE4464818BC5EAA0017DF25 /* deblocking.h */,
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
4CE4432518B6FFA00017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
|
4CE4432518B6FFA00017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||||
4CE446AA18BC605C0017DF25 /* as264_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = as264_common.h; sourceTree = "<group>"; };
|
4CE446AA18BC605C0017DF25 /* as264_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = as264_common.h; sourceTree = "<group>"; };
|
||||||
4CE446AB18BC605C0017DF25 /* au_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_set.h; sourceTree = "<group>"; };
|
4CE446AB18BC605C0017DF25 /* au_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_set.h; sourceTree = "<group>"; };
|
||||||
4CE446AC18BC605C0017DF25 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bit_stream.h; sourceTree = "<group>"; };
|
|
||||||
4CE446AE18BC605C0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
|
4CE446AE18BC605C0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
|
||||||
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decode_mb_aux.h; sourceTree = "<group>"; };
|
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decode_mb_aux.h; sourceTree = "<group>"; };
|
||||||
4CE446B018BC605C0017DF25 /* dq_map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dq_map.h; sourceTree = "<group>"; };
|
4CE446B018BC605C0017DF25 /* dq_map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dq_map.h; sourceTree = "<group>"; };
|
||||||
@@ -95,7 +94,6 @@
|
|||||||
4CE446BB18BC605C0017DF25 /* mt_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mt_defs.h; sourceTree = "<group>"; };
|
4CE446BB18BC605C0017DF25 /* mt_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mt_defs.h; sourceTree = "<group>"; };
|
||||||
4CE446BC18BC605C0017DF25 /* mv_pred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mv_pred.h; sourceTree = "<group>"; };
|
4CE446BC18BC605C0017DF25 /* mv_pred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mv_pred.h; sourceTree = "<group>"; };
|
||||||
4CE446BD18BC605C0017DF25 /* nal_encap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_encap.h; sourceTree = "<group>"; };
|
4CE446BD18BC605C0017DF25 /* nal_encap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_encap.h; sourceTree = "<group>"; };
|
||||||
4CE446BE18BC605C0017DF25 /* nal_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_prefix.h; sourceTree = "<group>"; };
|
|
||||||
4CE446BF18BC605C0017DF25 /* param_svc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = param_svc.h; sourceTree = "<group>"; };
|
4CE446BF18BC605C0017DF25 /* param_svc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = param_svc.h; sourceTree = "<group>"; };
|
||||||
4CE446C018BC605C0017DF25 /* parameter_sets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parameter_sets.h; sourceTree = "<group>"; };
|
4CE446C018BC605C0017DF25 /* parameter_sets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parameter_sets.h; sourceTree = "<group>"; };
|
||||||
4CE446C118BC605C0017DF25 /* picture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = picture.h; sourceTree = "<group>"; };
|
4CE446C118BC605C0017DF25 /* picture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = picture.h; sourceTree = "<group>"; };
|
||||||
@@ -154,6 +152,7 @@
|
|||||||
4CE4470618BC605C0017DF25 /* welsEncoderExt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = welsEncoderExt.cpp; sourceTree = "<group>"; };
|
4CE4470618BC605C0017DF25 /* welsEncoderExt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = welsEncoderExt.cpp; sourceTree = "<group>"; };
|
||||||
6CA38DA21991CACE003EAAE0 /* svc_motion_estimation.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = svc_motion_estimation.S; sourceTree = "<group>"; };
|
6CA38DA21991CACE003EAAE0 /* svc_motion_estimation.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = svc_motion_estimation.S; sourceTree = "<group>"; };
|
||||||
6CA38DA41991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = svc_motion_estimation_aarch64_neon.S; path = arm64/svc_motion_estimation_aarch64_neon.S; sourceTree = "<group>"; };
|
6CA38DA41991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = svc_motion_estimation_aarch64_neon.S; path = arm64/svc_motion_estimation_aarch64_neon.S; sourceTree = "<group>"; };
|
||||||
|
98FE4C1A1AB0200C0031E2B4 /* golomb_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = golomb_common.h; path = ../../../common/inc/golomb_common.h; sourceTree = "<group>"; };
|
||||||
9AED664819469FAF009A3567 /* welsCodecTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = welsCodecTrace.h; path = ../../../common/inc/welsCodecTrace.h; sourceTree = "<group>"; };
|
9AED664819469FAF009A3567 /* welsCodecTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = welsCodecTrace.h; path = ../../../common/inc/welsCodecTrace.h; sourceTree = "<group>"; };
|
||||||
9AED664C19469FC1009A3567 /* welsCodecTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = welsCodecTrace.cpp; path = ../../../common/src/welsCodecTrace.cpp; sourceTree = "<group>"; };
|
9AED664C19469FC1009A3567 /* welsCodecTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = welsCodecTrace.cpp; path = ../../../common/src/welsCodecTrace.cpp; sourceTree = "<group>"; };
|
||||||
9AED66651946A2B3009A3567 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cpp; path = ../../../common/src/utils.cpp; sourceTree = "<group>"; };
|
9AED66651946A2B3009A3567 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cpp; path = ../../../common/src/utils.cpp; sourceTree = "<group>"; };
|
||||||
@@ -254,13 +253,13 @@
|
|||||||
4CE446A918BC605C0017DF25 /* inc */ = {
|
4CE446A918BC605C0017DF25 /* inc */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
98FE4C1A1AB0200C0031E2B4 /* golomb_common.h */,
|
||||||
F7E9997F19EBD3CE009B1021 /* svc_set_mb_syn.h */,
|
F7E9997F19EBD3CE009B1021 /* svc_set_mb_syn.h */,
|
||||||
F7E9997E19EBD3C6009B1021 /* set_mb_syn_cabac.h */,
|
F7E9997E19EBD3C6009B1021 /* set_mb_syn_cabac.h */,
|
||||||
9AED66671946A2C4009A3567 /* utils.h */,
|
9AED66671946A2C4009A3567 /* utils.h */,
|
||||||
4CDBFB9D18E5068D0025A767 /* wels_transpose_matrix.h */,
|
4CDBFB9D18E5068D0025A767 /* wels_transpose_matrix.h */,
|
||||||
4CE446AA18BC605C0017DF25 /* as264_common.h */,
|
4CE446AA18BC605C0017DF25 /* as264_common.h */,
|
||||||
4CE446AB18BC605C0017DF25 /* au_set.h */,
|
4CE446AB18BC605C0017DF25 /* au_set.h */,
|
||||||
4CE446AC18BC605C0017DF25 /* bit_stream.h */,
|
|
||||||
4CE446AE18BC605C0017DF25 /* deblocking.h */,
|
4CE446AE18BC605C0017DF25 /* deblocking.h */,
|
||||||
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */,
|
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */,
|
||||||
4CE446B018BC605C0017DF25 /* dq_map.h */,
|
4CE446B018BC605C0017DF25 /* dq_map.h */,
|
||||||
@@ -274,7 +273,6 @@
|
|||||||
4CE446BB18BC605C0017DF25 /* mt_defs.h */,
|
4CE446BB18BC605C0017DF25 /* mt_defs.h */,
|
||||||
4CE446BC18BC605C0017DF25 /* mv_pred.h */,
|
4CE446BC18BC605C0017DF25 /* mv_pred.h */,
|
||||||
4CE446BD18BC605C0017DF25 /* nal_encap.h */,
|
4CE446BD18BC605C0017DF25 /* nal_encap.h */,
|
||||||
4CE446BE18BC605C0017DF25 /* nal_prefix.h */,
|
|
||||||
4CE446BF18BC605C0017DF25 /* param_svc.h */,
|
4CE446BF18BC605C0017DF25 /* param_svc.h */,
|
||||||
4CE446C018BC605C0017DF25 /* parameter_sets.h */,
|
4CE446C018BC605C0017DF25 /* parameter_sets.h */,
|
||||||
4CE446C118BC605C0017DF25 /* picture.h */,
|
4CE446C118BC605C0017DF25 /* picture.h */,
|
||||||
|
|||||||
@@ -640,10 +640,6 @@
|
|||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl"
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\decoder\core\inc\as264_common.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\decoder\core\inc\au_parser.h"
|
RelativePath="..\..\..\decoder\core\inc\au_parser.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -354,10 +354,6 @@
|
|||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl"
|
Filter="h;hpp;hxx;hm;inl"
|
||||||
>
|
>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\common\inc\mem_align.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\common\inc\welsCodecTrace.h"
|
RelativePath="..\..\..\common\inc\welsCodecTrace.h"
|
||||||
>
|
>
|
||||||
@@ -372,7 +368,7 @@
|
|||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\decoder\plus\res\welsdec.rc"
|
RelativePath="..\..\..\..\openh264.rc"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|||||||
@@ -494,10 +494,6 @@
|
|||||||
RelativePath="..\..\..\encoder\core\inc\au_set.h"
|
RelativePath="..\..\..\encoder\core\inc\au_set.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\encoder\core\inc\bit_stream.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\common\inc\copy_mb.h"
|
RelativePath="..\..\..\common\inc\copy_mb.h"
|
||||||
>
|
>
|
||||||
@@ -550,6 +546,10 @@
|
|||||||
RelativePath="..\..\..\encoder\core\inc\get_intra_predictor.h"
|
RelativePath="..\..\..\encoder\core\inc\get_intra_predictor.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\common\inc\golomb_common.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\common\inc\ls_defines.h"
|
RelativePath="..\..\..\common\inc\ls_defines.h"
|
||||||
>
|
>
|
||||||
@@ -590,10 +590,6 @@
|
|||||||
RelativePath="..\..\..\encoder\core\inc\nal_encap.h"
|
RelativePath="..\..\..\encoder\core\inc\nal_encap.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\encoder\core\inc\nal_prefix.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\encoder\core\inc\param_svc.h"
|
RelativePath="..\..\..\encoder\core\inc\param_svc.h"
|
||||||
>
|
>
|
||||||
@@ -694,10 +690,6 @@
|
|||||||
RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h"
|
RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\..\encoder\core\inc\trace.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\common\inc\typedefs.h"
|
RelativePath="..\..\..\common\inc\typedefs.h"
|
||||||
>
|
>
|
||||||
@@ -715,7 +707,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\encoder\core\inc\wels_common_defs.h"
|
RelativePath="..\..\..\common\inc\wels_common_defs.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|||||||
@@ -395,7 +395,7 @@
|
|||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\..\encoder\plus\res\welsenc.rc"
|
RelativePath="..\..\..\..\openh264.rc"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
|||||||
29
codec/build/windowsphone/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Files generated by Visual Studio 2008
|
||||||
|
*.user
|
||||||
|
*.ncb
|
||||||
|
*.suo
|
||||||
|
*.opensdf
|
||||||
|
|
||||||
|
Win32
|
||||||
|
x64
|
||||||
|
ARM
|
||||||
|
Debug
|
||||||
|
Release
|
||||||
|
|
||||||
|
# Files generated by upgrading the project files
|
||||||
|
Backup
|
||||||
|
Generated Files
|
||||||
|
UpgradeLog.htm
|
||||||
|
|
||||||
|
# Files generated by Visual Studio 2013
|
||||||
|
*.sdf
|
||||||
|
ipch
|
||||||
|
Draft
|
||||||
|
|
||||||
|
# Files used in App
|
||||||
|
Bin
|
||||||
|
obj
|
||||||
|
res
|
||||||
|
*.dll
|
||||||
|
*.yuv
|
||||||
|
*.264
|
||||||
76
codec/build/windowsphone/all/CodecApp.sln
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.31101.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodecApp", "CodecApp\CodecApp.csproj", "{5424CF29-908E-417E-93F3-F1CD81E5372C}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodecRTComponent", "CodecRTComponent.vcxproj", "{FE5BF241-F4EA-4B94-B36A-23511E5908EC}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|ARM = Debug|ARM
|
||||||
|
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|ARM = Release|ARM
|
||||||
|
Release|Mixed Platforms = Release|Mixed Platforms
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.Build.0 = Debug|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.ActiveCfg = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.Build.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.Deploy.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.Deploy.0 = Debug|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.ActiveCfg = Release|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.Build.0 = Release|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.Deploy.0 = Release|ARM
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.Deploy.0 = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.ActiveCfg = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.Build.0 = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.Deploy.0 = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.Build.0 = Release|x86
|
||||||
|
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.Deploy.0 = Release|x86
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|ARM.Build.0 = Debug|ARM
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|ARM.ActiveCfg = Release|ARM
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|ARM.Build.0 = Release|ARM
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
20
codec/build/windowsphone/all/CodecApp/App.xaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<Application
|
||||||
|
x:Class="CodecApp.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||||
|
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
|
||||||
|
|
||||||
|
<!--Application Resources-->
|
||||||
|
<Application.Resources>
|
||||||
|
<local:LocalizedStrings xmlns:local="clr-namespace:CodecApp" x:Key="LocalizedStrings"/>
|
||||||
|
</Application.Resources>
|
||||||
|
|
||||||
|
<Application.ApplicationLifetimeObjects>
|
||||||
|
<!--Required object that handles lifetime events for the application-->
|
||||||
|
<shell:PhoneApplicationService
|
||||||
|
Launching="Application_Launching" Closing="Application_Closing"
|
||||||
|
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
|
||||||
|
</Application.ApplicationLifetimeObjects>
|
||||||
|
|
||||||
|
</Application>
|
||||||
223
codec/build/windowsphone/all/CodecApp/App.xaml.cs
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using Microsoft.Phone.Controls;
|
||||||
|
using Microsoft.Phone.Shell;
|
||||||
|
using CodecApp.Resources;
|
||||||
|
|
||||||
|
namespace CodecApp
|
||||||
|
{
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides easy access to the root frame of the Phone Application.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The root frame of the Phone Application.</returns>
|
||||||
|
public static PhoneApplicationFrame RootFrame { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for the Application object.
|
||||||
|
/// </summary>
|
||||||
|
public App()
|
||||||
|
{
|
||||||
|
// Global handler for uncaught exceptions.
|
||||||
|
UnhandledException += Application_UnhandledException;
|
||||||
|
|
||||||
|
// Standard XAML initialization
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
// Phone-specific initialization
|
||||||
|
InitializePhoneApplication();
|
||||||
|
|
||||||
|
// Language display initialization
|
||||||
|
InitializeLanguage();
|
||||||
|
|
||||||
|
// Show graphics profiling information while debugging.
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
// Display the current frame rate counters.
|
||||||
|
Application.Current.Host.Settings.EnableFrameRateCounter = true;
|
||||||
|
|
||||||
|
// Show the areas of the app that are being redrawn in each frame.
|
||||||
|
//Application.Current.Host.Settings.EnableRedrawRegions = true;
|
||||||
|
|
||||||
|
// Enable non-production analysis visualization mode,
|
||||||
|
// which shows areas of a page that are handed off to GPU with a colored overlay.
|
||||||
|
//Application.Current.Host.Settings.EnableCacheVisualization = true;
|
||||||
|
|
||||||
|
// Prevent the screen from turning off while under the debugger by disabling
|
||||||
|
// the application's idle detection.
|
||||||
|
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
|
||||||
|
// and consume battery power when the user is not using the phone.
|
||||||
|
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute when the application is launching (eg, from Start)
|
||||||
|
// This code will not execute when the application is reactivated
|
||||||
|
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute when the application is activated (brought to foreground)
|
||||||
|
// This code will not execute when the application is first launched
|
||||||
|
private void Application_Activated(object sender, ActivatedEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute when the application is deactivated (sent to background)
|
||||||
|
// This code will not execute when the application is closing
|
||||||
|
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute when the application is closing (eg, user hit Back)
|
||||||
|
// This code will not execute when the application is deactivated
|
||||||
|
private void Application_Closing(object sender, ClosingEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute if a navigation fails
|
||||||
|
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||||
|
{
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
// A navigation has failed; break into the debugger
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Code to execute on Unhandled Exceptions
|
||||||
|
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
|
||||||
|
{
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
// An unhandled exception has occurred; break into the debugger
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Phone application initialization
|
||||||
|
|
||||||
|
// Avoid double-initialization
|
||||||
|
private bool phoneApplicationInitialized = false;
|
||||||
|
|
||||||
|
// Do not add any additional code to this method
|
||||||
|
private void InitializePhoneApplication()
|
||||||
|
{
|
||||||
|
if (phoneApplicationInitialized)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Create the frame but don't set it as RootVisual yet; this allows the splash
|
||||||
|
// screen to remain active until the application is ready to render.
|
||||||
|
RootFrame = new PhoneApplicationFrame();
|
||||||
|
RootFrame.Navigated += CompleteInitializePhoneApplication;
|
||||||
|
|
||||||
|
// Handle navigation failures
|
||||||
|
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
|
||||||
|
|
||||||
|
// Handle reset requests for clearing the backstack
|
||||||
|
RootFrame.Navigated += CheckForResetNavigation;
|
||||||
|
|
||||||
|
// Ensure we don't initialize again
|
||||||
|
phoneApplicationInitialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do not add any additional code to this method
|
||||||
|
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
// Set the root visual to allow the application to render
|
||||||
|
if (RootVisual != RootFrame)
|
||||||
|
RootVisual = RootFrame;
|
||||||
|
|
||||||
|
// Remove this handler since it is no longer needed
|
||||||
|
RootFrame.Navigated -= CompleteInitializePhoneApplication;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
// If the app has received a 'reset' navigation, then we need to check
|
||||||
|
// on the next navigation to see if the page stack should be reset
|
||||||
|
if (e.NavigationMode == NavigationMode.Reset)
|
||||||
|
RootFrame.Navigated += ClearBackStackAfterReset;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
// Unregister the event so it doesn't get called again
|
||||||
|
RootFrame.Navigated -= ClearBackStackAfterReset;
|
||||||
|
|
||||||
|
// Only clear the stack for 'new' (forward) and 'refresh' navigations
|
||||||
|
if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// For UI consistency, clear the entire page stack
|
||||||
|
while (RootFrame.RemoveBackEntry() != null)
|
||||||
|
{
|
||||||
|
; // do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Initialize the app's font and flow direction as defined in its localized resource strings.
|
||||||
|
//
|
||||||
|
// To ensure that the font of your application is aligned with its supported languages and that the
|
||||||
|
// FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
|
||||||
|
// and ResourceFlowDirection should be initialized in each resx file to match these values with that
|
||||||
|
// file's culture. For example:
|
||||||
|
//
|
||||||
|
// AppResources.es-ES.resx
|
||||||
|
// ResourceLanguage's value should be "es-ES"
|
||||||
|
// ResourceFlowDirection's value should be "LeftToRight"
|
||||||
|
//
|
||||||
|
// AppResources.ar-SA.resx
|
||||||
|
// ResourceLanguage's value should be "ar-SA"
|
||||||
|
// ResourceFlowDirection's value should be "RightToLeft"
|
||||||
|
//
|
||||||
|
// For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
|
||||||
|
//
|
||||||
|
private void InitializeLanguage()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Set the font to match the display language defined by the
|
||||||
|
// ResourceLanguage resource string for each supported language.
|
||||||
|
//
|
||||||
|
// Fall back to the font of the neutral language if the Display
|
||||||
|
// language of the phone is not supported.
|
||||||
|
//
|
||||||
|
// If a compiler error is hit then ResourceLanguage is missing from
|
||||||
|
// the resource file.
|
||||||
|
RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
|
||||||
|
|
||||||
|
// Set the FlowDirection of all elements under the root frame based
|
||||||
|
// on the ResourceFlowDirection resource string for each
|
||||||
|
// supported language.
|
||||||
|
//
|
||||||
|
// If a compiler error is hit then ResourceFlowDirection is missing from
|
||||||
|
// the resource file.
|
||||||
|
FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
|
||||||
|
RootFrame.FlowDirection = flow;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// If an exception is caught here it is most likely due to either
|
||||||
|
// ResourceLangauge not being correctly set to a supported language
|
||||||
|
// code or ResourceFlowDirection is set to a value other than LeftToRight
|
||||||
|
// or RightToLeft.
|
||||||
|
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
Debugger.Break();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
codec/build/windowsphone/all/CodecApp/Assets/AlignmentGrid.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/ApplicationIcon.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/BadgeLogo.png
Normal file
|
After Width: | Height: | Size: 845 B |
BIN
codec/build/windowsphone/all/CodecApp/Assets/Logo.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/SplashScreen.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/SquareTile71x71.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
BIN
codec/build/windowsphone/all/CodecApp/Assets/WideLogo.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
210
codec/build/windowsphone/all/CodecApp/CodecApp.csproj
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>10.0.20506</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{5424CF29-908E-417E-93F3-F1CD81E5372C}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>CodecApp</RootNamespace>
|
||||||
|
<AssemblyName>CodecApp</AssemblyName>
|
||||||
|
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||||
|
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
|
||||||
|
<SilverlightVersion>
|
||||||
|
</SilverlightVersion>
|
||||||
|
<SilverlightApplication>true</SilverlightApplication>
|
||||||
|
<SupportedCultures>
|
||||||
|
</SupportedCultures>
|
||||||
|
<XapOutputs>true</XapOutputs>
|
||||||
|
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||||
|
<XapFilename>CodecApp_$(Configuration)_$(Platform).xap</XapFilename>
|
||||||
|
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||||
|
<SilverlightAppEntry>CodecApp.App</SilverlightAppEntry>
|
||||||
|
<ValidateXaml>true</ValidateXaml>
|
||||||
|
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||||
|
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
<DefaultLanguage>en-US</DefaultLanguage>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>Bin\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>Bin\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>Bin\x86\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>Bin\x86\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>Bin\ARM\Debug</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>Bin\ARM\Release</OutputPath>
|
||||||
|
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
<NoConfig>true</NoConfig>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<PlatformTarget />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="App.xaml.cs">
|
||||||
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LocalizedStrings.cs" />
|
||||||
|
<Compile Include="MainPage.xaml.cs">
|
||||||
|
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Resources\AppResources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>AppResources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ApplicationDefinition Include="App.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</ApplicationDefinition>
|
||||||
|
<Page Include="MainPage.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Assets\BadgeLogo.png" />
|
||||||
|
<Content Include="Assets\Logo.png" />
|
||||||
|
<Content Include="Assets\SplashScreen.png" />
|
||||||
|
<Content Include="Assets\SquareTile150x150.png" />
|
||||||
|
<Content Include="Assets\SquareTile71x71.png" />
|
||||||
|
<Content Include="Assets\StoreLogo.png" />
|
||||||
|
<Content Include="Assets\WideLogo.png" />
|
||||||
|
<Content Include="BAMQ1_JVC_C.264">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="BA1_FT_C.264">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="BA_MW_D.264">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<None Include="CiscoVT2people_160x96_6fps.yuv">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="layer2.cfg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</AppxManifest>
|
||||||
|
<None Include="Properties\AppManifest.xml" />
|
||||||
|
<None Include="Properties\WMAppManifest.xml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
|
<Content Include="openh264.dll">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="welsenc.cfg">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Assets\AlignmentGrid.png" />
|
||||||
|
<Content Include="Assets\ApplicationIcon.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\AppResources.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\CodecRTComponent.vcxproj">
|
||||||
|
<Project>{fe5bf241-f4ea-4b94-b36a-23511e5908ec}</Project>
|
||||||
|
<Name>CodecRTComponent</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
<ProjectExtensions />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>copy /y ..\..\..\..\..\..\..\..\bin\$(Platform)\$(Configuration)\openh264.dll ..\..\..\
|
||||||
|
copy /y ..\..\..\..\..\..\..\..\res\*.yuv ..\..\..\
|
||||||
|
copy /y ..\..\..\..\..\..\..\..\res\B*.264 ..\..\..\
|
||||||
|
</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
14
codec/build/windowsphone/all/CodecApp/LocalizedStrings.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using CodecApp.Resources;
|
||||||
|
|
||||||
|
namespace CodecApp
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides access to string resources.
|
||||||
|
/// </summary>
|
||||||
|
public class LocalizedStrings
|
||||||
|
{
|
||||||
|
private static AppResources _localizedResources = new AppResources();
|
||||||
|
|
||||||
|
public AppResources LocalizedResources { get { return _localizedResources; } }
|
||||||
|
}
|
||||||
|
}
|
||||||
66
codec/build/windowsphone/all/CodecApp/MainPage.xaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
<phone:PhoneApplicationPage
|
||||||
|
x:Class="CodecApp.MainPage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||||
|
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||||
|
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||||
|
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||||
|
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||||
|
shell:SystemTray.IsVisible="True">
|
||||||
|
|
||||||
|
<!--LayoutRoot is the root grid where all page content is placed-->
|
||||||
|
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE:
|
||||||
|
To localize the displayed strings copy their values to appropriately named
|
||||||
|
keys in the app's neutral language resource file (AppResources.resx) then
|
||||||
|
replace the hard-coded text value between the attributes' quotation marks
|
||||||
|
with the binding clause whose path points to that string name.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
|
||||||
|
|
||||||
|
This binding points to the template's string resource named "ApplicationTitle".
|
||||||
|
|
||||||
|
Adding supported languages in the Project Properties tab will create a
|
||||||
|
new resx file per language that can carry the translated values of your
|
||||||
|
UI strings. The binding in these examples will cause the value of the
|
||||||
|
attributes to be drawn from the .resx file that matches the
|
||||||
|
CurrentUICulture of the app at run time.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--TitlePanel contains the name of the application and page title-->
|
||||||
|
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
|
||||||
|
<TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
|
||||||
|
<TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!--ContentPanel - place additional content here-->
|
||||||
|
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="14,10,10,-10">
|
||||||
|
<Button Content="CallEncoder" HorizontalAlignment="Left" Margin="49,10,0,0" VerticalAlignment="Top" Width="340" Click="Button_Click_CallEncoder"/>
|
||||||
|
<Button Content="CallDecoder" HorizontalAlignment="Left" Margin="63,297,0,0" VerticalAlignment="Top" Width="326" Click="Button_Click__CallDecoder"/>
|
||||||
|
<TextBox x:Name="DecoderInfo" HorizontalAlignment="Left" Height="183" Margin="37,374,0,0" TextWrapping="Wrap" Text="Decoder info" VerticalAlignment="Top" Width="397"/>
|
||||||
|
<TextBox x:Name="EncoderInfo" HorizontalAlignment="Left" Height="191" Margin="37,82,0,0" TextWrapping="Wrap" Text="Encoder info" VerticalAlignment="Top" Width="397"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Uncomment to see an alignment grid to help ensure your controls are
|
||||||
|
aligned on common boundaries. The image has a top margin of -32px to
|
||||||
|
account for the System Tray. Set this to 0 (or remove the margin altogether)
|
||||||
|
if the System Tray is hidden.
|
||||||
|
|
||||||
|
Before shipping remove this XAML and the image itself.-->
|
||||||
|
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</phone:PhoneApplicationPage>
|
||||||
86
codec/build/windowsphone/all/CodecApp/MainPage.xaml.cs
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using Microsoft.Phone.Controls;
|
||||||
|
using Microsoft.Phone.Shell;
|
||||||
|
using CodecApp.Resources;
|
||||||
|
using CodecRTComponent;
|
||||||
|
|
||||||
|
namespace CodecApp {
|
||||||
|
public partial class MainPage : PhoneApplicationPage {
|
||||||
|
// Constructor
|
||||||
|
private CodecRunTimeComponent vRTCCodec;
|
||||||
|
// Constructor
|
||||||
|
public MainPage() {
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
vRTCCodec = new CodecRunTimeComponent();
|
||||||
|
// Sample code to localize the ApplicationBar
|
||||||
|
//BuildLocalizedApplicationBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Click_CallEncoder (object sender, RoutedEventArgs e) {
|
||||||
|
int iRetVal = 0;
|
||||||
|
float fFPS = 0.0F;
|
||||||
|
double dEncoderTime = 0.0;
|
||||||
|
int iEncodedFrame = 0;
|
||||||
|
string sEncoderInfo = "Encoder performance: \n";
|
||||||
|
|
||||||
|
iRetVal = vRTCCodec.Encode();
|
||||||
|
|
||||||
|
if (0 == iRetVal) {
|
||||||
|
fFPS = vRTCCodec.GetEncFPS();
|
||||||
|
dEncoderTime = vRTCCodec.GetEncTime();
|
||||||
|
iEncodedFrame = vRTCCodec.GetEncodedFrameNum();
|
||||||
|
sEncoderInfo += "FPS : " + fFPS.ToString() + "\n";
|
||||||
|
sEncoderInfo += "EncTime(sec): " + dEncoderTime.ToString() + "\n";
|
||||||
|
sEncoderInfo += "EncodedNum : " + iEncodedFrame.ToString() + "\n";
|
||||||
|
EncoderInfo.Text = sEncoderInfo;
|
||||||
|
} else {
|
||||||
|
EncoderInfo.Text = "ebcoded failed!...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Click__CallDecoder (object sender, RoutedEventArgs e) {
|
||||||
|
int iRetVal = 0;
|
||||||
|
float fFPS = 0.0F;
|
||||||
|
double dDecoderTime = 0.0;
|
||||||
|
int iDecodedFrame = 0;
|
||||||
|
string sDecoderInfo = "Decoder performance: \n";
|
||||||
|
|
||||||
|
iRetVal = vRTCCodec.Decode();
|
||||||
|
|
||||||
|
if (0 == iRetVal) {
|
||||||
|
fFPS = vRTCCodec.GetDecFPS();
|
||||||
|
dDecoderTime = vRTCCodec.GetDecTime();
|
||||||
|
iDecodedFrame = vRTCCodec.GetDecodedFrameNum();
|
||||||
|
sDecoderInfo += "FPS : " + fFPS.ToString() + "\n";
|
||||||
|
sDecoderInfo += "DecTime(sec): " + dDecoderTime.ToString() + "\n";
|
||||||
|
sDecoderInfo += "DecodedNum : " + iDecodedFrame.ToString() + "\n";
|
||||||
|
DecoderInfo.Text = sDecoderInfo;
|
||||||
|
} else {
|
||||||
|
DecoderInfo.Text = "decoded failed!...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sample code for building a localized ApplicationBar
|
||||||
|
//private void BuildLocalizedApplicationBar()
|
||||||
|
//{
|
||||||
|
// // Set the page's ApplicationBar to a new instance of ApplicationBar.
|
||||||
|
// ApplicationBar = new ApplicationBar();
|
||||||
|
|
||||||
|
// // Create a new button and set the text value to the localized string from AppResources.
|
||||||
|
// ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
|
||||||
|
// appBarButton.Text = AppResources.AppBarButtonText;
|
||||||
|
// ApplicationBar.Buttons.Add(appBarButton);
|
||||||
|
|
||||||
|
// // Create a new menu item with the localized string from AppResources.
|
||||||
|
// ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
|
||||||
|
// ApplicationBar.MenuItems.Add(appBarMenuItem);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
58
codec/build/windowsphone/all/CodecApp/Package.appxmanifest
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
|
||||||
|
|
||||||
|
<Identity Name="f99aa5a5-a6ee-47ec-a093-390b78afba3c"
|
||||||
|
Publisher="CN=Openh264"
|
||||||
|
Version="1.0.0.0" />
|
||||||
|
|
||||||
|
<mp:PhoneIdentity PhoneProductId="5424cf29-908e-417e-93f3-f1cd81e5372c" PhonePublisherId="cb9bed24-05fd-451a-8736-6dad92946a6e"/>
|
||||||
|
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>CodecApp</DisplayName>
|
||||||
|
<PublisherDisplayName>Openh264</PublisherDisplayName>
|
||||||
|
<Logo>Assets\StoreLogo.png</Logo>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Prerequisites>
|
||||||
|
<OSMinVersion>6.3.1</OSMinVersion>
|
||||||
|
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
|
||||||
|
</Prerequisites>
|
||||||
|
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate"/>
|
||||||
|
</Resources>
|
||||||
|
|
||||||
|
<Applications>
|
||||||
|
<Application Id="x5424cf29y908ey417ey93f3yf1cd81e5372cx"
|
||||||
|
Executable="AGHost.exe"
|
||||||
|
EntryPoint="MainPage.xaml">
|
||||||
|
<m3:VisualElements
|
||||||
|
DisplayName="CodecApp"
|
||||||
|
Square150x150Logo="Assets\SquareTile150x150.png"
|
||||||
|
Square44x44Logo="Assets\Logo.png"
|
||||||
|
Description="CodecApp"
|
||||||
|
ForegroundText="light"
|
||||||
|
BackgroundColor="#464646">
|
||||||
|
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png"/>
|
||||||
|
<m3:SplashScreen Image="Assets\Splashscreen.png" />
|
||||||
|
</m3:VisualElements>
|
||||||
|
<Extensions>
|
||||||
|
<Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask">
|
||||||
|
<BackgroundTasks>
|
||||||
|
<Task Type="systemEvent" />
|
||||||
|
</BackgroundTasks>
|
||||||
|
</Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
<Capabilities>
|
||||||
|
</Capabilities>
|
||||||
|
<Extensions>
|
||||||
|
<Extension Category="windows.activatableClass.inProcessServer">
|
||||||
|
<InProcessServer>
|
||||||
|
<Path>AgHostSvcs.dll</Path>
|
||||||
|
<ActivatableClass ActivatableClassId="AgHost.BackgroundTask" ThreadingModel="both" />
|
||||||
|
</InProcessServer>
|
||||||
|
</Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Package>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
>
|
||||||
|
<Deployment.Parts>
|
||||||
|
</Deployment.Parts>
|
||||||
|
</Deployment>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle ("CodecApp")]
|
||||||
|
[assembly: AssemblyDescription ("")]
|
||||||
|
[assembly: AssemblyConfiguration ("")]
|
||||||
|
[assembly: AssemblyCompany ("")]
|
||||||
|
[assembly: AssemblyProduct ("CodecApp")]
|
||||||
|
[assembly: AssemblyCopyright ("Copyright © 2015")]
|
||||||
|
[assembly: AssemblyTrademark ("")]
|
||||||
|
[assembly: AssemblyCulture ("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible (false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid ("2bac46db-63e8-4c33-9be3-8e6b4638045c")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
[assembly: AssemblyVersion ("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion ("1.0.0.0")]
|
||||||
|
[assembly: NeutralResourcesLanguageAttribute ("en-US")]
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2014/deployment" AppPlatformVersion="8.1">
|
||||||
|
<DefaultLanguage xmlns="" code="en-US" />
|
||||||
|
<App xmlns="" ProductID="{5424cf29-908e-417e-93f3-f1cd81e5372c}" Title="CodecApp" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="CodecApp author" Description="Sample description" Publisher="CodecApp" PublisherID="{cb9bed24-05fd-451a-8736-6dad92946a6e}">
|
||||||
|
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
|
||||||
|
<Capabilities>
|
||||||
|
<Capability Name="ID_CAP_NETWORKING" />
|
||||||
|
<Capability Name="ID_CAP_MEDIALIB_AUDIO" />
|
||||||
|
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
|
||||||
|
<Capability Name="ID_CAP_SENSORS" />
|
||||||
|
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
|
||||||
|
</Capabilities>
|
||||||
|
<Tasks>
|
||||||
|
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
|
||||||
|
</Tasks>
|
||||||
|
<Tokens>
|
||||||
|
<PrimaryToken TokenID="CodecAppToken" TaskName="_default">
|
||||||
|
<TemplateFlip>
|
||||||
|
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
|
||||||
|
<Count>0</Count>
|
||||||
|
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
|
||||||
|
<Title>CodecApp</Title>
|
||||||
|
<BackContent></BackContent>
|
||||||
|
<BackBackgroundImageURI></BackBackgroundImageURI>
|
||||||
|
<BackTitle></BackTitle>
|
||||||
|
<DeviceLockImageURI></DeviceLockImageURI>
|
||||||
|
<HasLarge></HasLarge>
|
||||||
|
</TemplateFlip>
|
||||||
|
</PrimaryToken>
|
||||||
|
</Tokens>
|
||||||
|
<ScreenResolutions>
|
||||||
|
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
|
||||||
|
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
|
||||||
|
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
|
||||||
|
</ScreenResolutions>
|
||||||
|
</App>
|
||||||
|
</Deployment>
|
||||||
110
codec/build/windowsphone/all/CodecApp/Resources/AppResources.Designer.cs
generated
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.34014
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace CodecApp.Resources {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute ("System.Resources.Tools.StronglyTypedResourceBuilder",
|
||||||
|
"4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
public class AppResources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute ("Microsoft.Performance",
|
||||||
|
"CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal AppResources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals (resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new
|
||||||
|
global::System.Resources.ResourceManager ("CodecApp.Resources.AppResources", typeof (AppResources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
public static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
} set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to add.
|
||||||
|
/// </summary>
|
||||||
|
public static string AppBarButtonText {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString ("AppBarButtonText", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Menu Item.
|
||||||
|
/// </summary>
|
||||||
|
public static string AppBarMenuItemText {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString ("AppBarMenuItemText", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to MY APPLICATION.
|
||||||
|
/// </summary>
|
||||||
|
public static string ApplicationTitle {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString ("ApplicationTitle", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to LeftToRight.
|
||||||
|
/// </summary>
|
||||||
|
public static string ResourceFlowDirection {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString ("ResourceFlowDirection", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to en-US.
|
||||||
|
/// </summary>
|
||||||
|
public static string ResourceLanguage {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString ("ResourceLanguage", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ResourceFlowDirection" xml:space="preserve">
|
||||||
|
<value>LeftToRight</value>
|
||||||
|
<comment>Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ResourceLanguage" xml:space="preserve">
|
||||||
|
<value>en-US</value>
|
||||||
|
<comment>Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ApplicationTitle" xml:space="preserve">
|
||||||
|
<value>MY APPLICATION</value>
|
||||||
|
</data>
|
||||||
|
<data name="AppBarButtonText" xml:space="preserve">
|
||||||
|
<value>add</value>
|
||||||
|
</data>
|
||||||
|
<data name="AppBarMenuItemText" xml:space="preserve">
|
||||||
|
<value>Menu Item</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
39
codec/build/windowsphone/all/CodecApp/layer2.cfg
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Layer Configuration File
|
||||||
|
|
||||||
|
|
||||||
|
#============================== INPUT / OUTPUT ==============================
|
||||||
|
FrameWidth 160 # Input frame width
|
||||||
|
FrameHeight 96 # Input frame height
|
||||||
|
FrameRateOut 12 # Output frame rate [Hz]
|
||||||
|
ReconFile rec_layer2.yuv # Reconstructed file
|
||||||
|
|
||||||
|
#============================== CODING ==============================
|
||||||
|
ProfileIdc 66 # value of profile_idc (or 0 for auto detection)
|
||||||
|
|
||||||
|
InitialQP 24 # Quantization parameters for base quality layer
|
||||||
|
#================================ RATE CONTROL ===============================
|
||||||
|
SpatialBitrate 600 # Unit: kbps, controled by DisableRC also
|
||||||
|
MaxSpatialBitrate 800 # Unit: kbps, max bitrate for current layer
|
||||||
|
#============================== MultiSlice Slice Argument ==============================
|
||||||
|
# for S/M Slice(s) mode settings
|
||||||
|
SliceMode 0 # 0: sigle slice mode; >0: multiple slices mode, see below;
|
||||||
|
SliceSize 1500
|
||||||
|
SliceNum 1 # multiple slices number specified
|
||||||
|
|
||||||
|
SlicesAssign0 960 # count number of MBs in slice #0
|
||||||
|
SlicesAssign1 0 # count number of MBs in slice #1
|
||||||
|
SlicesAssign2 0 # count number of MBs in slice #2
|
||||||
|
SlicesAssign3 0 # count number of MBs in slice #3 -- seting here is for better testing
|
||||||
|
SlicesAssign4 0 # count number of MBs in slice #4
|
||||||
|
SlicesAssign5 0 # count number of MBs in slice #5
|
||||||
|
SlicesAssign6 0 # count number of MBs in slice #6
|
||||||
|
SlicesAssign7 0 # count number of MBs in slice #7
|
||||||
|
|
||||||
|
### DESIGN OF SLICE MODE ####
|
||||||
|
# 0 SM_SINGLE_SLICE | SliceNum==1
|
||||||
|
# 1 SM_FIXEDSLCNUM_SLICE | according to SliceNum | Enabled dynamic slicing for multi-thread
|
||||||
|
# 2 SM_RASTER_SLICE | according to SlicesAssign | Need input of MB numbers each slice. In addition, if other constraint in slice_argument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
|
||||||
|
# 3 SM_ROWMB_SLICE | according to PictureMBHeight | Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
|
||||||
|
# 4 SM_DYN_SLICE | according to SliceSize | Dynamic slicing (have no idea about slice_nums until encoding current frame)
|
||||||
|
# 5 SM_AUTO_SLICE | according to thread number | the number of slices is decided by the number of threads,SliceNum is ignored
|
||||||
|
|
||||||
62
codec/build/windowsphone/all/CodecApp/welsenc.cfg
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# Cisco Scalable H.264/AVC Extension Encoder Configuration File
|
||||||
|
|
||||||
|
#============================== GENERAL ==============================
|
||||||
|
UsageType 0 #0: camera video 1:screen content
|
||||||
|
SourceWidth 160 #input video width
|
||||||
|
SourceHeight 96 #input video height
|
||||||
|
InputFile CiscoVT2people_160x96_6fps.yuv # Input file
|
||||||
|
OutputFile test.264 # Bitstream file
|
||||||
|
MaxFrameRate 30 # Maximum frame rate [Hz]
|
||||||
|
FramesToBeEncoded - 1 # Number of frames (at input frame rate)
|
||||||
|
|
||||||
|
TemporalLayerNum 2 # temporal layer number(1--4)
|
||||||
|
IntraPeriod 0 # Intra Period ( multipler of GoP size or -1)
|
||||||
|
EnableSpsPpsIDAddition 1
|
||||||
|
|
||||||
|
EnableFrameCropping 1 # enable frame cropping flag
|
||||||
|
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
|
||||||
|
MaxNalSize 0 # Unit:Byte, Maximum Nal size
|
||||||
|
#============================== LOOP FILTER ==============================
|
||||||
|
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
|
||||||
|
# 2: on except for slice boundaries,
|
||||||
|
# 3: two stage. slice boundries on in second stage
|
||||||
|
# 4: Luma on but Chroma off (w.r.t. idc=0)
|
||||||
|
# 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
|
||||||
|
# 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
|
||||||
|
LoopFilterAlphaC0Offset 0 # AlphaOffset(-6..+6): valid range
|
||||||
|
LoopFilterBetaOffset 0 # BetaOffset (-6..+6): valid range
|
||||||
|
#============================== SOFTWARE IMPLEMENTATION ==============================
|
||||||
|
MultipleThreadIdc 1
|
||||||
|
# 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
|
||||||
|
|
||||||
|
#============================== RATE CONTROL ==============================
|
||||||
|
RCMode 0
|
||||||
|
# 0: quality mode; 1: bitrate mode; # 2: buffer based mode,can't control bitrate; -1: rc off mode;
|
||||||
|
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
|
||||||
|
MaxOverallBitrate 6000 # Unit: kbps, max bitrate overall
|
||||||
|
EnableFrameSkip 1 #Enable Frame Skip
|
||||||
|
|
||||||
|
#============================== DENOISE CONTROL ==============================
|
||||||
|
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
|
||||||
|
|
||||||
|
#============================== SCENE CHANGE DETECTION CONTROL =======================
|
||||||
|
EnableSceneChangeDetection 1 # Enable Scene Change Detection (1: enable, 0: disable)
|
||||||
|
|
||||||
|
#============================== BACKGROUND DETECTION CONTROL ==============================
|
||||||
|
EnableBackgroundDetection 1 # BGD control(1: enable, 0: disable)
|
||||||
|
|
||||||
|
#============================== ADAPTIVE QUANTIZATION CONTROL =======================
|
||||||
|
EnableAdaptiveQuantization 1 # Enable Adaptive Quantization (1: enable, 0: disable)
|
||||||
|
|
||||||
|
#============================== LONG TERM REFERENCE CONTROL ==============================
|
||||||
|
EnableLongTermReference 1 # Enable Long Term Reference (1: enable, 0: disable)
|
||||||
|
LtrMarkPeriod 30 # Long Term Reference Marking Period
|
||||||
|
|
||||||
|
#============================== LAYER DEFINITION ==============================
|
||||||
|
PrefixNALAddingCtrl 0 # Control flag of adding prefix unit (0: off, 1: on)
|
||||||
|
# It shall always be on in SVC contexts (i.e. when there are CGS/MGS/spatial enhancement layers)
|
||||||
|
# Can be disabled when no inter spatial layer prediction in case of its value as 0
|
||||||
|
NumLayers 1 # Number of layers
|
||||||
|
//LayerCfg layer0.cfg # Layer 0 configuration file
|
||||||
|
//LayerCfg layer1.cfg # Layer 1 configuration file
|
||||||
|
LayerCfg layer2.cfg # Layer 2 configuration file
|
||||||
181
codec/build/windowsphone/all/CodecRTComponent.cpp
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
// CodecRTComponent.cpp
|
||||||
|
#include <string.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include "typedefs.h"
|
||||||
|
#include "CodecRTComponent.h"
|
||||||
|
|
||||||
|
using namespace CodecRTComponent;
|
||||||
|
using namespace Platform;
|
||||||
|
using namespace Windows::Storage;
|
||||||
|
|
||||||
|
extern "C" int EncMain (int argc, char** argv);
|
||||||
|
extern int32_t DecMain (int32_t iArgC, char* pArgV[]);
|
||||||
|
//encoder info
|
||||||
|
extern float g_fFPS;
|
||||||
|
extern double g_dEncoderTime;
|
||||||
|
extern int g_iEncodedFrame;
|
||||||
|
|
||||||
|
//decoder info
|
||||||
|
extern double g_dDecTime;
|
||||||
|
extern float g_fDecFPS;
|
||||||
|
extern int g_iDecodedFrameNum;
|
||||||
|
|
||||||
|
|
||||||
|
CodecRunTimeComponent::CodecRunTimeComponent() {
|
||||||
|
}
|
||||||
|
|
||||||
|
float CodecRunTimeComponent::GetEncFPS() {
|
||||||
|
return g_fFPS;
|
||||||
|
}
|
||||||
|
double CodecRunTimeComponent::GetEncTime() {
|
||||||
|
return g_dEncoderTime;
|
||||||
|
}
|
||||||
|
int CodecRunTimeComponent::GetEncodedFrameNum() {
|
||||||
|
return g_iEncodedFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CodecRunTimeComponent::Encode() {
|
||||||
|
int iRet = 0;
|
||||||
|
int argc = 6;
|
||||||
|
char* argv[6];
|
||||||
|
int iSize = 0;
|
||||||
|
|
||||||
|
//App test data files' path
|
||||||
|
char InputPath[256] = { 0 };
|
||||||
|
char InputWelsEncCfgPath[256] = { 0 };
|
||||||
|
char InputCfgPath[256] = { 0 };
|
||||||
|
char InputYUVPath[256] = { 0 };
|
||||||
|
char OutputPath[256] = { 0 };
|
||||||
|
char Output264Path[256] = { 0 };
|
||||||
|
|
||||||
|
//App data location
|
||||||
|
Windows::Storage::StorageFolder^ InputLocation;
|
||||||
|
Platform::String^ InputLocationPath;
|
||||||
|
Windows::Storage::StorageFolder^ OutputLocation;
|
||||||
|
Platform::String^ OutputLocationPath;
|
||||||
|
|
||||||
|
//set input file path
|
||||||
|
InputLocation = Windows::ApplicationModel::Package::Current->InstalledLocation;
|
||||||
|
InputLocationPath = Platform::String::Concat (InputLocation->Path, "\\");
|
||||||
|
const wchar_t* pWcharInputFile = InputLocationPath->Data();
|
||||||
|
|
||||||
|
iSize = wcslen (pWcharInputFile);
|
||||||
|
InputPath[iSize] = 0;
|
||||||
|
for (int y = 0; y < iSize; y++) {
|
||||||
|
InputPath[y] = (char)pWcharInputFile[y];
|
||||||
|
}
|
||||||
|
|
||||||
|
//set output file path
|
||||||
|
OutputLocation = ApplicationData::Current->LocalFolder;
|
||||||
|
OutputLocationPath = Platform::String::Concat (OutputLocation->Path, "\\");
|
||||||
|
const wchar_t* pWcharOutputFile = OutputLocationPath->Data();
|
||||||
|
|
||||||
|
iSize = wcslen (pWcharOutputFile);
|
||||||
|
OutputPath[iSize] = 0;
|
||||||
|
for (int y = 0; y < iSize; y++) {
|
||||||
|
OutputPath[y] = (char)pWcharOutputFile[y];
|
||||||
|
}
|
||||||
|
|
||||||
|
//App
|
||||||
|
strcpy (InputWelsEncCfgPath, InputPath);
|
||||||
|
strcat (InputWelsEncCfgPath, "welsenc.cfg");
|
||||||
|
|
||||||
|
strcpy (InputYUVPath, InputPath);
|
||||||
|
strcat (InputYUVPath, "CiscoVT2people_160x96_6fps.yuv");
|
||||||
|
|
||||||
|
// single layer only
|
||||||
|
strcpy (InputCfgPath, InputPath);
|
||||||
|
strcat (InputCfgPath, "layer2.cfg");
|
||||||
|
// for multiple layers
|
||||||
|
/*
|
||||||
|
strcpy(InputCfg0Path, InputPath);
|
||||||
|
strcat(InputCfg0Path, "layer0.cfg");
|
||||||
|
strcpy(InputCfg1Path, InputPath);
|
||||||
|
strcat(InputCfg1Path, "layer1.cfg");
|
||||||
|
...
|
||||||
|
*/
|
||||||
|
|
||||||
|
strcpy (Output264Path, OutputPath);
|
||||||
|
strcat (Output264Path, "WP8_Test_CiscoVT2people_160x96_6fps.264");
|
||||||
|
|
||||||
|
argv[0] = (char*) ("EncoderApp");
|
||||||
|
argv[1] = InputWelsEncCfgPath;
|
||||||
|
argv[2] = (char*) ("-org");
|
||||||
|
argv[3] = InputYUVPath;
|
||||||
|
argv[4] = (char*) ("-bf");
|
||||||
|
argv[5] = Output264Path;
|
||||||
|
|
||||||
|
argc = 6;
|
||||||
|
iRet = EncMain (argc, argv);
|
||||||
|
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float CodecRunTimeComponent::GetDecFPS() {
|
||||||
|
return g_fDecFPS;
|
||||||
|
}
|
||||||
|
double CodecRunTimeComponent::GetDecTime() {
|
||||||
|
return g_dDecTime;
|
||||||
|
}
|
||||||
|
int CodecRunTimeComponent::GetDecodedFrameNum() {
|
||||||
|
return g_iDecodedFrameNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CodecRunTimeComponent::Decode() {
|
||||||
|
int iRet = 0;
|
||||||
|
int argc = 3;
|
||||||
|
char* argv[3];
|
||||||
|
int size = 0;
|
||||||
|
|
||||||
|
//App data files' path
|
||||||
|
char InputPath[256] = { 0 };
|
||||||
|
char OutputPath[256] = { 0 };
|
||||||
|
char InputBitstreamPath[256] = { 0 };
|
||||||
|
char OutputYUVPath[256] = { 0 };
|
||||||
|
|
||||||
|
//App data location
|
||||||
|
Windows::Storage::StorageFolder^ InputLocation;
|
||||||
|
Platform::String^ InputLocationPath;
|
||||||
|
|
||||||
|
Windows::Storage::StorageFolder^ OutputLocation;
|
||||||
|
Platform::String^ OutputLocationPath;
|
||||||
|
|
||||||
|
//set input file path
|
||||||
|
InputLocation = Windows::ApplicationModel::Package::Current->InstalledLocation;
|
||||||
|
InputLocationPath = Platform::String::Concat (InputLocation->Path, "\\");
|
||||||
|
const wchar_t* pWcharInputFile = InputLocationPath->Data();
|
||||||
|
|
||||||
|
size = wcslen (pWcharInputFile);
|
||||||
|
InputPath[size] = 0;
|
||||||
|
for (int y = 0; y < size; y++) {
|
||||||
|
InputPath[y] = (char)pWcharInputFile[y];
|
||||||
|
}
|
||||||
|
|
||||||
|
//set output file path
|
||||||
|
OutputLocation = ApplicationData::Current->LocalFolder;
|
||||||
|
OutputLocationPath = Platform::String::Concat (OutputLocation->Path, "\\");
|
||||||
|
const wchar_t* pWcharOutputFile = OutputLocationPath->Data();
|
||||||
|
|
||||||
|
size = wcslen (pWcharOutputFile);
|
||||||
|
OutputPath[size] = 0;
|
||||||
|
for (int y = 0; y < size; y++) {
|
||||||
|
OutputPath[y] = (char)pWcharOutputFile[y];
|
||||||
|
}
|
||||||
|
|
||||||
|
//App test setting
|
||||||
|
strcpy_s (InputBitstreamPath, InputPath);
|
||||||
|
strcat_s (InputBitstreamPath, "BA_MW_D.264");
|
||||||
|
|
||||||
|
strcpy_s (OutputYUVPath, OutputPath);
|
||||||
|
strcat_s (OutputYUVPath, "WP8_Dec_BA_MW_D.yuv");
|
||||||
|
|
||||||
|
argv[0] = (char*) ("DecoderApp");
|
||||||
|
argv[1] = InputBitstreamPath;
|
||||||
|
argv[2] = OutputYUVPath;
|
||||||
|
|
||||||
|
argc = 3;
|
||||||
|
iRet = DecMain (argc, argv);
|
||||||
|
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
22
codec/build/windowsphone/all/CodecRTComponent.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace CodecRTComponent {
|
||||||
|
// public ref class WindowsPhoneRuntimeComponent sealed
|
||||||
|
public ref class CodecRunTimeComponent sealed {
|
||||||
|
public:
|
||||||
|
CodecRunTimeComponent();
|
||||||
|
int Encode();
|
||||||
|
int Decode();
|
||||||
|
|
||||||
|
//Get encoder info
|
||||||
|
float GetEncFPS();
|
||||||
|
double GetEncTime();
|
||||||
|
int GetEncodedFrameNum();
|
||||||
|
|
||||||
|
//get decoder info
|
||||||
|
float GetDecFPS();
|
||||||
|
double GetDecTime();
|
||||||
|
int GetDecodedFrameNum();
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
154
codec/build/windowsphone/all/CodecRTComponent.vcxproj
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|ARM">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{fe5bf241-f4ea-4b94-b36a-23511e5908ec}</ProjectGuid>
|
||||||
|
<RootNamespace>CodecRTComponent</RootNamespace>
|
||||||
|
<DefaultLanguage>en-US</DefaultLanguage>
|
||||||
|
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
|
||||||
|
<WinMDAssembly>true</WinMDAssembly>
|
||||||
|
<ApplicationType>Windows Phone Silverlight</ApplicationType>
|
||||||
|
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<PlatformToolset>v120</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="PropertySheets">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<GenerateManifest>false</GenerateManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||||
|
<OutDir>..\..\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||||
|
<OutDir>..\..\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||||
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||||
|
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||||
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||||
|
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_WINRT_DLL;WINDOWS_PHONE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||||
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\console\common\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\console\enc\inc;..\..\..\encoder\core\inc;..\..\..\processing\interface</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||||
|
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>openh264.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||||
|
<ClCompile>
|
||||||
|
<PreprocessorDefinitions>_WINRT_DLL;WINDOWS_PHONE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
|
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||||
|
<CompileAsWinRT>true</CompileAsWinRT>
|
||||||
|
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\console\common\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\console\enc\inc;..\..\..\encoder\core\inc;..\..\..\processing\interface</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||||
|
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
|
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
||||||
|
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>openh264.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="platform.winmd">
|
||||||
|
<IsWinMDFile>true</IsWinMDFile>
|
||||||
|
<Private>false</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\..\console\common\inc\read_config.h" />
|
||||||
|
<ClInclude Include="CodecRTComponent.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\..\..\console\common\src\read_config.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp" />
|
||||||
|
<ClCompile Include="CodecRTComponent.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Encoder">
|
||||||
|
<UniqueIdentifier>{c79b8670-dc32-4fcc-9e17-780c1ba6e72e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Decoder">
|
||||||
|
<UniqueIdentifier>{798a0155-92f2-4321-9d5f-47ddb62db8c7}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="CodecRTComponent.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp">
|
||||||
|
<Filter>Encoder</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\console\common\src\read_config.cpp" />
|
||||||
|
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp">
|
||||||
|
<Filter>Decoder</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp">
|
||||||
|
<Filter>Decoder</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="CodecRTComponent.h" />
|
||||||
|
<ClInclude Include="..\..\..\console\common\inc\read_config.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
.macro WELS_ASM_FUNC_BEGIN
|
.macro WELS_ASM_FUNC_BEGIN
|
||||||
.align 2
|
.align 2
|
||||||
.arm
|
.arm
|
||||||
|
|||||||
@@ -31,46 +31,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
.macro LOAD_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
vld1.64 {$0}, [$4,:128], $5
|
|
||||||
vld1.64 {$1}, [$4,:128], $5
|
|
||||||
vld1.64 {$2}, [$4,:128], $5
|
|
||||||
vld1.64 {$3}, [$4,:128], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
vst1.64 {$0}, [$4,:128], $5
|
|
||||||
vst1.64 {$1}, [$4,:128], $5
|
|
||||||
vst1.64 {$2}, [$4,:128], $5
|
|
||||||
vst1.64 {$3}, [$4,:128], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
vld1.64 {$0}, [$4], $5
|
|
||||||
vld1.64 {$1}, [$4], $5
|
|
||||||
vld1.64 {$2}, [$4], $5
|
|
||||||
vld1.64 {$3}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
vst1.64 {$0}, [$4], $5
|
|
||||||
vst1.64 {$1}, [$4], $5
|
|
||||||
vst1.64 {$2}, [$4], $5
|
|
||||||
vst1.64 {$3}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
#else
|
|
||||||
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
|
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
|
||||||
// { // input: \arg0~\arg3, src*, src_stride
|
// { // input: \arg0~\arg3, src*, src_stride
|
||||||
vld1.64 {\arg0}, [\arg4,:128], \arg5
|
vld1.64 {\arg0}, [\arg4,:128], \arg5
|
||||||
@@ -107,8 +69,6 @@
|
|||||||
// }
|
// }
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN WelsCopy8x8_neon
|
WELS_ASM_FUNC_BEGIN WelsCopy8x8_neon
|
||||||
|
|
||||||
|
|||||||
@@ -31,129 +31,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
.macro JMP_IF_128BITS_IS_ZERO
|
|
||||||
vorr.s16 $2, $0, $1
|
|
||||||
vmov r3, r2, $2
|
|
||||||
orr r3, r3, r2
|
|
||||||
cmp r3, #0
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro MASK_MATRIX
|
|
||||||
vabd.u8 $6, $1, $2
|
|
||||||
vcgt.u8 $6, $4, $6
|
|
||||||
|
|
||||||
vabd.u8 $4, $0, $1
|
|
||||||
vclt.u8 $4, $4, $5
|
|
||||||
vand.u8 $6, $6, $4
|
|
||||||
|
|
||||||
vabd.u8 $4, $3, $2
|
|
||||||
vclt.u8 $4, $4, $5
|
|
||||||
vand.u8 $6, $6, $4
|
|
||||||
.endm
|
|
||||||
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_LT4_P1_Q1
|
|
||||||
vmov.i8 $9, #128
|
|
||||||
vrhadd.u8 $8, $2, $3
|
|
||||||
vhadd.u8 $8, $0, $8
|
|
||||||
vsub.s8 $8, $8, $9
|
|
||||||
vsub.s8 $9, $1, $9
|
|
||||||
vqsub.s8 $8, $8, $9
|
|
||||||
vmax.s8 $8, $8, $5
|
|
||||||
vmin.s8 $8, $8, $6
|
|
||||||
vabd.u8 $9, $0, $2
|
|
||||||
vclt.u8 $9, $9, $4
|
|
||||||
vand.s8 $8, $8, $9
|
|
||||||
vand.s8 $8, $8, $7
|
|
||||||
vadd.u8 $8, $1, $8
|
|
||||||
vabs.s8 $9, $9
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_LT4_P0_Q0
|
|
||||||
vsubl.u8 $5, $0, $3
|
|
||||||
vsubl.u8 $6, $2, $1
|
|
||||||
vshl.s16 $6, $6, #2
|
|
||||||
vadd.s16 $5, $5, $6
|
|
||||||
vqrshrn.s16 $4, $5, #3
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_P2P1P0
|
|
||||||
vaddl.u8 q4, $1, $2
|
|
||||||
vaddl.u8 q5, $3, $4
|
|
||||||
vadd.u16 q5, q4, q5
|
|
||||||
|
|
||||||
vaddl.u8 q4, $0, $1
|
|
||||||
vshl.u16 q4, q4, #1
|
|
||||||
vadd.u16 q4, q5, q4
|
|
||||||
|
|
||||||
vrshrn.u16 $0, q5, #2
|
|
||||||
vrshrn.u16 $7, q4, #3
|
|
||||||
|
|
||||||
vshl.u16 q5, q5, #1
|
|
||||||
vsubl.u8 q4, $5, $1
|
|
||||||
vadd.u16 q5, q4,q5
|
|
||||||
|
|
||||||
vaddl.u8 q4, $2, $5
|
|
||||||
vaddw.u8 q4, q4, $2
|
|
||||||
vaddw.u8 q4, q4, $3
|
|
||||||
|
|
||||||
vrshrn.u16 d10,q5, #3
|
|
||||||
vrshrn.u16 d8, q4, #2
|
|
||||||
vbsl.u8 $6, d10, d8
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_MASK
|
|
||||||
vmov $3, $2
|
|
||||||
vbsl.u8 $3, $0, $1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_CHROMA_EQ4_P0Q0
|
|
||||||
vaddl.u8 $4, $0, $3
|
|
||||||
vaddw.u8 $5, $4, $1
|
|
||||||
vaddw.u8 $6, $4, $2
|
|
||||||
vaddw.u8 $5, $5, $0
|
|
||||||
|
|
||||||
vaddw.u8 $6, $6, $3
|
|
||||||
vrshrn.u16 $7, $5, #2
|
|
||||||
vrshrn.u16 $8, $6, #2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_CHROMA_DATA_4
|
|
||||||
vld4.u8 {$0[$8],$1[$8],$2[$8],$3[$8]}, [r0], r2
|
|
||||||
vld4.u8 {$4[$8],$5[$8],$6[$8],$7[$8]}, [r1], r2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_CHROMA_DATA_4
|
|
||||||
vst4.u8 {$0[$8],$1[$8],$2[$8],$3[$8]}, [r0], r2
|
|
||||||
vst4.u8 {$4[$8],$5[$8],$6[$8],$7[$8]}, [r1], r2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_LUMA_DATA_3
|
|
||||||
vld3.u8 {$0[$6],$1[$6],$2[$6]}, [r2], r1
|
|
||||||
vld3.u8 {$3[$6],$4[$6],$5[$6]}, [r0], r1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_LUMA_DATA_4
|
|
||||||
vst4.u8 {$0[$4],$1[$4],$2[$4],$3[$4]}, [r0], r1
|
|
||||||
vst4.u8 {$0[$5],$1[$5],$2[$5],$3[$5]}, [r2], r1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_LUMA_DATA_3
|
|
||||||
vst3.u8 {$0[$6],$1[$6],$2[$6]}, [r3], r1
|
|
||||||
vst3.u8 {$3[$6],$4[$6],$5[$6]}, [r0], r1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro EXTRACT_DELTA_INTO_TWO_PART
|
|
||||||
vcge.s8 $1, $0, #0
|
|
||||||
vand $1, $0, $1
|
|
||||||
vsub.s8 $0, $1, $0
|
|
||||||
.endm
|
|
||||||
#else
|
|
||||||
.macro JMP_IF_128BITS_IS_ZERO arg0, arg1, arg2
|
.macro JMP_IF_128BITS_IS_ZERO arg0, arg1, arg2
|
||||||
vorr.s16 \arg2, \arg0, \arg1
|
vorr.s16 \arg2, \arg0, \arg1
|
||||||
vmov r3, r2, \arg2
|
vmov r3, r2, \arg2
|
||||||
@@ -270,7 +150,6 @@
|
|||||||
vand \arg1, \arg0, \arg1
|
vand \arg1, \arg0, \arg1
|
||||||
vsub.s8 \arg0, \arg1, \arg0
|
vsub.s8 \arg0, \arg1, \arg0
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN DeblockLumaLt4V_neon
|
WELS_ASM_FUNC_BEGIN DeblockLumaLt4V_neon
|
||||||
vpush {q4-q7}
|
vpush {q4-q7}
|
||||||
@@ -842,100 +721,6 @@ WELS_ASM_FUNC_BEGIN WelsNonZeroCount_neon
|
|||||||
vst1.64 {d0,d1,d2}, [r0]
|
vst1.64 {d0,d1,d2}, [r0]
|
||||||
WELS_ASM_FUNC_END
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
.macro BS_NZC_CHECK
|
|
||||||
vld1.8 {d0,d1}, [$0]
|
|
||||||
/* Arrenge the input data --- TOP */
|
|
||||||
ands r6, $1, #2
|
|
||||||
beq bs_nzc_check_jump0
|
|
||||||
|
|
||||||
sub r6, $0, $2, lsl #4
|
|
||||||
sub r6, r6, $2, lsl #3
|
|
||||||
add r6, #12
|
|
||||||
vld1.32 d3[1], [r6]
|
|
||||||
|
|
||||||
bs_nzc_check_jump0:
|
|
||||||
vext.8 q1, q1, q0, #12
|
|
||||||
vadd.u8 $3, q0, q1
|
|
||||||
|
|
||||||
|
|
||||||
/* Arrenge the input data --- LEFT */
|
|
||||||
ands r6, $1, #1
|
|
||||||
beq bs_nzc_check_jump1
|
|
||||||
|
|
||||||
sub r6, $0, #21
|
|
||||||
add r7, r6, #4
|
|
||||||
vld1.8 d3[4], [r6]
|
|
||||||
add r6, r7, #4
|
|
||||||
vld1.8 d3[5], [r7]
|
|
||||||
add r7, r6, #4
|
|
||||||
vld1.8 d3[6], [r6]
|
|
||||||
vld1.8 d3[7], [r7]
|
|
||||||
|
|
||||||
bs_nzc_check_jump1:
|
|
||||||
vzip.8 d0, d1
|
|
||||||
vzip.8 d0, d1
|
|
||||||
vext.8 q1, q1, q0, #12
|
|
||||||
vadd.u8 $4, q0, q1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro BS_COMPARE_MV //in: $0,$1(const),$2(const),$3(const),$4(const); out:$5, $6
|
|
||||||
mov r6, #4
|
|
||||||
vabd.s16 q8, $0, $1
|
|
||||||
vabd.s16 q9, $1, $2
|
|
||||||
vdup.s16 $0, r6
|
|
||||||
vabd.s16 q10, $2, $3
|
|
||||||
vabd.s16 q11, $3, $4
|
|
||||||
|
|
||||||
vcge.s16 q8, $0
|
|
||||||
vcge.s16 q9, $0
|
|
||||||
vcge.s16 q10, $0
|
|
||||||
vcge.s16 q11, $0
|
|
||||||
|
|
||||||
vpadd.i16 d16, d16, d17
|
|
||||||
vpadd.i16 d17, d18, d19
|
|
||||||
vpadd.i16 d18, d20, d21
|
|
||||||
vpadd.i16 d19, d22, d23
|
|
||||||
|
|
||||||
vaddhn.i16 $5, q8, q8
|
|
||||||
vaddhn.i16 $6, q9, q9
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro BS_MV_CHECK
|
|
||||||
vldm $0, {q0,q1,q2,q3}
|
|
||||||
|
|
||||||
/* Arrenge the input data --- TOP */
|
|
||||||
ands r6, $1, #2
|
|
||||||
beq bs_mv_check_jump0
|
|
||||||
|
|
||||||
sub r6, $0, $2, lsl #6
|
|
||||||
add r6, #48
|
|
||||||
vld1.8 {d8, d9}, [r6]
|
|
||||||
|
|
||||||
bs_mv_check_jump0:
|
|
||||||
BS_COMPARE_MV q4, q0, q1, q2, q3, $3, $4
|
|
||||||
|
|
||||||
/* Arrenge the input data --- LEFT */
|
|
||||||
ands r6, $1, #1
|
|
||||||
beq bs_mv_check_jump1
|
|
||||||
|
|
||||||
sub r6, $0, #52
|
|
||||||
add r7, r6, #16
|
|
||||||
vld1.32 d8[0], [r6]
|
|
||||||
add r6, r7, #16
|
|
||||||
vld1.32 d8[1], [r7]
|
|
||||||
add r7, r6, #16
|
|
||||||
vld1.32 d9[0], [r6]
|
|
||||||
vld1.32 d9[1], [r7]
|
|
||||||
|
|
||||||
bs_mv_check_jump1:
|
|
||||||
vzip.32 q0, q2
|
|
||||||
vzip.32 q1, q3
|
|
||||||
vzip.32 q0, q1
|
|
||||||
vzip.32 q2, q3
|
|
||||||
BS_COMPARE_MV q4, q0, q1, q2, q3, $5, $6
|
|
||||||
.endm
|
|
||||||
#else
|
|
||||||
.macro BS_NZC_CHECK arg0, arg1, arg2, arg3, arg4
|
.macro BS_NZC_CHECK arg0, arg1, arg2, arg3, arg4
|
||||||
vld1.8 {d0,d1}, [\arg0]
|
vld1.8 {d0,d1}, [\arg0]
|
||||||
/* Arrenge the input data --- TOP */
|
/* Arrenge the input data --- TOP */
|
||||||
@@ -1028,7 +813,6 @@ bs_mv_check_jump1:
|
|||||||
vzip.32 q2, q3
|
vzip.32 q2, q3
|
||||||
BS_COMPARE_MV q4, q0, q1, q2, q3, \arg5, \arg6
|
BS_COMPARE_MV q4, q0, q1, q2, q3, \arg5, \arg6
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN DeblockingBSCalcEnc_neon
|
WELS_ASM_FUNC_BEGIN DeblockingBSCalcEnc_neon
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN WelsI16x16LumaPredV_neon
|
WELS_ASM_FUNC_BEGIN WelsI16x16LumaPredV_neon
|
||||||
|
|||||||
@@ -31,120 +31,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
.macro AVERAGE_TWO_8BITS
|
|
||||||
// { // input:dst_d, src_d A and B; working: q13
|
|
||||||
vaddl.u8 q13, $2, $1
|
|
||||||
vrshrn.u16 $0, q13, #1
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_6TAG_8BITS
|
|
||||||
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
|
|
||||||
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
|
|
||||||
vaddl.u8 q13, $2, $3 //src[0]+src[1]
|
|
||||||
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
|
|
||||||
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
|
|
||||||
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
|
|
||||||
vqrshrun.s16 $6, q12, #5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_SINGLE_TAG_8BITS // when width=17/9, used
|
|
||||||
// { // input: src_d{Y[0][1][2][3][4][5]X, the even of working_q2},
|
|
||||||
vrev64.8 $2, $0 // X[5][4][3][2][1][0]O
|
|
||||||
vaddl.u8 $3, $0, $2 // each 16bits, *[50][41][32][23][14][05]*
|
|
||||||
vmul.s16 $0, $2, $1 // 0+1*[50]-5*[41]+20[32]
|
|
||||||
vpadd.s16 $0, $0, $0
|
|
||||||
vpadd.s16 $0, $0, $0
|
|
||||||
vqrshrun.s16 $0, $4, #5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_6TAG_8BITS_AVERAGE_WITH_0
|
|
||||||
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
|
|
||||||
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
|
|
||||||
vaddl.u8 q13, $2, $3 //src[0]+src[1]
|
|
||||||
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
|
|
||||||
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
|
|
||||||
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
|
|
||||||
vqrshrun.s16 $6, q12, #5
|
|
||||||
vaddl.u8 q13, $2, $6
|
|
||||||
vrshrn.u16 $6, q13, #1
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_6TAG_8BITS_AVERAGE_WITH_1
|
|
||||||
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
|
|
||||||
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
|
|
||||||
vaddl.u8 q13, $2, $3 //src[0]+src[1]
|
|
||||||
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
|
|
||||||
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
|
|
||||||
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
|
|
||||||
vqrshrun.s16 $6, q12, #5
|
|
||||||
vaddl.u8 q13, $3, $6
|
|
||||||
vrshrn.u16 $6, q13, #1
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_6TAG_8BITS_TO_16BITS
|
|
||||||
// { // input:d_src[-2], d_src[-1], d_src[0], d_src[1], d_src[2], d_src[3], dst_q, multiplier a/b; working:q13
|
|
||||||
vaddl.u8 $6, $0, $5 //dst_q=src[-2]+src[3]
|
|
||||||
vaddl.u8 q13, $2, $3 //src[0]+src[1]
|
|
||||||
vmla.u16 $6, q13, $7 //dst_q += 20*(src[0]+src[1]), 2 cycles
|
|
||||||
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
|
|
||||||
vmls.s16 $6, q13, $8 //dst_q -= 5*(src[-1]+src[2]), 2 cycles
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro FILTER_3_IN_16BITS_TO_8BITS
|
|
||||||
// { // input:a, b, c, dst_d;
|
|
||||||
vsub.s16 $0, $0, $1 //a-b
|
|
||||||
vshr.s16 $0, $0, #2 //(a-b)/4
|
|
||||||
vsub.s16 $0, $0, $1 //(a-b)/4-b
|
|
||||||
vadd.s16 $0, $0, $2 //(a-b)/4-b+c
|
|
||||||
vshr.s16 $0, $0, #2 //((a-b)/4-b+c)/4
|
|
||||||
vadd.s16 $0, $0, $2 //((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16
|
|
||||||
vqrshrun.s16 $3, $0, #6 //(+32)>>6
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro UNPACK_2_16BITS_TO_ABC
|
|
||||||
// { // input:q_src[-2:5], q_src[6:13](avail 8+5)/q_src[6:**](avail 4+5), dst_a, dst_b, dst_c;
|
|
||||||
vext.16 $4, $0, $1, #2 //src[0]
|
|
||||||
vext.16 $3, $0, $1, #3 //src[1]
|
|
||||||
vadd.s16 $4, $3 //c=src[0]+src[1]
|
|
||||||
|
|
||||||
vext.16 $3, $0, $1, #1 //src[-1]
|
|
||||||
vext.16 $2, $0, $1, #4 //src[2]
|
|
||||||
vadd.s16 $3, $2 //b=src[-1]+src[2]
|
|
||||||
|
|
||||||
vext.16 $2, $0, $1, #5 //src[3]
|
|
||||||
vadd.s16 $2, $0 //a=src[-2]+src[3]
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro UNPACK_1_IN_8x16BITS_TO_8BITS
|
|
||||||
// { // each 16bits; input: d_dst, d_src[0:3] (even), d_src[4:5]+%% (odd)
|
|
||||||
vext.16 $3, $3, $3, #7 // 0x????, [0][1][2][3][4][5],
|
|
||||||
vrev64.16 $1, $1
|
|
||||||
vadd.u16 $2, $1 // C[2+3],B[1+4],A[0+5],
|
|
||||||
vshr.s64 $1, $2, #16
|
|
||||||
vshr.s64 $0, $2, #32 // Output: C $2, B $1, A $0
|
|
||||||
|
|
||||||
vsub.s16 $0, $0, $1 //a-b
|
|
||||||
vshr.s16 $0, $0, #2 //(a-b)/4
|
|
||||||
vsub.s16 $0, $0, $1 //(a-b)/4-b
|
|
||||||
vadd.s16 $0, $0, $2 //(a-b)/4-b+c
|
|
||||||
vshr.s16 $0, $0, #2 //((a-b)/4-b+c)/4
|
|
||||||
vadd.s16 $1, $0, $2 //((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16
|
|
||||||
vqrshrun.s16 $0, $3, #6 //(+32)>>6
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
#else
|
|
||||||
.macro AVERAGE_TWO_8BITS arg0, arg1, arg2
|
.macro AVERAGE_TWO_8BITS arg0, arg1, arg2
|
||||||
// { // input:dst_d, src_d A and B; working: q13
|
// { // input:dst_d, src_d A and B; working: q13
|
||||||
vaddl.u8 q13, \arg2, \arg1
|
vaddl.u8 q13, \arg2, \arg1
|
||||||
@@ -163,7 +51,7 @@
|
|||||||
// }
|
// }
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro FILTER_SINGLE_TAG_8BITS arg0, arg1,arg2, arg3, arg4,arg5 // when width=17/9, used
|
.macro FILTER_SINGLE_TAG_8BITS arg0, arg1,arg2, arg3, arg4 // when width=17/9, used
|
||||||
// { // input: src_d{Y[0][1][2][3][4][5]X, the even of working_q2}
|
// { // input: src_d{Y[0][1][2][3][4][5]X, the even of working_q2}
|
||||||
vrev64.8 \arg2, \arg0 // X[5][4][3][2][1][0]O
|
vrev64.8 \arg2, \arg0 // X[5][4][3][2][1][0]O
|
||||||
vaddl.u8 \arg3, \arg0, \arg2 // each 16bits, *[50][41][32][23][14][05]*
|
vaddl.u8 \arg3, \arg0, \arg2 // each 16bits, *[50][41][32][23][14][05]*
|
||||||
@@ -254,7 +142,6 @@
|
|||||||
vqrshrun.s16 \arg0, \arg3, #6 //(+32)>>6
|
vqrshrun.s16 \arg0, \arg3, #6 //(+32)>>6
|
||||||
// }
|
// }
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN McHorVer20WidthEq16_neon
|
WELS_ASM_FUNC_BEGIN McHorVer20WidthEq16_neon
|
||||||
push {r4}
|
push {r4}
|
||||||
@@ -1748,6 +1635,36 @@ w9_h_mc_luma_loop:
|
|||||||
WELS_ASM_FUNC_END
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
|
WELS_ASM_FUNC_BEGIN McHorVer20Width5_neon
|
||||||
|
push {r4}
|
||||||
|
sub r3, #4
|
||||||
|
sub r0, #2
|
||||||
|
ldr r4, [sp, #4]
|
||||||
|
vmov.u16 q14, #0x0014 // 20
|
||||||
|
vshr.u16 q15, q14, #2 // 5
|
||||||
|
|
||||||
|
w5_h_mc_luma_loop:
|
||||||
|
vld1.u8 {d0,d1}, [r0], r1 //only use 10(5+5); q0=src[-2]
|
||||||
|
pld [r0]
|
||||||
|
|
||||||
|
vext.8 d2, d0, d1, #1 //d2=src[-1]
|
||||||
|
vext.8 d3, d0, d1, #2 //d3=src[0]
|
||||||
|
vext.8 d4, d0, d1, #3 //d4=src[1]
|
||||||
|
vext.8 d5, d0, d1, #4 //d5=src[2]
|
||||||
|
vext.8 d6, d0, d1, #5 //d6=src[3]
|
||||||
|
|
||||||
|
FILTER_6TAG_8BITS d0, d2, d3, d4, d5, d6, d16, q14, q15
|
||||||
|
|
||||||
|
sub r4, #1
|
||||||
|
vst1.u32 {d16[0]}, [r2]! //write [0:3] Byte
|
||||||
|
vst1.u8 {d16[4]}, [r2], r3 //write 5th Byte
|
||||||
|
|
||||||
|
cmp r4, #0
|
||||||
|
bne w5_h_mc_luma_loop
|
||||||
|
pop {r4}
|
||||||
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN McHorVer02Height17_neon
|
WELS_ASM_FUNC_BEGIN McHorVer02Height17_neon
|
||||||
push {r4}
|
push {r4}
|
||||||
ldr r4, [sp, #4]
|
ldr r4, [sp, #4]
|
||||||
@@ -1893,6 +1810,63 @@ w9_v_mc_luma_loop:
|
|||||||
WELS_ASM_FUNC_END
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
|
WELS_ASM_FUNC_BEGIN McHorVer02Height5_neon
|
||||||
|
push {r4}
|
||||||
|
ldr r4, [sp, #4]
|
||||||
|
|
||||||
|
sub r0, r0, r1, lsl #1 //src[-2*src_stride]
|
||||||
|
pld [r0]
|
||||||
|
pld [r0, r1]
|
||||||
|
vmov.u16 q14, #0x0014 // 20
|
||||||
|
vld1.u8 {d0}, [r0], r1 //d0=src[-2]
|
||||||
|
vld1.u8 {d1}, [r0], r1 //d1=src[-1]
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
pld [r0, r1]
|
||||||
|
vshr.u16 q15, q14, #2 // 5
|
||||||
|
vld1.u8 {d2}, [r0], r1 //d2=src[0]
|
||||||
|
vld1.u8 {d3}, [r0], r1 //d3=src[1]
|
||||||
|
|
||||||
|
vld1.u8 {d4}, [r0], r1 //d4=src[2]
|
||||||
|
vld1.u8 {d5}, [r0], r1 //d5=src[3]
|
||||||
|
|
||||||
|
w5_v_mc_luma_loop:
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
FILTER_6TAG_8BITS d0, d1, d2, d3, d4, d5, d16, q14, q15
|
||||||
|
vld1.u8 {d0}, [r0], r1 //read 2nd row
|
||||||
|
vst1.u32 {d16[0]}, [r2], r3 //write 1st 4Byte
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
FILTER_6TAG_8BITS d1, d2, d3, d4, d5, d0, d16, q14, q15
|
||||||
|
vld1.u8 {d1}, [r0], r1 //read 3rd row
|
||||||
|
vst1.u32 {d16[0]}, [r2], r3 //write 2nd 4Byte
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
FILTER_6TAG_8BITS d2, d3, d4, d5, d0, d1, d16, q14, q15
|
||||||
|
vld1.u8 {d2}, [r0], r1 //read 4th row
|
||||||
|
vst1.u32 {d16[0]}, [r2], r3 //write 3rd 4Byte
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
FILTER_6TAG_8BITS d3, d4, d5, d0, d1, d2, d16, q14, q15
|
||||||
|
vld1.u8 {d3}, [r0], r1 //read 5th row
|
||||||
|
vst1.u32 {d16[0]}, [r2], r3 //write 4th 8Byte
|
||||||
|
|
||||||
|
//d4, d5, d0, d1, d2, d3 --> d0, d1, d2, d3, d4, d5
|
||||||
|
vswp q0, q2
|
||||||
|
vswp q1, q2
|
||||||
|
|
||||||
|
sub r4, #4
|
||||||
|
cmp r4, #1
|
||||||
|
bne w5_v_mc_luma_loop
|
||||||
|
|
||||||
|
FILTER_6TAG_8BITS d0, d1, d2, d3, d4, d5, d16, q14, q15
|
||||||
|
vst1.u32 {d16[0]}, [r2], r3 //write last 4Byte
|
||||||
|
|
||||||
|
pop {r4}
|
||||||
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN McHorVer22Width17_neon
|
WELS_ASM_FUNC_BEGIN McHorVer22Width17_neon
|
||||||
push {r4}
|
push {r4}
|
||||||
vpush {q4-q7}
|
vpush {q4-q7}
|
||||||
@@ -2132,6 +2106,105 @@ w9_hv_mc_luma_loop:
|
|||||||
WELS_ASM_FUNC_END
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
|
WELS_ASM_FUNC_BEGIN McHorVer22Width5_neon
|
||||||
|
push {r4}
|
||||||
|
vpush {q4}
|
||||||
|
ldr r4, [sp, #20]
|
||||||
|
|
||||||
|
sub r0, #2 //src[-2]
|
||||||
|
sub r0, r0, r1, lsl #1 //src[-2*src_stride-2]
|
||||||
|
pld [r0]
|
||||||
|
pld [r0, r1]
|
||||||
|
|
||||||
|
vmov.u16 q14, #0x0014 // 20
|
||||||
|
vld1.u8 {q0}, [r0], r1 //use 10(5+5), =src[-2]
|
||||||
|
vld1.u8 {q1}, [r0], r1 //use 10(5+5), =src[-1]
|
||||||
|
|
||||||
|
pld [r0]
|
||||||
|
pld [r0, r1]
|
||||||
|
vshr.u16 q15, q14, #2 // 5
|
||||||
|
|
||||||
|
vld1.u8 {q2}, [r0], r1 //use 10(5+5), =src[0]
|
||||||
|
vld1.u8 {q3}, [r0], r1 //use 10(5+5), =src[1]
|
||||||
|
pld [r0]
|
||||||
|
pld [r0, r1]
|
||||||
|
vld1.u8 {q4}, [r0], r1 //use 10(5+5), =src[2]
|
||||||
|
sub r3, #4
|
||||||
|
|
||||||
|
w5_hv_mc_luma_loop:
|
||||||
|
|
||||||
|
vld1.u8 {q8}, [r0], r1 //use 10(5+5), =src[3]
|
||||||
|
//the 1st row
|
||||||
|
pld [r0]
|
||||||
|
// vertical filtered into q9/q10
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d0, d2, d4, d6, d8, d16, q9, q14, q15
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d1, d3, d5, d7, d9, d17, q10, q14, q15
|
||||||
|
// horizon filtered
|
||||||
|
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
|
||||||
|
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
|
||||||
|
vst1.u32 {d18[0]}, [r2]! //write 4Byte
|
||||||
|
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
|
||||||
|
|
||||||
|
vld1.u8 {q0}, [r0], r1 //read 2nd row
|
||||||
|
//the 2nd row
|
||||||
|
pld [r0]
|
||||||
|
// vertical filtered into q9/q10
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d2, d4, d6, d8, d16, d0, q9, q14, q15
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d3, d5, d7, d9, d17, d1, q10, q14, q15
|
||||||
|
// horizon filtered
|
||||||
|
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
|
||||||
|
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
|
||||||
|
vst1.u32 {d18[0]}, [r2]! //write 4Byte
|
||||||
|
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
|
||||||
|
|
||||||
|
vld1.u8 {q1}, [r0], r1 //read 3rd row
|
||||||
|
//the 3rd row
|
||||||
|
pld [r0]
|
||||||
|
// vertical filtered into q9/q10
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d4, d6, d8, d16, d0, d2, q9, q14, q15
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d5, d7, d9, d17, d1, d3, q10, q14, q15
|
||||||
|
// horizon filtered
|
||||||
|
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
|
||||||
|
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
|
||||||
|
vst1.u32 {d18[0]}, [r2]! //write 4Byte
|
||||||
|
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
|
||||||
|
|
||||||
|
vld1.u8 {q2}, [r0], r1 //read 4th row
|
||||||
|
//the 4th row
|
||||||
|
pld [r0]
|
||||||
|
// vertical filtered into q9/q10
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d6, d8, d16, d0, d2, d4, q9, q14, q15
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d7, d9, d17, d1, d3, d5, q10, q14, q15
|
||||||
|
// horizon filtered
|
||||||
|
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
|
||||||
|
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
|
||||||
|
vst1.u32 {d18[0]}, [r2]! //write 4Byte
|
||||||
|
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
|
||||||
|
|
||||||
|
//q4~q8, q0~q2, --> q0~q4
|
||||||
|
vswp q0, q4
|
||||||
|
vswp q2, q4
|
||||||
|
vmov q3, q1
|
||||||
|
vmov q1, q8
|
||||||
|
|
||||||
|
sub r4, #4
|
||||||
|
cmp r4, #1
|
||||||
|
bne w5_hv_mc_luma_loop
|
||||||
|
//the last row
|
||||||
|
vld1.u8 {q8}, [r0], r1 //use 10(5+5), =src[3]
|
||||||
|
// vertical filtered into q9/q10
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d0, d2, d4, d6, d8, d16, q9, q14, q15
|
||||||
|
FILTER_6TAG_8BITS_TO_16BITS d1, d3, d5, d7, d9, d17, q10, q14, q15
|
||||||
|
// horizon filtered
|
||||||
|
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
|
||||||
|
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
|
||||||
|
vst1.u32 {d18[0]}, [r2]! //write 4Byte
|
||||||
|
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
|
||||||
|
vpop {q4}
|
||||||
|
pop {r4}
|
||||||
|
WELS_ASM_FUNC_END
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN PixStrideAvgWidthEq16_neon
|
WELS_ASM_FUNC_BEGIN PixStrideAvgWidthEq16_neon
|
||||||
push {r4, r5, r6}
|
push {r4, r5, r6}
|
||||||
ldr r4, [sp, #12]
|
ldr r4, [sp, #12]
|
||||||
|
|||||||
@@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
.macro WELS_ASM_AARCH64_FUNC_BEGIN
|
.macro WELS_ASM_AARCH64_FUNC_BEGIN
|
||||||
.align 2
|
.align 2
|
||||||
.globl _$0
|
.globl _$0
|
||||||
@@ -59,12 +61,4 @@ ret
|
|||||||
.endfunc
|
.endfunc
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro mov.16b arg0, arg1
|
|
||||||
mov \arg0\().16b, \arg1\().16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro mov.8b arg0, arg1
|
|
||||||
mov \arg0\().8b, \arg1\().8b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -31,83 +31,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON_AARCH64
|
#ifdef HAVE_NEON_AARCH64
|
||||||
.text
|
|
||||||
#include "arm_arch64_common_macro.S"
|
#include "arm_arch64_common_macro.S"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
.macro LOAD_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
ld1 {$0.d}[0], [$4], $5
|
|
||||||
ld1 {$1.d}[0], [$4], $5
|
|
||||||
ld1 {$2.d}[0], [$4], $5
|
|
||||||
ld1 {$3.d}[0], [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
st1 {$0.d}[0], [$4], $5
|
|
||||||
st1 {$1.d}[0], [$4], $5
|
|
||||||
st1 {$2.d}[0], [$4], $5
|
|
||||||
st1 {$3.d}[0], [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
ld1 {$0.8b}, [$4], $5
|
|
||||||
ld1 {$1.8b}, [$4], $5
|
|
||||||
ld1 {$2.8b}, [$4], $5
|
|
||||||
ld1 {$3.8b}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
st1 {$0.8b}, [$4], $5
|
|
||||||
st1 {$1.8b}, [$4], $5
|
|
||||||
st1 {$2.8b}, [$4], $5
|
|
||||||
st1 {$3.8b}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD16_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
ld1 {$0.2d}, [$4], $5
|
|
||||||
ld1 {$1.2d}, [$4], $5
|
|
||||||
ld1 {$2.2d}, [$4], $5
|
|
||||||
ld1 {$3.2d}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE16_ALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
st1 {$0.2d}, [$4], $5
|
|
||||||
st1 {$1.2d}, [$4], $5
|
|
||||||
st1 {$2.2d}, [$4], $5
|
|
||||||
st1 {$3.2d}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD16_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, src*, src_stride
|
|
||||||
ld1 {$0.16b}, [$4], $5
|
|
||||||
ld1 {$1.16b}, [$4], $5
|
|
||||||
ld1 {$2.16b}, [$4], $5
|
|
||||||
ld1 {$3.16b}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE16_UNALIGNED_DATA_WITH_STRIDE
|
|
||||||
// { // input: $0~$3, dst*, dst_stride
|
|
||||||
st1 {$0.16b}, [$4], $5
|
|
||||||
st1 {$1.16b}, [$4], $5
|
|
||||||
st1 {$2.16b}, [$4], $5
|
|
||||||
st1 {$3.16b}, [$4], $5
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
#else
|
|
||||||
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
|
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
|
||||||
// { // input: $0~$3, src*, src_stride
|
// { // input: $0~$3, src*, src_stride
|
||||||
ld1 {\arg0\().d}[0], [\arg4], \arg5
|
ld1 {\arg0\().d}[0], [\arg4], \arg5
|
||||||
@@ -180,8 +105,6 @@
|
|||||||
// }
|
// }
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy8x8_AArch64_neon
|
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy8x8_AArch64_neon
|
||||||
|
|
||||||
|
|||||||
@@ -31,268 +31,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON_AARCH64
|
#ifdef HAVE_NEON_AARCH64
|
||||||
.text
|
|
||||||
|
|
||||||
#include "arm_arch64_common_macro.S"
|
#include "arm_arch64_common_macro.S"
|
||||||
#ifdef __APPLE__
|
|
||||||
|
|
||||||
.macro MASK_MATRIX
|
|
||||||
uabd $6.16b, $1.16b, $2.16b
|
|
||||||
cmhi $6.16b, $4.16b, $6.16b
|
|
||||||
|
|
||||||
uabd $4.16b, $0.16b, $1.16b
|
|
||||||
cmhi $4.16b, $5.16b, $4.16b
|
|
||||||
and $6.16b, $6.16b, $4.16b
|
|
||||||
|
|
||||||
uabd $4.16b, $3.16b, $2.16b
|
|
||||||
cmhi $4.16b, $5.16b, $4.16b
|
|
||||||
and $6.16b, $6.16b, $4.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_LT4_P1_Q1 //(Use Tmp v23, v24)
|
|
||||||
//v0, v1, v2, v3, v17(beta), v18(-Tc0), v6(Tc0), v7(flag), v19, v20
|
|
||||||
urhadd $8.16b, $2.16b, $3.16b
|
|
||||||
uhadd $8.16b, $0.16b, $8.16b
|
|
||||||
usubl $9.8h, $8.8b, $1.8b
|
|
||||||
sqxtn $9.8b, $9.8h
|
|
||||||
usubl2 $8.8h, $8.16b, $1.16b
|
|
||||||
sqxtn2 $9.16b, $8.8h
|
|
||||||
smax $8.16b, $9.16b, $5.16b
|
|
||||||
//
|
|
||||||
smin $8.16b, $8.16b, $6.16b
|
|
||||||
uabd $9.16b, $0.16b, $2.16b
|
|
||||||
cmhi $9.16b, $4.16b, $9.16b
|
|
||||||
and $8.16b, $8.16b, $9.16b
|
|
||||||
and $8.16b, $8.16b, $7.16b
|
|
||||||
add $8.16b, $1.16b, $8.16b
|
|
||||||
abs $9.16b, $9.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_LT4_P0_Q0_1
|
|
||||||
usubl $5.8h, $0.8b, $3.8b
|
|
||||||
usubl $6.8h, $2.8b, $1.8b
|
|
||||||
shl $6.8h, $6.8h, #2
|
|
||||||
add $5.8h, $5.8h, $6.8h
|
|
||||||
sqrshrn $4.8b, $5.8h, #3
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_LT4_P0_Q0_2
|
|
||||||
usubl2 $5.8h, $0.16b, $3.16b
|
|
||||||
usubl2 $6.8h, $2.16b, $1.16b
|
|
||||||
shl $6.8h, $6.8h, #2
|
|
||||||
add $5.8h, $5.8h, $6.8h
|
|
||||||
sqrshrn2 $4.16b, $5.8h, #3
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro EXTRACT_DELTA_INTO_TWO_PART
|
|
||||||
cmge $1.16b, $0.16b, #0
|
|
||||||
and $1.16b, $0.16b, $1.16b
|
|
||||||
sub $0.16b, $1.16b, $0.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_P2P1P0_1
|
|
||||||
uaddl $8.8h, $1.8b, $2.8b
|
|
||||||
uaddl $9.8h, $3.8b, $4.8b
|
|
||||||
add $9.8h, $9.8h, $8.8h
|
|
||||||
|
|
||||||
uaddl $8.8h, $0.8b, $1.8b
|
|
||||||
shl $8.8h, $8.8h, #1
|
|
||||||
add $8.8h, $9.8h, $8.8h
|
|
||||||
|
|
||||||
rshrn $0.8b, $9.8h, #2
|
|
||||||
rshrn $7.8b, $8.8h, #3
|
|
||||||
shl $9.8h, $9.8h, #1
|
|
||||||
usubl $8.8h, $5.8b, $1.8b
|
|
||||||
add $9.8h, $8.8h, $9.8h
|
|
||||||
|
|
||||||
uaddl $8.8h, $2.8b, $5.8b
|
|
||||||
uaddw $8.8h, $8.8h, $2.8b
|
|
||||||
uaddw $8.8h, $8.8h, $3.8b
|
|
||||||
|
|
||||||
rshrn $9.8b, $9.8h, #3
|
|
||||||
rshrn $8.8b, $8.8h, #2
|
|
||||||
bsl $6.8b, $9.8b, $8.8b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_P2P1P0_2
|
|
||||||
uaddl2 $8.8h, $1.16b, $2.16b
|
|
||||||
uaddl2 $9.8h, $3.16b, $4.16b
|
|
||||||
add $9.8h, $9.8h, $8.8h
|
|
||||||
|
|
||||||
uaddl2 $8.8h, $0.16b, $1.16b
|
|
||||||
shl $8.8h, $8.8h, #1
|
|
||||||
add $8.8h, $9.8h, $8.8h
|
|
||||||
|
|
||||||
rshrn2 $0.16b, $9.8h, #2
|
|
||||||
rshrn2 $7.16b, $8.8h, #3
|
|
||||||
shl $9.8h, $9.8h, #1
|
|
||||||
usubl2 $8.8h, $5.16b, $1.16b
|
|
||||||
add $9.8h, $8.8h, $9.8h
|
|
||||||
|
|
||||||
uaddl2 $8.8h, $2.16b, $5.16b
|
|
||||||
uaddw2 $8.8h, $8.8h, $2.16b
|
|
||||||
uaddw2 $8.8h, $8.8h, $3.16b
|
|
||||||
|
|
||||||
rshrn2 $9.16b, $9.8h, #3
|
|
||||||
rshrn2 $8.16b, $8.8h, #2
|
|
||||||
bsl $6.16b, $9.16b, $8.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
|
|
||||||
.macro DIFF_CHROMA_EQ4_P0Q0_1
|
|
||||||
uaddl $4.8h, $0.8b, $3.8b
|
|
||||||
shl $4.8h, $4.8h, #1
|
|
||||||
usubl $5.8h, $1.8b, $3.8b
|
|
||||||
add $5.8h, $5.8h, $4.8h
|
|
||||||
rshrn $6.8b, $5.8h, #2
|
|
||||||
usubl $5.8h, $2.8b, $0.8b
|
|
||||||
add $5.8h, $5.8h, $4.8h
|
|
||||||
rshrn $7.8b, $5.8h, #2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_CHROMA_EQ4_P0Q0_2
|
|
||||||
uaddl2 $4.8h, $0.16b, $3.16b
|
|
||||||
shl $4.8h, $4.8h, #1
|
|
||||||
usubl2 $5.8h, $1.16b, $3.16b
|
|
||||||
add $5.8h, $5.8h, $4.8h
|
|
||||||
rshrn2 $6.16b, $5.8h, #2
|
|
||||||
usubl2 $5.8h, $2.16b, $0.16b
|
|
||||||
add $5.8h, $5.8h, $4.8h
|
|
||||||
rshrn2 $7.16b, $5.8h, #2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_MASK
|
|
||||||
mov.16b $3, $2
|
|
||||||
bsl $3.16b, $0.16b, $1.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_LUMA_DATA_3
|
|
||||||
ld3 {$0.b, $1.b, $2.b} [$6], [x2], x1
|
|
||||||
ld3 {$3.b, $4.b, $5.b} [$6], [x0], x1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_LUMA_DATA_4
|
|
||||||
ld4 {$0.b, $1.b, $2.b, $3.b} [$8], [x3], x1
|
|
||||||
ld4 {$4.b, $5.b, $6.b, $7.b} [$8], [x0], x1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_LUMA_DATA_4
|
|
||||||
st4 {$0.b, $1.b, $2.b, $3.b} [$4], [x0], x1
|
|
||||||
st4 {$0.b, $1.b, $2.b, $3.b} [$5], [x2], x1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_LUMA_DATA_3
|
|
||||||
st3 {$0.b, $1.b, $2.b} [$6], [x3], x1
|
|
||||||
st3 {$3.b, $4.b, $5.b} [$6], [x0], x1
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOAD_CHROMA_DATA_4
|
|
||||||
ld4 {$0.b, $1.b, $2.b, $3.b} [$5], [$4], x2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro STORE_CHROMA_DATA_2
|
|
||||||
st2 {$0.b, $1.b} [$3], [$2], x2
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro ZERO_JUMP_END
|
|
||||||
mov $1, $0.d[0]
|
|
||||||
mov $2, $0.d[1]
|
|
||||||
orr $1, $1, $2
|
|
||||||
cbz $1, $3
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro BS_NZC_CHECK
|
|
||||||
ld1 {v0.16b}, [$0]
|
|
||||||
//Arrange the input data --- TOP
|
|
||||||
ands x6, $1, #2
|
|
||||||
cbz x6, bs_nzc_check_jump0
|
|
||||||
sub x6, $0, $2, lsl #4
|
|
||||||
sub x6, x6, $2, lsl #3
|
|
||||||
add x6, x6, #12
|
|
||||||
ld1 {v1.s} [3], [x6]
|
|
||||||
|
|
||||||
bs_nzc_check_jump0:
|
|
||||||
ext v1.16b, v1.16b, v0.16b, #12
|
|
||||||
add $3.16b, v0.16b, v1.16b
|
|
||||||
|
|
||||||
// Arrange the input data --- LEFT
|
|
||||||
ands x6, $1, #1
|
|
||||||
cbz x6, bs_nzc_check_jump1
|
|
||||||
|
|
||||||
sub x6, $0, #21
|
|
||||||
add x7, x6, #4
|
|
||||||
ld1 {v1.b} [12], [x6]
|
|
||||||
add x6, x7, #4
|
|
||||||
ld1 {v1.b} [13], [x7]
|
|
||||||
add x7, x6, #4
|
|
||||||
ld1 {v1.b} [14], [x6]
|
|
||||||
ld1 {v1.b} [15], [x7]
|
|
||||||
|
|
||||||
bs_nzc_check_jump1:
|
|
||||||
ins v2.d[0], v0.d[1]
|
|
||||||
zip1 v0.16b, v0.16b, v2.16b
|
|
||||||
ins v2.d[0], v0.d[1]
|
|
||||||
zip1 v0.16b, v0.16b, v2.16b
|
|
||||||
ext v1.16b, v1.16b, v0.16b, #12
|
|
||||||
add $4.16b, v0.16b, v1.16b
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro BS_COMPARE_MV //in: $0,$1(const),$2(const),$3(const),$4(const); out:$5
|
|
||||||
mov w6, #4
|
|
||||||
sabd v20.8h, $0.8h, $1.8h
|
|
||||||
sabd v21.8h, $1.8h, $2.8h
|
|
||||||
dup $0.8h, w6
|
|
||||||
sabd v22.8h, $2.8h, $3.8h
|
|
||||||
sabd v23.8h, $3.8h, $4.8h
|
|
||||||
|
|
||||||
cmge v20.8h, v20.8h, $0.8h
|
|
||||||
cmge v21.8h, v21.8h, $0.8h
|
|
||||||
cmge v22.8h, v22.8h, $0.8h
|
|
||||||
cmge v23.8h, v23.8h, $0.8h
|
|
||||||
|
|
||||||
addp v20.8h, v20.8h, v21.8h
|
|
||||||
addp v21.8h, v22.8h, v23.8h
|
|
||||||
|
|
||||||
addhn $5.8b, v20.8h, v20.8h
|
|
||||||
addhn2 $5.16b, v21.8h, v21.8h
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro BS_MV_CHECK
|
|
||||||
ldp q0, q1, [$0], #32
|
|
||||||
ldp q2, q3, [$0]
|
|
||||||
sub $0, $0, #32
|
|
||||||
// Arrenge the input data --- TOP
|
|
||||||
ands x6, $1, #2
|
|
||||||
cbz x6, bs_mv_check_jump0
|
|
||||||
sub x6, $0, $2, lsl #6
|
|
||||||
add x6, x6, #48
|
|
||||||
ld1 {v4.16b}, [x6]
|
|
||||||
bs_mv_check_jump0:
|
|
||||||
BS_COMPARE_MV v4, v0, v1, v2, v3, $3
|
|
||||||
// Arrange the input data --- LEFT
|
|
||||||
ands x6, $1, #1
|
|
||||||
cbz x6, bs_mv_check_jump1
|
|
||||||
sub x6, $0, #52
|
|
||||||
add x7, x6, #16
|
|
||||||
ld1 {v4.s} [0], [x6]
|
|
||||||
add x6, x7, #16
|
|
||||||
ld1 {v4.s} [1], [x7]
|
|
||||||
add x7, x6, #16
|
|
||||||
ld1 {v4.s} [2], [x6]
|
|
||||||
ld1 {v4.s} [3], [x7]
|
|
||||||
bs_mv_check_jump1:
|
|
||||||
zip1 $5.4s, v0.4s, v2.4s
|
|
||||||
zip2 $6.4s, v0.4s, v2.4s
|
|
||||||
zip1 v0.4s, v1.4s, v3.4s
|
|
||||||
zip2 v2.4s, v1.4s, v3.4s
|
|
||||||
zip2 v1.4s, $5.4s, v0.4s
|
|
||||||
zip1 v0.4s, $5.4s, v0.4s
|
|
||||||
zip2 v3.4s, $6.4s, v2.4s
|
|
||||||
zip1 v2.4s, $6.4s, v2.4s
|
|
||||||
BS_COMPARE_MV v4, v0, v1, v2, v3, $4
|
|
||||||
.endm
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
.macro MASK_MATRIX arg0, arg1, arg2, arg3, arg4, arg5, arg6
|
.macro MASK_MATRIX arg0, arg1, arg2, arg3, arg4, arg5, arg6
|
||||||
uabd \arg6\().16b, \arg1\().16b, \arg2\().16b
|
uabd \arg6\().16b, \arg1\().16b, \arg2\().16b
|
||||||
@@ -420,7 +160,7 @@ bs_mv_check_jump1:
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro DIFF_LUMA_EQ4_MASK arg0, arg1, arg2, arg3
|
.macro DIFF_LUMA_EQ4_MASK arg0, arg1, arg2, arg3
|
||||||
mov.16b \arg3, \arg2
|
mov \arg3\().16b, \arg2\().16b
|
||||||
bsl \arg3\().16b, \arg0\().16b, \arg1\().16b
|
bsl \arg3\().16b, \arg0\().16b, \arg1\().16b
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@@ -550,7 +290,6 @@ bs_mv_check_jump1:
|
|||||||
zip1 v2.4s, \arg6\().4s, v2.4s
|
zip1 v2.4s, \arg6\().4s, v2.4s
|
||||||
BS_COMPARE_MV v4, v0, v1, v2, v3, \arg4
|
BS_COMPARE_MV v4, v0, v1, v2, v3, \arg4
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
WELS_ASM_AARCH64_FUNC_BEGIN WelsNonZeroCount_AArch64_neon
|
WELS_ASM_AARCH64_FUNC_BEGIN WelsNonZeroCount_AArch64_neon
|
||||||
mov w1, #1
|
mov w1, #1
|
||||||
@@ -652,10 +391,10 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4V_AArch64_neon
|
|||||||
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
|
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
|
||||||
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
|
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
|
||||||
|
|
||||||
mov.16b v23, v21
|
mov v23.16b, v21.16b
|
||||||
mov.16b v24, v21
|
mov v24.16b, v21.16b
|
||||||
|
|
||||||
mov.16b v25, v0
|
mov v25.16b, v0.16b
|
||||||
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
|
||||||
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
|
||||||
ins v0.d[1], v25.d[1]
|
ins v0.d[1], v25.d[1]
|
||||||
@@ -669,9 +408,9 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4V_AArch64_neon
|
|||||||
st1 {v17.16b}, [x3], x1
|
st1 {v17.16b}, [x3], x1
|
||||||
|
|
||||||
|
|
||||||
mov.16b v23, v22
|
mov v23.16b, v22.16b
|
||||||
mov.16b v24, v22
|
mov v24.16b, v22.16b
|
||||||
mov.16b v25, v7
|
mov v25.16b, v7.16b
|
||||||
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
|
||||||
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
|
||||||
ins v7.d[1], v25.d[1]
|
ins v7.d[1], v25.d[1]
|
||||||
@@ -728,7 +467,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4H_AArch64_neon //uint8_t* pPix, int32_
|
|||||||
sub v18.16b, v18.16b, v6.16b // -iTc0: 0000, 1111, 2222, 3333
|
sub v18.16b, v18.16b, v6.16b // -iTc0: 0000, 1111, 2222, 3333
|
||||||
|
|
||||||
DIFF_LUMA_LT4_P1_Q1 v0, v1, v2, v3, v17, v18, v6, v7, v19, v20 //Use Tmp v23,v24
|
DIFF_LUMA_LT4_P1_Q1 v0, v1, v2, v3, v17, v18, v6, v7, v19, v20 //Use Tmp v23,v24
|
||||||
mov.16b v25, v19
|
mov v25.16b, v19.16b
|
||||||
|
|
||||||
DIFF_LUMA_LT4_P1_Q1 v5, v4, v3, v2, v17, v18, v6, v7, v21, v22 //Use Tmp v23,v24
|
DIFF_LUMA_LT4_P1_Q1 v5, v4, v3, v2, v17, v18, v6, v7, v21, v22 //Use Tmp v23,v24
|
||||||
|
|
||||||
@@ -749,11 +488,11 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4H_AArch64_neon //uint8_t* pPix, int32_
|
|||||||
EXTRACT_DELTA_INTO_TWO_PART v19, v20
|
EXTRACT_DELTA_INTO_TWO_PART v19, v20
|
||||||
uqadd v2.16b, v2.16b, v20.16b
|
uqadd v2.16b, v2.16b, v20.16b
|
||||||
uqsub v2.16b, v2.16b, v19.16b
|
uqsub v2.16b, v2.16b, v19.16b
|
||||||
mov.16b v26, v2
|
mov v26.16b, v2.16b
|
||||||
uqsub v3.16b, v3.16b, v20.16b
|
uqsub v3.16b, v3.16b, v20.16b
|
||||||
uqadd v3.16b, v3.16b, v19.16b
|
uqadd v3.16b, v3.16b, v19.16b
|
||||||
mov.16b v27, v3
|
mov v27.16b, v3.16b
|
||||||
mov.16b v28, v21
|
mov v28.16b, v21.16b
|
||||||
|
|
||||||
sub x0, x0, #2
|
sub x0, x0, #2
|
||||||
add x2, x0, x1
|
add x2, x0, x1
|
||||||
@@ -816,37 +555,37 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4H_AArch64_neon
|
|||||||
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
|
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
|
||||||
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
|
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
|
||||||
|
|
||||||
mov.16b v23, v21
|
mov v23.16b, v21.16b
|
||||||
mov.16b v24, v21
|
mov v24.16b, v21.16b
|
||||||
|
|
||||||
mov.16b v25, v0
|
mov v25.16b, v0.16b
|
||||||
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
|
||||||
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
|
||||||
ins v0.d[1], v25.d[1]
|
ins v0.d[1], v25.d[1]
|
||||||
ins v23.d[1], v24.d[1]
|
ins v23.d[1], v24.d[1]
|
||||||
and v21.16b, v20.16b, v21.16b
|
and v21.16b, v20.16b, v21.16b
|
||||||
DIFF_LUMA_EQ4_MASK v19, v1, v21, v17
|
DIFF_LUMA_EQ4_MASK v19, v1, v21, v17
|
||||||
mov.16b v26, v17
|
mov v26.16b, v17.16b
|
||||||
DIFF_LUMA_EQ4_MASK v0, v2, v21, v17
|
DIFF_LUMA_EQ4_MASK v0, v2, v21, v17
|
||||||
mov.16b v27, v17
|
mov v27.16b, v17.16b
|
||||||
DIFF_LUMA_EQ4_MASK v23, v3, v18, v17
|
DIFF_LUMA_EQ4_MASK v23, v3, v18, v17
|
||||||
mov.16b v28, v17
|
mov v28.16b, v17.16b
|
||||||
|
|
||||||
|
|
||||||
mov.16b v23, v22
|
mov v23.16b, v22.16b
|
||||||
mov.16b v24, v22
|
mov v24.16b, v22.16b
|
||||||
mov.16b v25, v7
|
mov v25.16b, v7.16b
|
||||||
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
|
||||||
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
|
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
|
||||||
ins v7.d[1], v25.d[1]
|
ins v7.d[1], v25.d[1]
|
||||||
ins v23.d[1], v24.d[1]
|
ins v23.d[1], v24.d[1]
|
||||||
and v22.16b, v20.16b, v22.16b
|
and v22.16b, v20.16b, v22.16b
|
||||||
DIFF_LUMA_EQ4_MASK v23, v4, v18, v17
|
DIFF_LUMA_EQ4_MASK v23, v4, v18, v17
|
||||||
mov.16b v29, v17
|
mov v29.16b, v17.16b
|
||||||
DIFF_LUMA_EQ4_MASK v7, v5, v22, v17
|
DIFF_LUMA_EQ4_MASK v7, v5, v22, v17
|
||||||
mov.16b v30, v17
|
mov v30.16b, v17.16b
|
||||||
DIFF_LUMA_EQ4_MASK v19, v6, v22, v17
|
DIFF_LUMA_EQ4_MASK v19, v6, v22, v17
|
||||||
mov.16b v31, v17
|
mov v31.16b, v17.16b
|
||||||
|
|
||||||
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 0
|
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 0
|
||||||
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 1
|
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 1
|
||||||
@@ -1013,7 +752,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockChromaEq4V_AArch64_neon //uint8_t* pPixCb, ui
|
|||||||
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
|
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
|
||||||
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
|
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
|
||||||
|
|
||||||
mov.16b v6, v7
|
mov v6.16b, v7.16b
|
||||||
bsl v6.16b, v20.16b, v1.16b
|
bsl v6.16b, v20.16b, v1.16b
|
||||||
bsl v7.16b, v21.16b, v2.16b
|
bsl v7.16b, v21.16b, v2.16b
|
||||||
|
|
||||||
@@ -1059,7 +798,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockChromaEq4H_AArch64_neon //uint8_t* pPixCb, ui
|
|||||||
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
|
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
|
||||||
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
|
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
|
||||||
|
|
||||||
mov.16b v6, v7
|
mov v6.16b, v7.16b
|
||||||
bsl v6.16b, v20.16b, v1.16b
|
bsl v6.16b, v20.16b, v1.16b
|
||||||
bsl v7.16b, v21.16b, v2.16b
|
bsl v7.16b, v21.16b, v2.16b
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON_AARCH64
|
#ifdef HAVE_NEON_AARCH64
|
||||||
.text
|
|
||||||
#include "arm_arch64_common_macro.S"
|
#include "arm_arch64_common_macro.S"
|
||||||
|
|
||||||
WELS_ASM_AARCH64_FUNC_BEGIN ExpandPictureLuma_AArch64_neon
|
WELS_ASM_AARCH64_FUNC_BEGIN ExpandPictureLuma_AArch64_neon
|
||||||
@@ -46,8 +45,8 @@ _expand_picture_luma_loop2:
|
|||||||
add x6, x4, #1
|
add x6, x4, #1
|
||||||
ld1r {v0.16b}, [x7], x1
|
ld1r {v0.16b}, [x7], x1
|
||||||
ld1r {v2.16b}, [x4], x1
|
ld1r {v2.16b}, [x4], x1
|
||||||
mov.16b v1, v0
|
mov v1.16b, v0.16b
|
||||||
mov.16b v3, v2
|
mov v3.16b, v2.16b
|
||||||
st2 {v0.16b, v1.16b}, [x5]
|
st2 {v0.16b, v1.16b}, [x5]
|
||||||
st2 {v2.16b, v3.16b}, [x6]
|
st2 {v2.16b, v3.16b}, [x6]
|
||||||
sub x8, x8, #1
|
sub x8, x8, #1
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON_AARCH64
|
#ifdef HAVE_NEON_AARCH64
|
||||||
.text
|
|
||||||
#include "arm_arch64_common_macro.S"
|
#include "arm_arch64_common_macro.S"
|
||||||
|
|
||||||
//for Luma 16x16
|
//for Luma 16x16
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
git rev-list HEAD | sort > config.git-hash
|
git rev-list HEAD | sort > config.git-hash
|
||||||
|
SRC_PATH=$1
|
||||||
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
|
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
|
||||||
if [ $LOCALVER \> 1 ] ; then
|
if [ $LOCALVER \> 1 ] ; then
|
||||||
VER="$(git rev-list HEAD -n 1 | cut -c 1-7)"
|
VER="$(git rev-list HEAD -n 1 | cut -c 1-7)"
|
||||||
@@ -14,7 +15,8 @@ fi
|
|||||||
GIT_VERSION='"'$GIT_VERSION'"'
|
GIT_VERSION='"'$GIT_VERSION'"'
|
||||||
rm -f config.git-hash
|
rm -f config.git-hash
|
||||||
|
|
||||||
cat codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
|
mkdir -p codec/common/inc
|
||||||
|
cat $SRC_PATH/codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
|
||||||
if cmp codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h > /dev/null 2>&1; then
|
if cmp codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h > /dev/null 2>&1; then
|
||||||
# Identical to old version, don't touch it (to avoid unnecessary rebuilds)
|
# Identical to old version, don't touch it (to avoid unnecessary rebuilds)
|
||||||
rm codec/common/inc/version_gen.h.new
|
rm codec/common/inc/version_gen.h.new
|
||||||
|
|||||||
@@ -38,7 +38,9 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Copy functions
|
* Copy functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void WelsCopy4x4 (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
void WelsCopy4x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
||||||
|
void WelsCopy8x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
||||||
|
void WelsCopy4x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
||||||
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
|
||||||
void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
|
void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
|
||||||
void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
|
void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
|
#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
|
||||||
#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
|
#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
|
||||||
#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
|
#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
|
||||||
|
#define WELS_CPU_AVX2 0x00040000 /* AVX2 */
|
||||||
|
|
||||||
#define WELS_CPU_CACHELINE_16 0x10000000 /* CacheLine Size 16 */
|
#define WELS_CPU_CACHELINE_16 0x10000000 /* CacheLine Size 16 */
|
||||||
#define WELS_CPU_CACHELINE_32 0x20000000 /* CacheLine Size 32 */
|
#define WELS_CPU_CACHELINE_32 0x20000000 /* CacheLine Size 32 */
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ typedef struct TagWelsTime {
|
|||||||
|
|
||||||
int32_t WelsSnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, ...);
|
int32_t WelsSnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, ...);
|
||||||
char* WelsStrncpy (char* dest, int32_t sizeInBytes, const char* src);
|
char* WelsStrncpy (char* dest, int32_t sizeInBytes, const char* src);
|
||||||
char* WelsStrcat (char* dest, int32_t sizeInBytes, const char* src);
|
char* WelsStrcat (char* dest, uint32_t sizeInBytes, const char* src);
|
||||||
int32_t WelsVsnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, va_list argptr);
|
int32_t WelsVsnprintf (char* buffer, int32_t sizeOfBuffer, const char* format, va_list argptr);
|
||||||
|
|
||||||
WelsFileHandle* WelsFopen (const char* filename, const char* mode);
|
WelsFileHandle* WelsFopen (const char* filename, const char* mode);
|
||||||
|
|||||||
166
codec/common/inc/golomb_common.h
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
/*!
|
||||||
|
* \copy
|
||||||
|
* Copyright (c) 2009-2013, Cisco Systems
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
*
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* \file golomb_common.h
|
||||||
|
*
|
||||||
|
* \brief Exponential Golomb entropy coding/decoding routine
|
||||||
|
*
|
||||||
|
* \date 03/12/2015 Created
|
||||||
|
*
|
||||||
|
*************************************************************************************
|
||||||
|
*/
|
||||||
|
#ifndef EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__
|
||||||
|
#define EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__
|
||||||
|
|
||||||
|
#include "typedefs.h"
|
||||||
|
|
||||||
|
namespace WelsCommon {
|
||||||
|
|
||||||
|
#define WRITE_BE_32(ptr, val) do { \
|
||||||
|
(ptr)[0] = (val) >> 24; \
|
||||||
|
(ptr)[1] = (val) >> 16; \
|
||||||
|
(ptr)[2] = (val) >> 8; \
|
||||||
|
(ptr)[3] = (val) >> 0; \
|
||||||
|
} while (0)
|
||||||
|
/************************************************************************/
|
||||||
|
/* GOLOMB CODIMG FOR WELS COMMON */
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief initialize bitstream writing
|
||||||
|
*
|
||||||
|
* \param pBs Bit string auxiliary pointer
|
||||||
|
* \param pBuf bit-stream pBuffer
|
||||||
|
* \param iSize iSize in bits for decoder; iSize in bytes for encoder
|
||||||
|
*
|
||||||
|
* \return iSize of pBuffer pData in byte; failed in -1 return
|
||||||
|
*/
|
||||||
|
static inline int32_t InitBits (SBitStringAux* pBs, const uint8_t* kpBuf, const int32_t kiSize) {
|
||||||
|
uint8_t* ptr = (uint8_t*)kpBuf;
|
||||||
|
|
||||||
|
pBs->pStartBuf = ptr;
|
||||||
|
pBs->pCurBuf = ptr;
|
||||||
|
pBs->pEndBuf = ptr + kiSize;
|
||||||
|
pBs->iLeftBits = 32;
|
||||||
|
pBs->uiCurBits = 0;
|
||||||
|
|
||||||
|
return kiSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int32_t BsWriteBits (PBitStringAux pBitString, int32_t iLen, const uint32_t kuiValue) {
|
||||||
|
if (iLen < pBitString->iLeftBits) {
|
||||||
|
pBitString->uiCurBits = (pBitString->uiCurBits << iLen) | kuiValue;
|
||||||
|
pBitString->iLeftBits -= iLen;
|
||||||
|
} else {
|
||||||
|
iLen -= pBitString->iLeftBits;
|
||||||
|
pBitString->uiCurBits = (pBitString->uiCurBits << pBitString->iLeftBits) | (kuiValue >> iLen);
|
||||||
|
WRITE_BE_32 (pBitString->pCurBuf, pBitString->uiCurBits);
|
||||||
|
pBitString->pCurBuf += 4;
|
||||||
|
pBitString->uiCurBits = kuiValue & ((1 << iLen) - 1);
|
||||||
|
pBitString->iLeftBits = 32 - iLen;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write 1 bit
|
||||||
|
*/
|
||||||
|
static inline int32_t BsWriteOneBit (PBitStringAux pBitString, const uint32_t kuiValue) {
|
||||||
|
BsWriteBits (pBitString, 1, kuiValue);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int32_t BsFlush (PBitStringAux pBitString) {
|
||||||
|
WRITE_BE_32 (pBitString->pCurBuf, pBitString->uiCurBits << pBitString->iLeftBits);
|
||||||
|
pBitString->pCurBuf += 4 - pBitString->iLeftBits / 8;
|
||||||
|
pBitString->iLeftBits = 32;
|
||||||
|
pBitString->uiCurBits = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write unsigned exp golomb codes
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int32_t BsWriteUE (PBitStringAux pBitString, const uint32_t kuiValue) {
|
||||||
|
uint32_t iTmpValue = kuiValue + 1;
|
||||||
|
if (256 > kuiValue) {
|
||||||
|
BsWriteBits (pBitString, g_kuiGolombUELength[kuiValue], kuiValue + 1);
|
||||||
|
} else {
|
||||||
|
uint32_t n = 0;
|
||||||
|
if (iTmpValue & 0xffff0000) {
|
||||||
|
iTmpValue >>= 16;
|
||||||
|
n += 16;
|
||||||
|
}
|
||||||
|
if (iTmpValue & 0xff00) {
|
||||||
|
iTmpValue >>= 8;
|
||||||
|
n += 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
//n += (g_kuiGolombUELength[iTmpValue] >> 1);
|
||||||
|
|
||||||
|
n += (g_kuiGolombUELength[iTmpValue - 1] >> 1);
|
||||||
|
BsWriteBits (pBitString, (n << 1) + 1, kuiValue + 1);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write signed exp golomb codes
|
||||||
|
*/
|
||||||
|
static inline int32_t BsWriteSE (PBitStringAux pBitString, const int32_t kiValue) {
|
||||||
|
uint32_t iTmpValue;
|
||||||
|
if (0 == kiValue) {
|
||||||
|
BsWriteOneBit (pBitString, 1);
|
||||||
|
} else if (0 < kiValue) {
|
||||||
|
iTmpValue = (kiValue << 1) - 1;
|
||||||
|
BsWriteUE (pBitString, iTmpValue);
|
||||||
|
} else {
|
||||||
|
iTmpValue = ((-kiValue) << 1);
|
||||||
|
BsWriteUE (pBitString, iTmpValue);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write RBSP trailing bits
|
||||||
|
*/
|
||||||
|
static inline int32_t BsRbspTrailingBits (PBitStringAux pBitString) {
|
||||||
|
BsWriteOneBit (pBitString, 1);
|
||||||
|
BsFlush (pBitString);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif//EXPONENTIAL_GOLOMB_ENTROPY_CODING_COMMON_H__
|
||||||
@@ -140,16 +140,22 @@ void McHorVer20Width17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* p
|
|||||||
int32_t iHeight);// width+1
|
int32_t iHeight);// width+1
|
||||||
void McHorVer20Width9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer20Width9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// width+1
|
int32_t iHeight);// width+1
|
||||||
|
void McHorVer20Width5_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);// width+1
|
||||||
|
|
||||||
void McHorVer02Height17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// height+1
|
int32_t iHeight);// height+1
|
||||||
void McHorVer02Height9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// height+1
|
int32_t iHeight);// height+1
|
||||||
|
void McHorVer02Height5_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);// height+1
|
||||||
|
|
||||||
void McHorVer22Width17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer22Width17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);//width+1&&height+1
|
int32_t iHeight);//width+1&&height+1
|
||||||
void McHorVer22Width9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer22Width9_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);//width+1&&height+1
|
int32_t iHeight);//width+1&&height+1
|
||||||
|
void McHorVer22Width5_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);//width+1&&height+1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_NEON_AARCH64)
|
#if defined(HAVE_NEON_AARCH64)
|
||||||
@@ -222,14 +228,20 @@ void McHorVer20Width17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, ui
|
|||||||
int32_t iHeight);// width+1
|
int32_t iHeight);// width+1
|
||||||
void McHorVer20Width9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer20Width9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// width+1
|
int32_t iHeight);// width+1
|
||||||
|
void McHorVer20Width5_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);// width+1
|
||||||
void McHorVer02Height17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// height+1
|
int32_t iHeight);// height+1
|
||||||
void McHorVer02Height9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);// height+1
|
int32_t iHeight);// height+1
|
||||||
|
void McHorVer02Height5_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);// height+1
|
||||||
void McHorVer22Width17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer22Width17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);//width+1&&height+1
|
int32_t iHeight);//width+1&&height+1
|
||||||
void McHorVer22Width9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer22Width9_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iHeight);//width+1&&height+1
|
int32_t iHeight);//width+1&&height+1
|
||||||
|
void McHorVer22Width5_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iHeight);//width+1&&height+1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(X86_ASM)
|
#if defined(X86_ASM)
|
||||||
@@ -275,14 +287,24 @@ void PixelAvgWidthEq16_sse2 (uint8_t* pDst, int32_t iDstStride, const uint8_t* p
|
|||||||
void McHorVer20Width9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer20Width9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth,
|
int32_t iWidth,
|
||||||
int32_t iHeight);
|
int32_t iHeight);
|
||||||
|
void McHorVer20Width5_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight);
|
||||||
|
|
||||||
void McHorVer02Height9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth,
|
int32_t iWidth,
|
||||||
int32_t iHeight);
|
int32_t iHeight);
|
||||||
|
void McHorVer02Height5_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight);
|
||||||
|
|
||||||
void McHorVer22HorFirst_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pTap, int32_t iTapStride,
|
void McHorVer22HorFirst_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pTap, int32_t iTapStride,
|
||||||
int32_t iWidth,
|
int32_t iWidth,
|
||||||
int32_t iHeight);
|
int32_t iHeight);
|
||||||
|
void McHorVer22Width5HorFirst_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pTap, int32_t iTapStride,
|
||||||
|
int32_t iWidth, int32_t iHeight);
|
||||||
|
void McHorVer22Width4VerLastAlign_sse2 (const uint8_t* pTap, int32_t iTapStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight);
|
||||||
|
void McHorVer22Width4VerLastUnAlign_sse2 (const uint8_t* pTap, int32_t iTapStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight);
|
||||||
|
|
||||||
//***************************************************************************//
|
//***************************************************************************//
|
||||||
// SSSE3 definition //
|
// SSSE3 definition //
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ int32_t WelsSampleSad16x16_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
|||||||
int32_t WelsSampleSad16x8_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
int32_t WelsSampleSad16x8_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
||||||
int32_t WelsSampleSad8x16_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
int32_t WelsSampleSad8x16_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
||||||
int32_t WelsSampleSad8x8_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
int32_t WelsSampleSad8x8_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
||||||
//int32_t WelsSampleSad8x4( uint8_t *, int32_t, uint8_t *, int32_t );
|
int32_t WelsSampleSad8x4_c( uint8_t *, int32_t, uint8_t *, int32_t );
|
||||||
//int32_t WelsSampleSad4x8( uint8_t *, int32_t, uint8_t *, int32_t );
|
int32_t WelsSampleSad4x8_c( uint8_t *, int32_t, uint8_t *, int32_t );
|
||||||
int32_t WelsSampleSad4x4_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
int32_t WelsSampleSad4x4_c (uint8_t*, int32_t, uint8_t*, int32_t);
|
||||||
|
|
||||||
|
|
||||||
@@ -52,6 +52,8 @@ void WelsSampleSadFour16x8_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSam
|
|||||||
void WelsSampleSadFour8x16_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
void WelsSampleSadFour8x16_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
||||||
void WelsSampleSadFour8x8_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
void WelsSampleSadFour8x8_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
||||||
void WelsSampleSadFour4x4_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
void WelsSampleSadFour4x4_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
||||||
|
void WelsSampleSadFour8x4_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
||||||
|
void WelsSampleSadFour4x8_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -65,14 +65,18 @@ extern const uint8_t g_kuiMbCountScan4Idx[24];
|
|||||||
extern const uint8_t g_kuiCache30ScanIdx[16];
|
extern const uint8_t g_kuiCache30ScanIdx[16];
|
||||||
extern const uint8_t g_kuiCache48CountScan4Idx[24];
|
extern const uint8_t g_kuiCache48CountScan4Idx[24];
|
||||||
|
|
||||||
|
extern const uint8_t g_kuiMatrixV[6][8][8];
|
||||||
|
|
||||||
extern const uint8_t g_kuiDequantScaling4x4Default[2][16];
|
extern const uint8_t g_kuiDequantScaling4x4Default[2][16];
|
||||||
extern const uint8_t g_kuiDequantScaling8x8Default[2][64];
|
extern const uint8_t g_kuiDequantScaling8x8Default[2][64];
|
||||||
extern const ALIGNED_DECLARE (uint16_t, g_kuiDequantCoeff[52][8], 16);
|
extern const ALIGNED_DECLARE (uint16_t, g_kuiDequantCoeff[52][8], 16);
|
||||||
|
extern const ALIGNED_DECLARE (uint16_t, g_kuiDequantCoeff8x8[52][64], 16);
|
||||||
extern const uint8_t g_kuiChromaQpTable[52];
|
extern const uint8_t g_kuiChromaQpTable[52];
|
||||||
|
|
||||||
extern const uint8_t g_kuiCabacRangeLps[64][4];
|
extern const uint8_t g_kuiCabacRangeLps[64][4];
|
||||||
extern const int8_t g_kiCabacGlobalContextIdx[WELS_CONTEXT_COUNT][4][2];
|
extern const int8_t g_kiCabacGlobalContextIdx[WELS_CONTEXT_COUNT][4][2];
|
||||||
extern const uint8_t g_kuiStateTransTable[64][2];
|
extern const uint8_t g_kuiStateTransTable[64][2];
|
||||||
|
extern const uint32_t g_kuiGolombUELength[256];
|
||||||
/*
|
/*
|
||||||
* NAL Unit Type (5 Bits)
|
* NAL Unit Type (5 Bits)
|
||||||
*/
|
*/
|
||||||
@@ -210,6 +214,89 @@ enum EMmcoCode {
|
|||||||
MMCO_LONG = 6
|
MMCO_LONG = 6
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bit-stream auxiliary reading / writing
|
||||||
|
*/
|
||||||
|
typedef struct TagBitStringAux {
|
||||||
|
uint8_t* pStartBuf; // buffer to start position
|
||||||
|
uint8_t* pEndBuf; // buffer + length
|
||||||
|
int32_t iBits; // count bits of overall bitstreaming input
|
||||||
|
|
||||||
|
intX_t iIndex; //only for cavlc usage
|
||||||
|
uint8_t* pCurBuf; // current reading position
|
||||||
|
uint32_t uiCurBits;
|
||||||
|
int32_t iLeftBits; // count number of available bits left ([1, 8]),
|
||||||
|
// need pointer to next byte start position in case 0 bit left then 8 instead
|
||||||
|
} SBitStringAux, *PBitStringAux;
|
||||||
|
|
||||||
|
/* NAL Unix Header in AVC, refer to Page 56 in JVT X201wcm */
|
||||||
|
typedef struct TagNalUnitHeader {
|
||||||
|
uint8_t uiForbiddenZeroBit;
|
||||||
|
uint8_t uiNalRefIdc;
|
||||||
|
EWelsNalUnitType eNalUnitType;
|
||||||
|
uint8_t uiReservedOneByte; // only padding usage
|
||||||
|
} SNalUnitHeader, *PNalUnitHeader;
|
||||||
|
|
||||||
|
/* NAL Unit Header in scalable extension syntax, refer to Page 390 in JVT X201wcm */
|
||||||
|
typedef struct TagNalUnitHeaderExt {
|
||||||
|
SNalUnitHeader sNalUnitHeader;
|
||||||
|
|
||||||
|
// uint8_t reserved_one_bit;
|
||||||
|
bool bIdrFlag;
|
||||||
|
uint8_t uiPriorityId;
|
||||||
|
int8_t iNoInterLayerPredFlag; // change as int8_t to support 3 values probably in encoder
|
||||||
|
uint8_t uiDependencyId;
|
||||||
|
|
||||||
|
uint8_t uiQualityId;
|
||||||
|
uint8_t uiTemporalId;
|
||||||
|
bool bUseRefBasePicFlag;
|
||||||
|
bool bDiscardableFlag;
|
||||||
|
|
||||||
|
bool bOutputFlag;
|
||||||
|
uint8_t uiReservedThree2Bits;
|
||||||
|
// Derived variable(s)
|
||||||
|
uint8_t uiLayerDqId;
|
||||||
|
bool bNalExtFlag;
|
||||||
|
} SNalUnitHeaderExt, *PNalUnitHeaderExt;
|
||||||
|
|
||||||
|
/* AVC MB types*/
|
||||||
|
#define MB_TYPE_INTRA4x4 0x00000001
|
||||||
|
#define MB_TYPE_INTRA16x16 0x00000002
|
||||||
|
#define MB_TYPE_INTRA8x8 0x00000004
|
||||||
|
#define MB_TYPE_16x16 0x00000008
|
||||||
|
#define MB_TYPE_16x8 0x00000010
|
||||||
|
#define MB_TYPE_8x16 0x00000020
|
||||||
|
#define MB_TYPE_8x8 0x00000040
|
||||||
|
#define MB_TYPE_8x8_REF0 0x00000080
|
||||||
|
#define MB_TYPE_SKIP 0x00000100
|
||||||
|
#define MB_TYPE_INTRA_PCM 0x00000200
|
||||||
|
#define MB_TYPE_INTRA_BL 0x00000400
|
||||||
|
|
||||||
|
#define MB_TYPE_DIRECT2 0x00004000
|
||||||
|
|
||||||
|
#define SUB_MB_TYPE_8x8 0x00000001
|
||||||
|
#define SUB_MB_TYPE_8x4 0x00000002
|
||||||
|
#define SUB_MB_TYPE_4x8 0x00000004
|
||||||
|
#define SUB_MB_TYPE_4x4 0x00000008
|
||||||
|
|
||||||
|
#define MB_TYPE_INTRA (MB_TYPE_INTRA4x4 | MB_TYPE_INTRA16x16 | MB_TYPE_INTRA8x8 | MB_TYPE_INTRA_PCM)
|
||||||
|
#define MB_TYPE_INTER (MB_TYPE_16x16 | MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_8x8_REF0 | MB_TYPE_SKIP)
|
||||||
|
#define IS_INTRA4x4(type) ( MB_TYPE_INTRA4x4 == (type) )
|
||||||
|
#define IS_INTRA8x8(type) ( MB_TYPE_INTRA8x8 == (type) )
|
||||||
|
#define IS_INTRANxN(type) ( MB_TYPE_INTRA4x4 == (type) || MB_TYPE_INTRA8x8 == (type) )
|
||||||
|
#define IS_INTRA16x16(type) ( MB_TYPE_INTRA16x16 == (type) )
|
||||||
|
#define IS_INTRA(type) ( (type)&MB_TYPE_INTRA )
|
||||||
|
#define IS_INTER(type) ( (type)&MB_TYPE_INTER )
|
||||||
|
|
||||||
|
#define IS_SKIP(type) ( (type) == MB_TYPE_SKIP )
|
||||||
|
#define IS_SVC_INTER(type) IS_INTER(type)
|
||||||
|
#define IS_I_BL(type) ( (type) == MB_TYPE_INTRA_BL )
|
||||||
|
#define IS_SVC_INTRA(type) ( IS_I_BL(type) || IS_INTRA(type) )
|
||||||
|
#define IS_Inter_8x8(type) ( (type) == MB_TYPE_8x8)
|
||||||
|
|
||||||
|
#define REF_NOT_AVAIL -2
|
||||||
|
#define REF_NOT_IN_LIST -1 //intra
|
||||||
|
|
||||||
/////////intra16x16 Luma
|
/////////intra16x16 Luma
|
||||||
#define I16_PRED_INVALID -1
|
#define I16_PRED_INVALID -1
|
||||||
#define I16_PRED_V 0
|
#define I16_PRED_V 0
|
||||||
@@ -222,6 +309,7 @@ enum EMmcoCode {
|
|||||||
#define I16_PRED_DC_128 6
|
#define I16_PRED_DC_128 6
|
||||||
#define I16_PRED_DC_A 7
|
#define I16_PRED_DC_A 7
|
||||||
//////////intra4x4 Luma
|
//////////intra4x4 Luma
|
||||||
|
// Here, I8x8 also use these definitions
|
||||||
#define I4_PRED_INVALID 0
|
#define I4_PRED_INVALID 0
|
||||||
#define I4_PRED_V 0
|
#define I4_PRED_V 0
|
||||||
#define I4_PRED_H 1
|
#define I4_PRED_H 1
|
||||||
|
|||||||
@@ -52,5 +52,12 @@
|
|||||||
/* MB height in pixels for specified colorspace I420 usually used in codec */
|
/* MB height in pixels for specified colorspace I420 usually used in codec */
|
||||||
#define MB_HEIGHT_LUMA 16
|
#define MB_HEIGHT_LUMA 16
|
||||||
#define MB_HEIGHT_CHROMA (MB_HEIGHT_LUMA>>1)
|
#define MB_HEIGHT_CHROMA (MB_HEIGHT_LUMA>>1)
|
||||||
|
#define MB_COEFF_LIST_SIZE (256+((MB_WIDTH_CHROMA*MB_HEIGHT_CHROMA)<<1))
|
||||||
|
#define MB_PARTITION_SIZE 4 // Macroblock partition size in 8x8 sub-blocks
|
||||||
|
#define MB_BLOCK4x4_NUM 16
|
||||||
|
#define MB_BLOCK8x8_NUM 4
|
||||||
|
#define MAX_SPS_COUNT 32 // Count number of SPS
|
||||||
|
#define BASE_QUALITY_ID 0
|
||||||
|
|
||||||
|
|
||||||
#endif//WELS_CONST_COMMON_H__
|
#endif//WELS_CONST_COMMON_H__
|
||||||
|
|||||||
@@ -476,18 +476,40 @@ WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* p
|
|||||||
|
|
||||||
CPU_ZERO (&cpuset);
|
CPU_ZERO (&cpuset);
|
||||||
|
|
||||||
if (!sched_getaffinity (0, sizeof (cpuset), &cpuset))
|
if (!sched_getaffinity (0, sizeof (cpuset), &cpuset)) {
|
||||||
|
#ifdef CPU_COUNT
|
||||||
pInfo->ProcessorCount = CPU_COUNT (&cpuset);
|
pInfo->ProcessorCount = CPU_COUNT (&cpuset);
|
||||||
else
|
#else
|
||||||
|
int32_t count = 0;
|
||||||
|
for (int i = 0; i < CPU_SETSIZE; i++) {
|
||||||
|
if (CPU_ISSET(i, &cpuset)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pInfo->ProcessorCount = count;
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
pInfo->ProcessorCount = 1;
|
pInfo->ProcessorCount = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return WELS_THREAD_ERROR_OK;
|
return WELS_THREAD_ERROR_OK;
|
||||||
|
|
||||||
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
|
||||||
|
// There is not yet a way to determine CPU count in emscripten JS environment.
|
||||||
|
pInfo->ProcessorCount = 1;
|
||||||
|
return WELS_THREAD_ERROR_OK;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
size_t len = sizeof (pInfo->ProcessorCount);
|
size_t len = sizeof (pInfo->ProcessorCount);
|
||||||
|
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
int scname[] = { CTL_HW, HW_NCPU };
|
||||||
|
if (sysctl (scname, 2, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
||||||
|
#else
|
||||||
if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
if (sysctlbyname (HW_NCPU_NAME, &pInfo->ProcessorCount, &len, NULL, 0) == -1)
|
||||||
|
#endif
|
||||||
pInfo->ProcessorCount = 1;
|
pInfo->ProcessorCount = 1;
|
||||||
|
|
||||||
return WELS_THREAD_ERROR_OK;
|
return WELS_THREAD_ERROR_OK;
|
||||||
|
|||||||
@@ -61,6 +61,68 @@ const uint8_t g_kuiCache48CountScan4Idx[24] = {
|
|||||||
46, 47, // 6+5*8, 7+5*8,
|
46, 47, // 6+5*8, 7+5*8,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint8_t g_kuiMatrixV[6][8][8] = { // generated from equation 8-317, 8-318
|
||||||
|
{
|
||||||
|
{20, 19, 25, 19, 20, 19, 25, 19},
|
||||||
|
{19, 18, 24, 18, 19, 18, 24, 18},
|
||||||
|
{25, 24, 32, 24, 25, 24, 32, 24},
|
||||||
|
{19, 18, 24, 18, 19, 18, 24, 18},
|
||||||
|
{20, 19, 25, 19, 20, 19, 25, 19},
|
||||||
|
{19, 18, 24, 18, 19, 18, 24, 18},
|
||||||
|
{25, 24, 32, 24, 25, 24, 32, 24},
|
||||||
|
{19, 18, 24, 18, 19, 18, 24, 18}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{22, 21, 28, 21, 22, 21, 28, 21},
|
||||||
|
{21, 19, 26, 19, 21, 19, 26, 19},
|
||||||
|
{28, 26, 35, 26, 28, 26, 35, 26},
|
||||||
|
{21, 19, 26, 19, 21, 19, 26, 19},
|
||||||
|
{22, 21, 28, 21, 22, 21, 28, 21},
|
||||||
|
{21, 19, 26, 19, 21, 19, 26, 19},
|
||||||
|
{28, 26, 35, 26, 28, 26, 35, 26},
|
||||||
|
{21, 19, 26, 19, 21, 19, 26, 19}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{26, 24, 33, 24, 26, 24, 33, 24},
|
||||||
|
{24, 23, 31, 23, 24, 23, 31, 23},
|
||||||
|
{33, 31, 42, 31, 33, 31, 42, 31},
|
||||||
|
{24, 23, 31, 23, 24, 23, 31, 23},
|
||||||
|
{26, 24, 33, 24, 26, 24, 33, 24},
|
||||||
|
{24, 23, 31, 23, 24, 23, 31, 23},
|
||||||
|
{33, 31, 42, 31, 33, 31, 42, 31},
|
||||||
|
{24, 23, 31, 23, 24, 23, 31, 23}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{28, 26, 35, 26, 28, 26, 35, 26},
|
||||||
|
{26, 25, 33, 25, 26, 25, 33, 25},
|
||||||
|
{35, 33, 45, 33, 35, 33, 45, 33},
|
||||||
|
{26, 25, 33, 25, 26, 25, 33, 25},
|
||||||
|
{28, 26, 35, 26, 28, 26, 35, 26},
|
||||||
|
{26, 25, 33, 25, 26, 25, 33, 25},
|
||||||
|
{35, 33, 45, 33, 35, 33, 45, 33},
|
||||||
|
{26, 25, 33, 25, 26, 25, 33, 25}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{32, 30, 40, 30, 32, 30, 40, 30},
|
||||||
|
{30, 28, 38, 28, 30, 28, 38, 28},
|
||||||
|
{40, 38, 51, 38, 40, 38, 51, 38},
|
||||||
|
{30, 28, 38, 28, 30, 28, 38, 28},
|
||||||
|
{32, 30, 40, 30, 32, 30, 40, 30},
|
||||||
|
{30, 28, 38, 28, 30, 28, 38, 28},
|
||||||
|
{40, 38, 51, 38, 40, 38, 51, 38},
|
||||||
|
{30, 28, 38, 28, 30, 28, 38, 28}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{36, 34, 46, 34, 36, 34, 46, 34},
|
||||||
|
{34, 32, 43, 32, 34, 32, 43, 32},
|
||||||
|
{46, 43, 58, 43, 46, 43, 58, 43},
|
||||||
|
{34, 32, 43, 32, 34, 32, 43, 32},
|
||||||
|
{36, 34, 46, 34, 36, 34, 46, 34},
|
||||||
|
{34, 32, 43, 32, 34, 32, 43, 32},
|
||||||
|
{46, 43, 58, 43, 46, 43, 58, 43},
|
||||||
|
{34, 32, 43, 32, 34, 32, 43, 32}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//cache element equal to 30
|
//cache element equal to 30
|
||||||
const uint8_t g_kuiCache30ScanIdx[16] = { //mv or uiRefIndex cache scan index, 4*4 block as basic unit
|
const uint8_t g_kuiCache30ScanIdx[16] = { //mv or uiRefIndex cache scan index, 4*4 block as basic unit
|
||||||
@@ -172,6 +234,113 @@ ALIGNED_DECLARE (const uint16_t, g_kuiDequantCoeff[52][8], 16) = {
|
|||||||
/*50*/{ 3328, 4096, 3328, 4096, 4096, 5120, 4096, 5120 }, /*51*/{ 3584, 4608, 3584, 4608, 4608, 5888, 4608, 5888 },
|
/*50*/{ 3328, 4096, 3328, 4096, 4096, 5120, 4096, 5120 }, /*51*/{ 3584, 4608, 3584, 4608, 4608, 5888, 4608, 5888 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ALIGNED_DECLARE (const uint16_t, g_kuiDequantCoeff8x8[52][64], 16) = {
|
||||||
|
/* QP == 0 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 1 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 2 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 3 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 4 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 5 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 6 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 7 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 8 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 9 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 10 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 11 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 12 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 13 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 14 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 15 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 16 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 17 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 18 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 19 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 20 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 21 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 22 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 23 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 24 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 25 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 26 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 27 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 28 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 29 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 30 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 31 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 32 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 33 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 34 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 35 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 36 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 37 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 38 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 39 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 40 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 41 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 42 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 43 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 44 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 45 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
/* QP == 46 */
|
||||||
|
{ 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448, 512, 480, 640, 480, 512, 480, 640, 480, 480, 448, 608, 448, 480, 448, 608, 448, 640, 608, 816, 608, 640, 608, 816, 608, 480, 448, 608, 448, 480, 448, 608, 448 },
|
||||||
|
/* QP == 47 */
|
||||||
|
{ 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512, 576, 544, 736, 544, 576, 544, 736, 544, 544, 512, 688, 512, 544, 512, 688, 512, 736, 688, 928, 688, 736, 688, 928, 688, 544, 512, 688, 512, 544, 512, 688, 512 },
|
||||||
|
/* QP == 48 */
|
||||||
|
{ 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288, 320, 304, 400, 304, 320, 304, 400, 304, 304, 288, 384, 288, 304, 288, 384, 288, 400, 384, 512, 384, 400, 384, 512, 384, 304, 288, 384, 288, 304, 288, 384, 288 },
|
||||||
|
/* QP == 49 */
|
||||||
|
{ 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304, 352, 336, 448, 336, 352, 336, 448, 336, 336, 304, 416, 304, 336, 304, 416, 304, 448, 416, 560, 416, 448, 416, 560, 416, 336, 304, 416, 304, 336, 304, 416, 304 },
|
||||||
|
/* QP == 50 */
|
||||||
|
{ 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368, 416, 384, 528, 384, 416, 384, 528, 384, 384, 368, 496, 368, 384, 368, 496, 368, 528, 496, 672, 496, 528, 496, 672, 496, 384, 368, 496, 368, 384, 368, 496, 368 },
|
||||||
|
/* QP == 51 */
|
||||||
|
{ 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400, 448, 416, 560, 416, 448, 416, 560, 416, 416, 400, 528, 400, 416, 400, 528, 400, 560, 528, 720, 528, 560, 528, 720, 528, 416, 400, 528, 400, 416, 400, 528, 400 },
|
||||||
|
};
|
||||||
|
|
||||||
// table A-1 - Level limits
|
// table A-1 - Level limits
|
||||||
const SLevelLimits g_ksLevelLimits[LEVEL_NUMBER] = {
|
const SLevelLimits g_ksLevelLimits[LEVEL_NUMBER] = {
|
||||||
{LEVEL_1_0, 1485, 99, 396, 64, 175, -256, 255, 2, 0x7fff}, /* level 1 */
|
{LEVEL_1_0, 1485, 99, 396, 64, 175, -256, 255, 2, 0x7fff}, /* level 1 */
|
||||||
@@ -712,5 +881,26 @@ const uint8_t g_kuiStateTransTable[64][2] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// extern at svc_enc_golomb.h, golomb_common.h
|
||||||
|
|
||||||
|
const uint32_t g_kuiGolombUELength[256] = {
|
||||||
|
1, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, //14
|
||||||
|
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, //30
|
||||||
|
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,//46
|
||||||
|
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,//62
|
||||||
|
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,//
|
||||||
|
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
|
||||||
|
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
|
||||||
|
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||||
|
17
|
||||||
|
};
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Copy functions
|
* Copy functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
void WelsCopy4x4 (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
void WelsCopy4x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
||||||
const int32_t kiSrcStride2 = iStrideS << 1;
|
const int32_t kiSrcStride2 = iStrideS << 1;
|
||||||
const int32_t kiSrcStride3 = iStrideS + kiSrcStride2;
|
const int32_t kiSrcStride3 = iStrideS + kiSrcStride2;
|
||||||
const int32_t kiDstStride2 = iStrideD << 1;
|
const int32_t kiDstStride2 = iStrideD << 1;
|
||||||
@@ -56,6 +56,14 @@ void WelsCopy4x4 (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrid
|
|||||||
ST32 (pDst + kiDstStride2, LD32 (pSrc + kiSrcStride2));
|
ST32 (pDst + kiDstStride2, LD32 (pSrc + kiSrcStride2));
|
||||||
ST32 (pDst + kiDstStride3, LD32 (pSrc + kiSrcStride3));
|
ST32 (pDst + kiDstStride3, LD32 (pSrc + kiSrcStride3));
|
||||||
}
|
}
|
||||||
|
void WelsCopy8x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
||||||
|
WelsCopy4x4_c (pDst, iStrideD, pSrc, iStrideS);
|
||||||
|
WelsCopy4x4_c (pDst + 4, iStrideD, pSrc + 4, iStrideS);
|
||||||
|
}
|
||||||
|
void WelsCopy4x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
||||||
|
WelsCopy4x4_c (pDst, iStrideD, pSrc, iStrideS);
|
||||||
|
WelsCopy4x4_c (pDst + (iStrideD << 2), iStrideD, pSrc + (iStrideS << 2), iStrideS);
|
||||||
|
}
|
||||||
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS) {
|
||||||
int32_t i;
|
int32_t i;
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
|||||||
@@ -136,6 +136,15 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
|
|||||||
uiCPU |= WELS_CPU_MOVBE;
|
uiCPU |= WELS_CPU_MOVBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uiMaxCpuidLevel >= 7) {
|
||||||
|
uiFeatureC = 0;
|
||||||
|
WelsCPUId (7, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
|
||||||
|
if ((uiCPU & WELS_CPU_AVX) && (uiFeatureB & 0x00000020)) {
|
||||||
|
/* AVX2 supported */
|
||||||
|
uiCPU |= WELS_CPU_AVX2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pNumberOfLogicProcessors != NULL) {
|
if (pNumberOfLogicProcessors != NULL) {
|
||||||
if (uiCPU & WELS_CPU_HTT) {
|
if (uiCPU & WELS_CPU_HTT) {
|
||||||
*pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
|
*pNumberOfLogicProcessors = (uiFeatureB & 0x00ff0000) >> 16; // feature bits: 23-16 on returned EBX
|
||||||
|
|||||||
@@ -242,9 +242,11 @@ int32_t WelsStrftime (char* pBuffer, int32_t iSize, const char* kpFormat, const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char* WelsStrcat (char* pDest, int32_t iSizeInBytes, const char* kpSrc) {
|
char* WelsStrcat (char* pDest, uint32_t uiSizeInBytes, const char* kpSrc) {
|
||||||
int32_t iCurLen = (int32_t)strlen (pDest);
|
uint32_t uiCurLen = (uint32_t) strlen (pDest);
|
||||||
return WelsStrncpy (pDest + iCurLen, iSizeInBytes - iCurLen, kpSrc);
|
if (uiSizeInBytes > uiCurLen)
|
||||||
|
return WelsStrncpy (pDest + uiCurLen, uiSizeInBytes - uiCurLen, kpSrc);
|
||||||
|
return pDest;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t WelsFwrite (const void* kpBuffer, int32_t iSize, int32_t iCount, WelsFileHandle* pFp) {
|
int32_t WelsFwrite (const void* kpBuffer, int32_t iSize, int32_t iCount, WelsFileHandle* pFp) {
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ void DeblockLumaLt4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_
|
|||||||
bool bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
bool bDetaP2P0 = WELS_ABS (p2 - p0) < iBeta;
|
||||||
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
||||||
if (bDetaP2P0) {
|
if (bDetaP2P0) {
|
||||||
pPix[-2 * iStrideX] = p1 + WELS_CLIP3 ((p2 + ((p0 + q0 + 1) >> 1) - (p1 << 1)) >> 1, -iTc0, iTc0);
|
pPix[-2 * iStrideX] = p1 + WELS_CLIP3 ((p2 + ((p0 + q0 + 1) >> 1) - (p1 * (1 << 1))) >> 1, -iTc0, iTc0);
|
||||||
iTc++;
|
iTc++;
|
||||||
}
|
}
|
||||||
if (bDetaQ2Q0) {
|
if (bDetaQ2Q0) {
|
||||||
pPix[iStrideX] = q1 + WELS_CLIP3 ((q2 + ((p0 + q0 + 1) >> 1) - (q1 << 1)) >> 1, -iTc0, iTc0);
|
pPix[iStrideX] = q1 + WELS_CLIP3 ((q2 + ((p0 + q0 + 1) >> 1) - (q1 * (1 << 1))) >> 1, -iTc0, iTc0);
|
||||||
iTc++;
|
iTc++;
|
||||||
}
|
}
|
||||||
int32_t iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc, iTc);
|
int32_t iDeta = WELS_CLIP3 ((((q0 - p0) * (1 << 2)) + (p1 - q1) + 4) >> 3, -iTc, iTc);
|
||||||
pPix[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
pPix[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||||
pPix[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
pPix[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||||
}
|
}
|
||||||
@@ -56,23 +56,23 @@ void DeblockLumaEq4_c (uint8_t* pPix, int32_t iStrideX, int32_t iStrideY, int32_
|
|||||||
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
bool bDetaQ2Q0 = WELS_ABS (q2 - q0) < iBeta;
|
||||||
if (bDetaP2P0) {
|
if (bDetaP2P0) {
|
||||||
const int32_t p3 = pPix[-4 * iStrideX];
|
const int32_t p3 = pPix[-4 * iStrideX];
|
||||||
pPix[-iStrideX] = (p2 + (p1 << 1) + (p0 << 1) + (q0 << 1) + q1 + 4) >> 3; //p0
|
pPix[-iStrideX] = (p2 + (p1 * (1 << 1)) + (p0 * (1 << 1)) + (q0 * (1 << 1)) + q1 + 4) >> 3; //p0
|
||||||
pPix[-2 * iStrideX] = (p2 + p1 + p0 + q0 + 2) >> 2; //p1
|
pPix[-2 * iStrideX] = (p2 + p1 + p0 + q0 + 2) >> 2; //p1
|
||||||
pPix[-3 * iStrideX] = ((p3 << 1) + p2 + (p2 << 1) + p1 + p0 + q0 + 4) >> 3;//p2
|
pPix[-3 * iStrideX] = ((p3 * (1 << 1)) + p2 + (p2 * (1 << 1)) + p1 + p0 + q0 + 4) >> 3; //p2
|
||||||
} else {
|
} else {
|
||||||
pPix[-1 * iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; //p0
|
pPix[-1 * iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2; //p0
|
||||||
}
|
}
|
||||||
if (bDetaQ2Q0) {
|
if (bDetaQ2Q0) {
|
||||||
const int32_t q3 = pPix[3 * iStrideX];
|
const int32_t q3 = pPix[3 * iStrideX];
|
||||||
pPix[0] = (p1 + (p0 << 1) + (q0 << 1) + (q1 << 1) + q2 + 4) >> 3; //q0
|
pPix[0] = (p1 + (p0 * (1 << 1)) + (q0 * (1 << 1)) + (q1 * (1 << 1)) + q2 + 4) >> 3; //q0
|
||||||
pPix[iStrideX] = (p0 + q0 + q1 + q2 + 2) >> 2; //q1
|
pPix[iStrideX] = (p0 + q0 + q1 + q2 + 2) >> 2; //q1
|
||||||
pPix[2 * iStrideX] = ((q3 << 1) + q2 + (q2 << 1) + q1 + q0 + p0 + 4) >> 3;//q2
|
pPix[2 * iStrideX] = ((q3 * (1 << 1)) + q2 + (q2 * (1 << 1)) + q1 + q0 + p0 + 4) >> 3; //q2
|
||||||
} else {
|
} else {
|
||||||
pPix[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
|
pPix[0] = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2; //q0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pPix[-iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; //p0
|
pPix[-iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2; //p0
|
||||||
pPix[ 0] = ((q1 << 1) + q0 + p1 + 2) >> 2; //q0
|
pPix[ 0] = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2; //q0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pPix += iStrideY;
|
pPix += iStrideY;
|
||||||
@@ -107,7 +107,7 @@ void DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
|||||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
iDeta = WELS_CLIP3 ((((q0 - p0) * (1 << 2)) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||||
pPixCb[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
pPixCb[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||||
pPixCb[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
pPixCb[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||||
}
|
}
|
||||||
@@ -123,7 +123,7 @@ void DeblockChromaLt4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
|||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
|
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
iDeta = WELS_CLIP3 ((((q0 - p0) * (1 << 2)) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||||
pPixCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
pPixCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||||
pPixCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
pPixCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||||
}
|
}
|
||||||
@@ -146,8 +146,8 @@ void DeblockChromaEq4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
|||||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
pPixCb[-iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; /* p0' */
|
pPixCb[-iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2; /* p0' */
|
||||||
pPixCb[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; /* q0' */
|
pPixCb[0] = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2; /* q0' */
|
||||||
}
|
}
|
||||||
|
|
||||||
//cr
|
//cr
|
||||||
@@ -159,8 +159,8 @@ void DeblockChromaEq4_c (uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStrideX, int
|
|||||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
pPixCr[-iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; /* p0' */
|
pPixCr[-iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2; /* p0' */
|
||||||
pPixCr[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; /* q0' */
|
pPixCr[0] = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2; /* q0' */
|
||||||
}
|
}
|
||||||
pPixCr += iStrideY;
|
pPixCr += iStrideY;
|
||||||
pPixCb += iStrideY;
|
pPixCb += iStrideY;
|
||||||
@@ -198,7 +198,7 @@ void DeblockChromaLt42_c (uint8_t* pPixCbCr, int32_t iStrideX, int32_t iStrideY,
|
|||||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
iDeta = WELS_CLIP3 ((((q0 - p0) << 2) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
iDeta = WELS_CLIP3 ((((q0 - p0) * (1 << 2)) + (p1 - q1) + 4) >> 3, -iTc0, iTc0);
|
||||||
pPixCbCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
pPixCbCr[-iStrideX] = WelsClip1 (p0 + iDeta); /* p0' */
|
||||||
pPixCbCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
pPixCbCr[0] = WelsClip1 (q0 - iDeta); /* q0' */
|
||||||
}
|
}
|
||||||
@@ -221,8 +221,8 @@ void DeblockChromaEq42_c (uint8_t* pPixCbCr, int32_t iStrideX, int32_t iStrideY,
|
|||||||
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
bDetaP1P0 = WELS_ABS (p1 - p0) < iBeta;
|
||||||
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
bDetaQ1Q0 = WELS_ABS (q1 - q0) < iBeta;
|
||||||
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
if (bDetaP0Q0 && bDetaP1P0 && bDetaQ1Q0) {
|
||||||
pPixCbCr[-iStrideX] = ((p1 << 1) + p0 + q1 + 2) >> 2; /* p0' */
|
pPixCbCr[-iStrideX] = ((p1 * (1 << 1)) + p0 + q1 + 2) >> 2; /* p0' */
|
||||||
pPixCbCr[0] = ((q1 << 1) + q0 + p1 + 2) >> 2; /* q0' */
|
pPixCbCr[0] = ((q1 * (1 << 1)) + q0 + p1 + 2) >> 2; /* q0' */
|
||||||
}
|
}
|
||||||
|
|
||||||
pPixCbCr += iStrideY;
|
pPixCbCr += iStrideY;
|
||||||
|
|||||||
@@ -399,14 +399,40 @@ static inline void McHorVer22WidthEq16_sse2 (const uint8_t* pSrc, int32_t iSrcSt
|
|||||||
McHorVer22WidthEq8_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer22WidthEq8_sse2 (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
McHorVer22WidthEq8_sse2 (&pSrc[8], iSrcStride, &pDst[8], iDstStride, iHeight);
|
McHorVer22WidthEq8_sse2 (&pSrc[8], iSrcStride, &pDst[8], iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McHorVer22Width9Or17Height9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
|
||||||
|
void McHorVer20Width5Or9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight) {
|
||||||
|
if (iWidth == 17 || iWidth == 9)
|
||||||
|
McHorVer20Width9Or17_sse2 (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||||
|
else //if (iWidth == 5)
|
||||||
|
McHorVer20Width5_sse2 (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
void McHorVer02Height5Or9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
|
int32_t iWidth, int32_t iHeight) {
|
||||||
|
if (iWidth == 16 || iWidth == 8)
|
||||||
|
McHorVer02Height9Or17_sse2 (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||||
|
else //if (iWidth == 4)
|
||||||
|
McHorVer02Height5_sse2 (pSrc, iSrcStride, pDst, iDstStride, iWidth, iHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
void McHorVer22Width5Or9Or17Height5Or9Or17_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
ENFORCE_STACK_ALIGN_2D (int16_t, pTap, 22, 24, 16)
|
ENFORCE_STACK_ALIGN_2D (int16_t, pTap, 22, 24, 16)
|
||||||
|
if (iWidth == 17 || iWidth == 9){
|
||||||
int32_t tmp1 = 2 * (iWidth - 8);
|
int32_t tmp1 = 2 * (iWidth - 8);
|
||||||
McHorVer22HorFirst_sse2 (pSrc - 2, iSrcStride, (uint8_t*)pTap, 48, iWidth, iHeight + 5);
|
McHorVer22HorFirst_sse2 (pSrc - 2, iSrcStride, (uint8_t*)pTap, 48, iWidth, iHeight + 5);
|
||||||
McHorVer22Width8VerLastAlign_sse2 ((uint8_t*)pTap, 48, pDst, iDstStride, iWidth - 1, iHeight);
|
McHorVer22Width8VerLastAlign_sse2 ((uint8_t*)pTap, 48, pDst, iDstStride, iWidth - 1, iHeight);
|
||||||
McHorVer22Width8VerLastUnAlign_sse2 ((uint8_t*)pTap + tmp1, 48, pDst + iWidth - 8, iDstStride, 8, iHeight);
|
McHorVer22Width8VerLastUnAlign_sse2 ((uint8_t*)pTap + tmp1, 48, pDst + iWidth - 8, iDstStride, 8, iHeight);
|
||||||
}
|
}
|
||||||
|
else{ //if(iWidth == 5)
|
||||||
|
int32_t tmp1 = 2 * (iWidth - 4);
|
||||||
|
McHorVer22Width5HorFirst_sse2 (pSrc - 2, iSrcStride, (uint8_t*)pTap, 48, iWidth, iHeight + 5);
|
||||||
|
McHorVer22Width4VerLastAlign_sse2 ((uint8_t*)pTap, 48, pDst, iDstStride, iWidth - 1, iHeight);
|
||||||
|
McHorVer22Width4VerLastUnAlign_sse2 ((uint8_t*)pTap + tmp1, 48, pDst + iWidth - 4, iDstStride, 4, iHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static inline void McCopy_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
static inline void McCopy_sse2 (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth,
|
int32_t iWidth,
|
||||||
@@ -716,26 +742,32 @@ void PixelAvg_sse2 (uint8_t* pDst, int32_t iDstStride, const uint8_t* pSrcA, int
|
|||||||
// NEON implementation //
|
// NEON implementation //
|
||||||
//***************************************************************************//
|
//***************************************************************************//
|
||||||
#if defined(HAVE_NEON)
|
#if defined(HAVE_NEON)
|
||||||
void McHorVer20Width9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer20Width5Or9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 17)
|
if (iWidth == 17)
|
||||||
McHorVer20Width17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer20Width17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 9)
|
else if (iWidth == 9)
|
||||||
McHorVer20Width9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer20Width9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 5)
|
||||||
|
McHorVer20Width5_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McHorVer02Height9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height5Or9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 16)
|
if (iWidth == 16)
|
||||||
McHorVer02Height17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer02Height17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 8)
|
else if (iWidth == 8)
|
||||||
McHorVer02Height9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer02Height9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 4)
|
||||||
|
McHorVer02Height5_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McHorVer22Width9Or17Height9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer22Width5Or9Or17Height5Or9Or17_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 17)
|
if (iWidth == 17)
|
||||||
McHorVer22Width17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer22Width17_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 9)
|
else if (iWidth == 9)
|
||||||
McHorVer22Width9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer22Width9_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 5)
|
||||||
|
McHorVer22Width5_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McCopy_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McCopy_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
@@ -998,27 +1030,33 @@ void PixelAvg_neon (uint8_t* pDst, int32_t iDstStride, const uint8_t* pSrcA, int
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_NEON_AARCH64)
|
#if defined(HAVE_NEON_AARCH64)
|
||||||
void McHorVer20Width9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer20Width5Or9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 17)
|
if (iWidth == 17)
|
||||||
McHorVer20Width17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer20Width17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 9)
|
else if (iWidth == 9)
|
||||||
McHorVer20Width9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer20Width9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 5)
|
||||||
|
McHorVer20Width5_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McHorVer02Height9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McHorVer02Height5Or9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 16)
|
if (iWidth == 16)
|
||||||
McHorVer02Height17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer02Height17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 8)
|
else if (iWidth == 8)
|
||||||
McHorVer02Height9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer02Height9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 4)
|
||||||
|
McHorVer02Height5_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McHorVer22Width9Or17Height9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst,
|
void McHorVer22Width5Or9Or17Height5Or9Or17_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst,
|
||||||
int32_t iDstStride,
|
int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
if (iWidth == 17)
|
if (iWidth == 17)
|
||||||
McHorVer22Width17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer22Width17_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
else //if (iWidth == 9)
|
else if (iWidth == 9)
|
||||||
McHorVer22Width9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
McHorVer22Width9_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
|
else //if (iWidth == 5)
|
||||||
|
McHorVer22Width5_AArch64_neon (pSrc, iSrcStride, pDst, iDstStride, iHeight);
|
||||||
}
|
}
|
||||||
void McCopy_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
void McCopy_AArch64_neon (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
|
||||||
int32_t iWidth, int32_t iHeight) {
|
int32_t iWidth, int32_t iHeight) {
|
||||||
@@ -1291,9 +1329,9 @@ void InitMcFunc (SMcFunc* pMcFuncs, uint32_t uiCpuFlag) {
|
|||||||
|
|
||||||
#if defined (X86_ASM)
|
#if defined (X86_ASM)
|
||||||
if (uiCpuFlag & WELS_CPU_SSE2) {
|
if (uiCpuFlag & WELS_CPU_SSE2) {
|
||||||
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width9Or17_sse2;
|
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width5Or9Or17_sse2;
|
||||||
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height9Or17_sse2;
|
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height5Or9Or17_sse2;
|
||||||
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width9Or17Height9Or17_sse2;
|
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width5Or9Or17Height5Or9Or17_sse2;
|
||||||
pMcFuncs->pfSampleAveraging = PixelAvg_sse2;
|
pMcFuncs->pfSampleAveraging = PixelAvg_sse2;
|
||||||
pMcFuncs->pMcChromaFunc = McChroma_sse2;
|
pMcFuncs->pMcChromaFunc = McChroma_sse2;
|
||||||
pMcFuncs->pMcLumaFunc = McLuma_sse2;
|
pMcFuncs->pMcLumaFunc = McLuma_sse2;
|
||||||
@@ -1309,9 +1347,9 @@ void InitMcFunc (SMcFunc* pMcFuncs, uint32_t uiCpuFlag) {
|
|||||||
pMcFuncs->pMcLumaFunc = McLuma_neon;
|
pMcFuncs->pMcLumaFunc = McLuma_neon;
|
||||||
pMcFuncs->pMcChromaFunc = McChroma_neon;
|
pMcFuncs->pMcChromaFunc = McChroma_neon;
|
||||||
pMcFuncs->pfSampleAveraging = PixelAvg_neon;
|
pMcFuncs->pfSampleAveraging = PixelAvg_neon;
|
||||||
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width9Or17_neon;//iWidth+1:8/16
|
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width5Or9Or17_neon;//iWidth+1:4/8/16
|
||||||
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height9Or17_neon;//heigh+1:8/16
|
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height5Or9Or17_neon;//heigh+1:4/8/16
|
||||||
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width9Or17Height9Or17_neon;//iWidth+1/heigh+1
|
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width5Or9Or17Height5Or9Or17_neon;//iWidth+1/heigh+1
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_NEON_AARCH64)
|
#if defined(HAVE_NEON_AARCH64)
|
||||||
@@ -1319,9 +1357,9 @@ void InitMcFunc (SMcFunc* pMcFuncs, uint32_t uiCpuFlag) {
|
|||||||
pMcFuncs->pMcLumaFunc = McLuma_AArch64_neon;
|
pMcFuncs->pMcLumaFunc = McLuma_AArch64_neon;
|
||||||
pMcFuncs->pMcChromaFunc = McChroma_AArch64_neon;
|
pMcFuncs->pMcChromaFunc = McChroma_AArch64_neon;
|
||||||
pMcFuncs->pfSampleAveraging = PixelAvg_AArch64_neon;
|
pMcFuncs->pfSampleAveraging = PixelAvg_AArch64_neon;
|
||||||
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width9Or17_AArch64_neon;//iWidth+1:8/16
|
pMcFuncs->pfLumaHalfpelHor = McHorVer20Width5Or9Or17_AArch64_neon;//iWidth+1:4/8/16
|
||||||
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height9Or17_AArch64_neon;//heigh+1:8/16
|
pMcFuncs->pfLumaHalfpelVer = McHorVer02Height5Or9Or17_AArch64_neon;//heigh+1:4/8/16
|
||||||
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width9Or17Height9Or17_AArch64_neon;//iWidth+1/heigh+1
|
pMcFuncs->pfLumaHalfpelCen = McHorVer22Width5Or9Or17Height5Or9Or17_AArch64_neon;//iWidth+1/heigh+1
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace WelsCommon {
|
|||||||
#ifdef MEMORY_CHECK
|
#ifdef MEMORY_CHECK
|
||||||
static FILE* fpMemChkPoint;
|
static FILE* fpMemChkPoint;
|
||||||
static uint32_t nCountRequestNum;
|
static uint32_t nCountRequestNum;
|
||||||
|
static int32_t g_iMemoryLength;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +72,8 @@ void* WelsMalloc (const uint32_t kuiSize, const char* kpTag, const uint32_t kiAl
|
|||||||
uint8_t* pBuf = (uint8_t*) malloc (kiActualRequestedSize);
|
uint8_t* pBuf = (uint8_t*) malloc (kiActualRequestedSize);
|
||||||
#ifdef MEMORY_CHECK
|
#ifdef MEMORY_CHECK
|
||||||
if (fpMemChkPoint == NULL) {
|
if (fpMemChkPoint == NULL) {
|
||||||
m_fpMemChkPoint = fopen ("./enc_mem_check_point.txt", "at+");
|
fpMemChkPoint = fopen ("./enc_mem_check_point.txt", "at+");
|
||||||
m_nCountRequestNum = 0;
|
nCountRequestNum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fpMemChkPoint != NULL) {
|
if (fpMemChkPoint != NULL) {
|
||||||
@@ -101,10 +102,10 @@ void* WelsMalloc (const uint32_t kuiSize, const char* kpTag, const uint32_t kiAl
|
|||||||
void WelsFree (void* pPointer, const char* kpTag) {
|
void WelsFree (void* pPointer, const char* kpTag) {
|
||||||
if (pPointer) {
|
if (pPointer) {
|
||||||
#ifdef MEMORY_CHECK
|
#ifdef MEMORY_CHECK
|
||||||
if (m_fpMemChkPoint != NULL) {
|
if (fpMemChkPoint != NULL) {
|
||||||
if (kpTag != NULL)
|
if (kpTag != NULL)
|
||||||
fprintf (fpMemChkPoint, "WelsFree(), 0x%x - %s: \t%d\t bytes \n", (void*) (* (((void**) pPointer) - 1)), kpTag,
|
fprintf (fpMemChkPoint, "WelsFree(), 0x%x - %s: \t%d\t bytes \n", (void*) (* (((void**) pPointer) - 1)), kpTag,
|
||||||
kiMemoryLength);
|
g_iMemoryLength);
|
||||||
else
|
else
|
||||||
fprintf (fpMemChkPoint, "WelsFree(), 0x%x \n", (void*) (* (((void**) pPointer) - 1)));
|
fprintf (fpMemChkPoint, "WelsFree(), 0x%x \n", (void*) (* (((void**) pPointer) - 1)));
|
||||||
fflush (fpMemChkPoint);
|
fflush (fpMemChkPoint);
|
||||||
@@ -132,19 +133,25 @@ void* CMemoryAlign::WelsMalloc (const uint32_t kuiSize, const char* kpTag) {
|
|||||||
const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
|
const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
|
||||||
int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
|
int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
|
||||||
m_nMemoryUsageInBytes += kiMemoryLength;
|
m_nMemoryUsageInBytes += kiMemoryLength;
|
||||||
|
#ifdef MEMORY_CHECK
|
||||||
|
g_iMemoryLength = kiMemoryLength;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif//MEMORY_MONITOR
|
#endif//MEMORY_MONITOR
|
||||||
return pPointer;
|
return pPointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) {
|
void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) {
|
||||||
if (pPointer) {
|
|
||||||
#ifdef MEMORY_MONITOR
|
#ifdef MEMORY_MONITOR
|
||||||
|
if (pPointer) {
|
||||||
const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
|
const int32_t kiMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof (
|
||||||
int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
|
int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t);
|
||||||
m_nMemoryUsageInBytes -= kiMemoryLength;
|
m_nMemoryUsageInBytes -= kiMemoryLength;
|
||||||
#endif//MEMORY_MONITOR
|
#ifdef MEMORY_CHECK
|
||||||
|
g_iMemoryLength = kiMemoryLength;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif//MEMORY_MONITOR
|
||||||
WelsCommon::WelsFree (pPointer, kpTag);
|
WelsCommon::WelsFree (pPointer, kpTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,20 @@ int32_t WelsSampleSad4x4_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSampl
|
|||||||
return iSadSum;
|
return iSadSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t WelsSampleSad8x4_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) {
|
||||||
|
int32_t iSadSum = 0;
|
||||||
|
iSadSum += WelsSampleSad4x4_c (pSample1, iStride1, pSample2, iStride2);
|
||||||
|
iSadSum += WelsSampleSad4x4_c (pSample1 + 4, iStride1, pSample2 + 4, iStride2);
|
||||||
|
return iSadSum;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t WelsSampleSad4x8_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) {
|
||||||
|
int32_t iSadSum = 0;
|
||||||
|
iSadSum += WelsSampleSad4x4_c (pSample1, iStride1, pSample2, iStride2);
|
||||||
|
iSadSum += WelsSampleSad4x4_c (pSample1 + (iStride1 << 2), iStride1, pSample2 + (iStride2 << 2), iStride2);
|
||||||
|
return iSadSum;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t WelsSampleSad8x8_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) {
|
int32_t WelsSampleSad8x8_c (uint8_t* pSample1, int32_t iStride1, uint8_t* pSample2, int32_t iStride2) {
|
||||||
int32_t iSadSum = 0;
|
int32_t iSadSum = 0;
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
@@ -137,3 +151,15 @@ void WelsSampleSadFour4x4_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSamp
|
|||||||
* (pSad + 2) = WelsSampleSad4x4_c (iSample1, iStride1, (iSample2 - 1), iStride2);
|
* (pSad + 2) = WelsSampleSad4x4_c (iSample1, iStride1, (iSample2 - 1), iStride2);
|
||||||
* (pSad + 3) = WelsSampleSad4x4_c (iSample1, iStride1, (iSample2 + 1), iStride2);
|
* (pSad + 3) = WelsSampleSad4x4_c (iSample1, iStride1, (iSample2 + 1), iStride2);
|
||||||
}
|
}
|
||||||
|
void WelsSampleSadFour8x4_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad) {
|
||||||
|
* (pSad) = WelsSampleSad8x4_c (iSample1, iStride1, (iSample2 - iStride2), iStride2);
|
||||||
|
* (pSad + 1) = WelsSampleSad8x4_c (iSample1, iStride1, (iSample2 + iStride2), iStride2);
|
||||||
|
* (pSad + 2) = WelsSampleSad8x4_c (iSample1, iStride1, (iSample2 - 1), iStride2);
|
||||||
|
* (pSad + 3) = WelsSampleSad8x4_c (iSample1, iStride1, (iSample2 + 1), iStride2);
|
||||||
|
}
|
||||||
|
void WelsSampleSadFour4x8_c (uint8_t* iSample1, int32_t iStride1, uint8_t* iSample2, int32_t iStride2, int32_t* pSad) {
|
||||||
|
* (pSad) = WelsSampleSad4x8_c (iSample1, iStride1, (iSample2 - iStride2), iStride2);
|
||||||
|
* (pSad + 1) = WelsSampleSad4x8_c (iSample1, iStride1, (iSample2 + iStride2), iStride2);
|
||||||
|
* (pSad + 2) = WelsSampleSad4x8_c (iSample1, iStride1, (iSample2 - 1), iStride2);
|
||||||
|
* (pSad + 3) = WelsSampleSad4x8_c (iSample1, iStride1, (iSample2 + 1), iStride2);
|
||||||
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ float WelsCalcPsnr (const void* kpTarPic,
|
|||||||
|
|
||||||
void WelsLog (SLogContext* logCtx, int32_t iLevel, const char* kpFmt, ...) {
|
void WelsLog (SLogContext* logCtx, int32_t iLevel, const char* kpFmt, ...) {
|
||||||
va_list vl;
|
va_list vl;
|
||||||
char pTraceTag[MAX_LOG_SIZE];
|
char pTraceTag[MAX_LOG_SIZE] = {0};
|
||||||
switch (iLevel) {
|
switch (iLevel) {
|
||||||
case WELS_LOG_ERROR:
|
case WELS_LOG_ERROR:
|
||||||
WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Error:", logCtx->pCodecInstance);
|
WelsSnprintf (pTraceTag, MAX_LOG_SIZE, "[OpenH264] this = 0x%p, Error:", logCtx->pCodecInstance);
|
||||||
|
|||||||
@@ -150,6 +150,26 @@ WELS_EXTERN McHorVer20WidthEq4_mmx
|
|||||||
movq %9, %1
|
movq %9, %1
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
|
%macro FILTER_HV_W4 9
|
||||||
|
paddw %1, %6
|
||||||
|
movdqa %8, %3
|
||||||
|
movdqa %7, %2
|
||||||
|
paddw %1, [h264_w0x10_1]
|
||||||
|
paddw %8, %4
|
||||||
|
paddw %7, %5
|
||||||
|
psllw %8, 2
|
||||||
|
psubw %8, %7
|
||||||
|
paddw %1, %8
|
||||||
|
psllw %8, 2
|
||||||
|
paddw %1, %8
|
||||||
|
psraw %1, 5
|
||||||
|
WELS_Zero %8
|
||||||
|
packuswb %1, %8
|
||||||
|
movd %9, %1
|
||||||
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
; Code
|
; Code
|
||||||
;*******************************************************************************
|
;*******************************************************************************
|
||||||
@@ -573,6 +593,140 @@ WELS_EXTERN McHorVer02Height9Or17_sse2
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
;***********************************************************************
|
||||||
|
; void McHorVer02Height5_sse2( const uint8_t *pSrc,
|
||||||
|
; int32_t iSrcStride,
|
||||||
|
; uint8_t *pDst,
|
||||||
|
; int32_t iDstStride,
|
||||||
|
; int32_t iWidth,
|
||||||
|
; int32_t iHeight )
|
||||||
|
;***********************************************************************
|
||||||
|
WELS_EXTERN McHorVer02Height5_sse2
|
||||||
|
%assign push_num 0
|
||||||
|
LOAD_6_PARA
|
||||||
|
PUSH_XMM 8
|
||||||
|
SIGN_EXTENSION r1, r1d
|
||||||
|
SIGN_EXTENSION r3, r3d
|
||||||
|
SIGN_EXTENSION r4, r4d
|
||||||
|
SIGN_EXTENSION r5, r5d
|
||||||
|
|
||||||
|
%ifndef X86_32
|
||||||
|
push r12
|
||||||
|
push r13
|
||||||
|
push r14
|
||||||
|
mov r12, r0
|
||||||
|
mov r13, r2
|
||||||
|
mov r14, r5
|
||||||
|
%endif
|
||||||
|
|
||||||
|
shr r4, 2
|
||||||
|
sub r0, r1
|
||||||
|
sub r0, r1
|
||||||
|
|
||||||
|
.xloop:
|
||||||
|
WELS_Zero xmm7
|
||||||
|
SSE_LOAD_8P xmm0, xmm7, [r0]
|
||||||
|
SSE_LOAD_8P xmm1, xmm7, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm2, xmm7, [r0]
|
||||||
|
SSE_LOAD_8P xmm3, xmm7, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm4, xmm7, [r0]
|
||||||
|
SSE_LOAD_8P xmm5, xmm7, [r0+r1]
|
||||||
|
|
||||||
|
FILTER_HV_W4 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm6, xmm7, [r0]
|
||||||
|
movdqa xmm0,xmm1
|
||||||
|
movdqa xmm1,xmm2
|
||||||
|
movdqa xmm2,xmm3
|
||||||
|
movdqa xmm3,xmm4
|
||||||
|
movdqa xmm4,xmm5
|
||||||
|
movdqa xmm5,xmm6
|
||||||
|
add r2, r3
|
||||||
|
sub r0, r1
|
||||||
|
|
||||||
|
.start:
|
||||||
|
FILTER_HV_W4 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm6, xmm7, [r0]
|
||||||
|
FILTER_HV_W4 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
SSE_LOAD_8P xmm7, xmm0, [r0+r1]
|
||||||
|
FILTER_HV_W4 xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm0, xmm1, [r0]
|
||||||
|
FILTER_HV_W4 xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
SSE_LOAD_8P xmm1, xmm2, [r0+r1]
|
||||||
|
FILTER_HV_W4 xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm2, xmm3, [r0]
|
||||||
|
FILTER_HV_W4 xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
SSE_LOAD_8P xmm3, xmm4, [r0+r1]
|
||||||
|
FILTER_HV_W4 xmm6, xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
SSE_LOAD_8P xmm4, xmm5, [r0]
|
||||||
|
FILTER_HV_W4 xmm7, xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
SSE_LOAD_8P xmm5, xmm6, [r0+r1]
|
||||||
|
jmp near .start
|
||||||
|
|
||||||
|
.x_loop_dec:
|
||||||
|
dec r4
|
||||||
|
jz near .xx_exit
|
||||||
|
%ifdef X86_32
|
||||||
|
mov r0, arg1
|
||||||
|
mov r2, arg3
|
||||||
|
mov r5, arg6
|
||||||
|
%else
|
||||||
|
mov r0, r12
|
||||||
|
mov r2, r13
|
||||||
|
mov r5, r14
|
||||||
|
%endif
|
||||||
|
sub r0, r1
|
||||||
|
sub r0, r1
|
||||||
|
add r0, 4
|
||||||
|
add r2, 4
|
||||||
|
jmp near .xloop
|
||||||
|
|
||||||
|
.xx_exit:
|
||||||
|
%ifndef X86_32
|
||||||
|
pop r14
|
||||||
|
pop r13
|
||||||
|
pop r12
|
||||||
|
%endif
|
||||||
|
POP_XMM
|
||||||
|
LOAD_6_PARA_POP
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
;***********************************************************************
|
;***********************************************************************
|
||||||
; void McHorVer20Width9Or17_sse2( const uint8_t *pSrc,
|
; void McHorVer20Width9Or17_sse2( const uint8_t *pSrc,
|
||||||
; int32_t iSrcStride,
|
; int32_t iSrcStride,
|
||||||
@@ -733,6 +887,80 @@ WELS_EXTERN McHorVer20Width9Or17_sse2
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
;***********************************************************************
|
||||||
|
; void McHorVer20Width5_sse2( const uint8_t *pSrc,
|
||||||
|
; int32_t iSrcStride,
|
||||||
|
; uint8_t *pDst,
|
||||||
|
; int32_t iDstStride,
|
||||||
|
; int32_t iWidth,
|
||||||
|
; int32_t iHeight
|
||||||
|
; );
|
||||||
|
;***********************************************************************
|
||||||
|
WELS_EXTERN McHorVer20Width5_sse2
|
||||||
|
%assign push_num 0
|
||||||
|
LOAD_6_PARA
|
||||||
|
PUSH_XMM 8
|
||||||
|
SIGN_EXTENSION r1, r1d
|
||||||
|
SIGN_EXTENSION r3, r3d
|
||||||
|
SIGN_EXTENSION r4, r4d
|
||||||
|
SIGN_EXTENSION r5, r5d
|
||||||
|
sub r0, 2
|
||||||
|
pxor xmm7, xmm7
|
||||||
|
|
||||||
|
.yloop_width_5:
|
||||||
|
movq xmm0, [r0]
|
||||||
|
punpcklbw xmm0, xmm7
|
||||||
|
movq xmm1, [r0+5]
|
||||||
|
punpcklbw xmm1, xmm7
|
||||||
|
movq xmm2, [r0+1]
|
||||||
|
punpcklbw xmm2, xmm7
|
||||||
|
movq xmm3, [r0+4]
|
||||||
|
punpcklbw xmm3, xmm7
|
||||||
|
movq xmm4, [r0+2]
|
||||||
|
punpcklbw xmm4, xmm7
|
||||||
|
movq xmm5, [r0+3]
|
||||||
|
punpcklbw xmm5, xmm7
|
||||||
|
|
||||||
|
movdqa xmm7, xmm2
|
||||||
|
paddw xmm7, xmm3
|
||||||
|
movdqa xmm6, xmm4
|
||||||
|
paddw xmm6, xmm5
|
||||||
|
psllw xmm6, 2
|
||||||
|
psubw xmm6, xmm7
|
||||||
|
paddw xmm0, xmm1
|
||||||
|
paddw xmm0, xmm6
|
||||||
|
psllw xmm6, 2
|
||||||
|
paddw xmm0, xmm6
|
||||||
|
paddw xmm0, [h264_w0x10_1]
|
||||||
|
psraw xmm0, 5
|
||||||
|
packuswb xmm0, xmm0
|
||||||
|
movd [r2], xmm0
|
||||||
|
|
||||||
|
pxor xmm7, xmm7
|
||||||
|
movq xmm0, [r0+6]
|
||||||
|
punpcklbw xmm0, xmm7
|
||||||
|
|
||||||
|
paddw xmm4, xmm1
|
||||||
|
paddw xmm5, xmm3
|
||||||
|
psllw xmm5, 2
|
||||||
|
psubw xmm5, xmm4
|
||||||
|
paddw xmm2, xmm0
|
||||||
|
paddw xmm2, xmm5
|
||||||
|
psllw xmm5, 2
|
||||||
|
paddw xmm2, xmm5
|
||||||
|
paddw xmm2, [h264_w0x10_1]
|
||||||
|
psraw xmm2, 5
|
||||||
|
packuswb xmm2, xmm2
|
||||||
|
movd [r2+1], xmm2
|
||||||
|
|
||||||
|
add r0, r1
|
||||||
|
add r2, r3
|
||||||
|
dec r5
|
||||||
|
jnz .yloop_width_5
|
||||||
|
POP_XMM
|
||||||
|
LOAD_6_PARA_POP
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
;***********************************************************************
|
;***********************************************************************
|
||||||
;void McHorVer22HorFirst_sse2
|
;void McHorVer22HorFirst_sse2
|
||||||
@@ -1162,3 +1390,359 @@ WELS_EXTERN McHorVer22Width8VerLastUnAlign_sse2
|
|||||||
POP_XMM
|
POP_XMM
|
||||||
LOAD_6_PARA_POP
|
LOAD_6_PARA_POP
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
;***********************************************************************
|
||||||
|
;void McHorVer22Width5HorFirst_sse2
|
||||||
|
; (const uint8_t *pSrc,
|
||||||
|
; int32_t iSrcStride,
|
||||||
|
; uint8_t * pTap,
|
||||||
|
; int32_t iTapStride,
|
||||||
|
; int32_t iWidth,int32_t iHeight);
|
||||||
|
;***********************************************************************
|
||||||
|
WELS_EXTERN McHorVer22Width5HorFirst_sse2
|
||||||
|
%assign push_num 0
|
||||||
|
LOAD_6_PARA
|
||||||
|
PUSH_XMM 8
|
||||||
|
SIGN_EXTENSION r1, r1d
|
||||||
|
SIGN_EXTENSION r3, r3d
|
||||||
|
SIGN_EXTENSION r4, r4d
|
||||||
|
SIGN_EXTENSION r5, r5d
|
||||||
|
pxor xmm7, xmm7
|
||||||
|
sub r0, r1 ;;;;;;;;need more 5 lines.
|
||||||
|
sub r0, r1
|
||||||
|
|
||||||
|
.yloop_width_5:
|
||||||
|
movq xmm0, [r0]
|
||||||
|
punpcklbw xmm0, xmm7
|
||||||
|
movq xmm1, [r0+5]
|
||||||
|
punpcklbw xmm1, xmm7
|
||||||
|
movq xmm2, [r0+1]
|
||||||
|
punpcklbw xmm2, xmm7
|
||||||
|
movq xmm3, [r0+4]
|
||||||
|
punpcklbw xmm3, xmm7
|
||||||
|
movq xmm4, [r0+2]
|
||||||
|
punpcklbw xmm4, xmm7
|
||||||
|
movq xmm5, [r0+3]
|
||||||
|
punpcklbw xmm5, xmm7
|
||||||
|
|
||||||
|
movdqa xmm7, xmm2
|
||||||
|
paddw xmm7, xmm3
|
||||||
|
movdqa xmm6, xmm4
|
||||||
|
paddw xmm6, xmm5
|
||||||
|
psllw xmm6, 2
|
||||||
|
psubw xmm6, xmm7
|
||||||
|
paddw xmm0, xmm1
|
||||||
|
paddw xmm0, xmm6
|
||||||
|
psllw xmm6, 2
|
||||||
|
paddw xmm0, xmm6
|
||||||
|
movd [r2], xmm0
|
||||||
|
|
||||||
|
pxor xmm7, xmm7
|
||||||
|
movq xmm0, [r0+6]
|
||||||
|
punpcklbw xmm0, xmm7
|
||||||
|
|
||||||
|
paddw xmm4, xmm1
|
||||||
|
paddw xmm5, xmm3
|
||||||
|
psllw xmm5, 2
|
||||||
|
psubw xmm5, xmm4
|
||||||
|
paddw xmm2, xmm0
|
||||||
|
paddw xmm2, xmm5
|
||||||
|
psllw xmm5, 2
|
||||||
|
paddw xmm2, xmm5
|
||||||
|
movq [r2+2], xmm2
|
||||||
|
movhps [r2+2+8], xmm2
|
||||||
|
|
||||||
|
add r0, r1
|
||||||
|
add r2, r3
|
||||||
|
dec r5
|
||||||
|
jnz .yloop_width_5
|
||||||
|
POP_XMM
|
||||||
|
LOAD_6_PARA_POP
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
%macro FILTER_VER_4 9
|
||||||
|
paddw %1, %6
|
||||||
|
movdqa %7, %2
|
||||||
|
movdqa %8, %3
|
||||||
|
|
||||||
|
|
||||||
|
paddw %7, %5
|
||||||
|
paddw %8, %4
|
||||||
|
|
||||||
|
psubw %1, %7
|
||||||
|
psraw %1, 2
|
||||||
|
paddw %1, %8
|
||||||
|
psubw %1, %7
|
||||||
|
psraw %1, 2
|
||||||
|
paddw %8, %1
|
||||||
|
paddw %8, [h264_mc_hc_32]
|
||||||
|
psraw %8, 6
|
||||||
|
packuswb %8, %8
|
||||||
|
movd %9, %8
|
||||||
|
%endmacro
|
||||||
|
|
||||||
|
|
||||||
|
;***********************************************************************
|
||||||
|
;void McHorVer22Width4VerLastAlign_sse2(
|
||||||
|
; const uint8_t *pTap,
|
||||||
|
; int32_t iTapStride,
|
||||||
|
; uint8_t * pDst,
|
||||||
|
; int32_t iDstStride,
|
||||||
|
; int32_t iWidth,
|
||||||
|
; int32_t iHeight);
|
||||||
|
;***********************************************************************
|
||||||
|
|
||||||
|
WELS_EXTERN McHorVer22Width4VerLastAlign_sse2
|
||||||
|
%assign push_num 0
|
||||||
|
LOAD_6_PARA
|
||||||
|
PUSH_XMM 8
|
||||||
|
SIGN_EXTENSION r1, r1d
|
||||||
|
SIGN_EXTENSION r3, r3d
|
||||||
|
SIGN_EXTENSION r4, r4d
|
||||||
|
SIGN_EXTENSION r5, r5d
|
||||||
|
%ifndef X86_32
|
||||||
|
push r12
|
||||||
|
push r13
|
||||||
|
push r14
|
||||||
|
mov r12, r0
|
||||||
|
mov r13, r2
|
||||||
|
mov r14, r5
|
||||||
|
%endif
|
||||||
|
|
||||||
|
shr r4, 2
|
||||||
|
|
||||||
|
.width_loop:
|
||||||
|
movdqa xmm0, [r0]
|
||||||
|
movdqa xmm1, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm2, [r0]
|
||||||
|
movdqa xmm3, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm4, [r0]
|
||||||
|
movdqa xmm5, [r0+r1]
|
||||||
|
|
||||||
|
FILTER_VER_4 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm6, [r0]
|
||||||
|
|
||||||
|
movdqa xmm0, xmm1
|
||||||
|
movdqa xmm1, xmm2
|
||||||
|
movdqa xmm2, xmm3
|
||||||
|
movdqa xmm3, xmm4
|
||||||
|
movdqa xmm4, xmm5
|
||||||
|
movdqa xmm5, xmm6
|
||||||
|
|
||||||
|
add r2, r3
|
||||||
|
sub r0, r1
|
||||||
|
|
||||||
|
.start:
|
||||||
|
FILTER_VER_4 xmm0,xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm6, [r0]
|
||||||
|
FILTER_VER_4 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqa xmm7, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm0, [r0]
|
||||||
|
FILTER_VER_4 xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqa xmm1, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,[r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm2, [r0]
|
||||||
|
FILTER_VER_4 xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqa xmm3, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,[r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqa xmm4, [r0]
|
||||||
|
FILTER_VER_4 xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,xmm6, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqa xmm5, [r0+r1]
|
||||||
|
jmp near .start
|
||||||
|
|
||||||
|
.x_loop_dec:
|
||||||
|
dec r4
|
||||||
|
jz near .exit
|
||||||
|
%ifdef X86_32
|
||||||
|
mov r0, arg1
|
||||||
|
mov r2, arg3
|
||||||
|
mov r5, arg6
|
||||||
|
%else
|
||||||
|
mov r0, r12
|
||||||
|
mov r2, r13
|
||||||
|
mov r5, r14
|
||||||
|
%endif
|
||||||
|
add r0, 8
|
||||||
|
add r2, 4
|
||||||
|
jmp .width_loop
|
||||||
|
|
||||||
|
.exit:
|
||||||
|
%ifndef X86_32
|
||||||
|
pop r14
|
||||||
|
pop r13
|
||||||
|
pop r12
|
||||||
|
%endif
|
||||||
|
POP_XMM
|
||||||
|
LOAD_6_PARA_POP
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
;***********************************************************************
|
||||||
|
;void McHorVer22Width4VerLastUnAlign_sse2(
|
||||||
|
; const uint8_t *pTap,
|
||||||
|
; int32_t iTapStride,
|
||||||
|
; uint8_t * pDst,
|
||||||
|
; int32_t iDstStride,
|
||||||
|
; int32_t iWidth,
|
||||||
|
; int32_t iHeight);
|
||||||
|
;***********************************************************************
|
||||||
|
|
||||||
|
WELS_EXTERN McHorVer22Width4VerLastUnAlign_sse2
|
||||||
|
%assign push_num 0
|
||||||
|
LOAD_6_PARA
|
||||||
|
PUSH_XMM 8
|
||||||
|
SIGN_EXTENSION r1, r1d
|
||||||
|
SIGN_EXTENSION r3, r3d
|
||||||
|
SIGN_EXTENSION r4, r4d
|
||||||
|
SIGN_EXTENSION r5, r5d
|
||||||
|
%ifndef X86_32
|
||||||
|
push r12
|
||||||
|
push r13
|
||||||
|
push r14
|
||||||
|
mov r12, r0
|
||||||
|
mov r13, r2
|
||||||
|
mov r14, r5
|
||||||
|
%endif
|
||||||
|
shr r4, 2
|
||||||
|
|
||||||
|
.width_loop:
|
||||||
|
movdqu xmm0, [r0]
|
||||||
|
movdqu xmm1, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm2, [r0]
|
||||||
|
movdqu xmm3, [r0+r1]
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm4, [r0]
|
||||||
|
movdqu xmm5, [r0+r1]
|
||||||
|
|
||||||
|
FILTER_VER_4 xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm6, [r0]
|
||||||
|
|
||||||
|
movdqa xmm0, xmm1
|
||||||
|
movdqa xmm1, xmm2
|
||||||
|
movdqa xmm2, xmm3
|
||||||
|
movdqa xmm3, xmm4
|
||||||
|
movdqa xmm4, xmm5
|
||||||
|
movdqa xmm5, xmm6
|
||||||
|
|
||||||
|
add r2, r3
|
||||||
|
sub r0, r1
|
||||||
|
|
||||||
|
.start:
|
||||||
|
FILTER_VER_4 xmm0,xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm6, [r0]
|
||||||
|
FILTER_VER_4 xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqu xmm7, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, [r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm0, [r0]
|
||||||
|
FILTER_VER_4 xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqu xmm1, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm4, xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,[r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm2, [r0]
|
||||||
|
FILTER_VER_4 xmm5, xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,[r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqu xmm3, [r0+r1]
|
||||||
|
FILTER_VER_4 xmm6, xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,[r2]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r0, [r0+2*r1]
|
||||||
|
movdqu xmm4, [r0]
|
||||||
|
FILTER_VER_4 xmm7, xmm0, xmm1, xmm2, xmm3,xmm4,xmm5,xmm6, [r2+r3]
|
||||||
|
dec r5
|
||||||
|
jz near .x_loop_dec
|
||||||
|
|
||||||
|
lea r2, [r2+2*r3]
|
||||||
|
movdqu xmm5, [r0+r1]
|
||||||
|
jmp near .start
|
||||||
|
|
||||||
|
.x_loop_dec:
|
||||||
|
dec r4
|
||||||
|
jz near .exit
|
||||||
|
%ifdef X86_32
|
||||||
|
mov r0, arg1
|
||||||
|
mov r2, arg3
|
||||||
|
mov r5, arg6
|
||||||
|
%else
|
||||||
|
mov r0, r12
|
||||||
|
mov r2, r13
|
||||||
|
mov r5, r14
|
||||||
|
%endif
|
||||||
|
add r0, 8
|
||||||
|
add r2, 4
|
||||||
|
jmp .width_loop
|
||||||
|
|
||||||
|
.exit:
|
||||||
|
%ifndef X86_32
|
||||||
|
pop r14
|
||||||
|
pop r13
|
||||||
|
pop r12
|
||||||
|
%endif
|
||||||
|
POP_XMM
|
||||||
|
LOAD_6_PARA_POP
|
||||||
|
ret
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ long CReadConfig::ReadLine (std::string* pVal, const int kiValSize/* = 4*/) {
|
|||||||
bCommentFlag = true;
|
bCommentFlag = true;
|
||||||
if (!bCommentFlag) {
|
if (!bCommentFlag) {
|
||||||
if (kCh == '\t' || kCh == ' ') {
|
if (kCh == '\t' || kCh == ' ') {
|
||||||
if (nTagNum >= kiValSize)
|
if (nTagNum >= kiValSize-1)
|
||||||
break;
|
break;
|
||||||
if (! (*strTags).empty()) {
|
if (! (*strTags).empty()) {
|
||||||
++ nTagNum;
|
++ nTagNum;
|
||||||
|
|||||||
@@ -54,6 +54,13 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#if defined (WINDOWS_PHONE)
|
||||||
|
double g_dDecTime = 0.0;
|
||||||
|
float g_fDecFPS = 0.0;
|
||||||
|
int g_iDecodedFrameNum = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ANDROID_NDK)
|
#if defined(ANDROID_NDK)
|
||||||
#define LOG_TAG "welsdec"
|
#define LOG_TAG "welsdec"
|
||||||
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
||||||
@@ -292,10 +299,16 @@ void H264DecodeInstance (ISVCDecoder* pDecoder, const char* kpH264FileName, cons
|
|||||||
|
|
||||||
dElapsed = iTotal / 1e6;
|
dElapsed = iTotal / 1e6;
|
||||||
fprintf (stderr, "-------------------------------------------------------\n");
|
fprintf (stderr, "-------------------------------------------------------\n");
|
||||||
fprintf (stderr, "iWidth: %d\nheight: %d\nFrames: %d\ndecode time: %f sec\nFPS: %f fps\n",
|
fprintf (stderr, "iWidth:\t\t%d\nheight:\t\t%d\nFrames:\t\t%d\ndecode time:\t%f sec\nFPS:\t\t%f fps\n",
|
||||||
iWidth, iHeight, iFrameCount, dElapsed, (iFrameCount * 1.0) / dElapsed);
|
iWidth, iHeight, iFrameCount, dElapsed, (iFrameCount * 1.0) / dElapsed);
|
||||||
fprintf (stderr, "-------------------------------------------------------\n");
|
fprintf (stderr, "-------------------------------------------------------\n");
|
||||||
|
|
||||||
|
#if defined (WINDOWS_PHONE)
|
||||||
|
g_dDecTime = dElapsed;
|
||||||
|
g_fDecFPS = (iFrameCount * 1.0f) / (float) dElapsed;
|
||||||
|
g_iDecodedFrameNum = iFrameCount;
|
||||||
|
#endif
|
||||||
|
|
||||||
// coverity scan uninitial
|
// coverity scan uninitial
|
||||||
label_exit:
|
label_exit:
|
||||||
if (pBuf) {
|
if (pBuf) {
|
||||||
@@ -316,7 +329,7 @@ label_exit:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(ANDROID_NDK)||defined(APPLE_IOS))
|
#if (defined(ANDROID_NDK)||defined(APPLE_IOS) || defined (WINDOWS_PHONE))
|
||||||
int32_t DecMain (int32_t iArgC, char* pArgV[]) {
|
int32_t DecMain (int32_t iArgC, char* pArgV[]) {
|
||||||
#else
|
#else
|
||||||
int32_t main (int32_t iArgC, char* pArgV[]) {
|
int32_t main (int32_t iArgC, char* pArgV[]) {
|
||||||
|
|||||||
@@ -44,6 +44,12 @@
|
|||||||
#endif//ONLY_ENC_FRAMES_NUM
|
#endif//ONLY_ENC_FRAMES_NUM
|
||||||
#define ONLY_ENC_FRAMES_NUM INT_MAX // 2, INT_MAX // type the num you try to encode here, 2, 10, etc
|
#define ONLY_ENC_FRAMES_NUM INT_MAX // 2, INT_MAX // type the num you try to encode here, 2, 10, etc
|
||||||
|
|
||||||
|
#if defined (WINDOWS_PHONE)
|
||||||
|
float g_fFPS = 0.0;
|
||||||
|
double g_dEncoderTime = 0.0;
|
||||||
|
int g_iEncodedFrame = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (ANDROID_NDK)
|
#if defined (ANDROID_NDK)
|
||||||
#define LOG_TAG "welsenc"
|
#define LOG_TAG "welsenc"
|
||||||
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
#define LOGI(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
||||||
@@ -372,6 +378,7 @@ void PrintHelp() {
|
|||||||
printf (" -sw the source width\n");
|
printf (" -sw the source width\n");
|
||||||
printf (" -sh the source height\n");
|
printf (" -sh the source height\n");
|
||||||
printf (" -frms Number of total frames to be encoded\n");
|
printf (" -frms Number of total frames to be encoded\n");
|
||||||
|
printf (" -frin input frame rate\n");
|
||||||
printf (" -numtl Temporal layer number (default: 1)\n");
|
printf (" -numtl Temporal layer number (default: 1)\n");
|
||||||
printf (" -iper Intra period (default: -1) : must be a power of 2 of GOP size (or -1)\n");
|
printf (" -iper Intra period (default: -1) : must be a power of 2 of GOP size (or -1)\n");
|
||||||
printf (" -nalsize the Maximum NAL size. which should be larger than the each layer slicesize when slice mode equals to SM_DYN_SLICE\n");
|
printf (" -nalsize the Maximum NAL size. which should be larger than the each layer slicesize when slice mode equals to SM_DYN_SLICE\n");
|
||||||
@@ -431,6 +438,9 @@ int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamE
|
|||||||
else if (!strcmp (pCommand, "-frms") && (n < argc))
|
else if (!strcmp (pCommand, "-frms") && (n < argc))
|
||||||
sFileSet.uiFrameToBeCoded = atoi (argv[n++]);
|
sFileSet.uiFrameToBeCoded = atoi (argv[n++]);
|
||||||
|
|
||||||
|
else if (!strcmp (pCommand, "-frin") && (n < argc))
|
||||||
|
pSvcParam.fMaxFrameRate = (float) atof (argv[n++]);
|
||||||
|
|
||||||
else if (!strcmp (pCommand, "-numtl") && (n < argc))
|
else if (!strcmp (pCommand, "-numtl") && (n < argc))
|
||||||
pSvcParam.iTemporalLayerNum = atoi (argv[n++]);
|
pSvcParam.iTemporalLayerNum = atoi (argv[n++]);
|
||||||
|
|
||||||
@@ -616,7 +626,7 @@ int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamE
|
|||||||
int FillSpecificParameters (SEncParamExt& sParam) {
|
int FillSpecificParameters (SEncParamExt& sParam) {
|
||||||
/* Test for temporal, spatial, SNR scalability */
|
/* Test for temporal, spatial, SNR scalability */
|
||||||
sParam.iUsageType = CAMERA_VIDEO_REAL_TIME;
|
sParam.iUsageType = CAMERA_VIDEO_REAL_TIME;
|
||||||
sParam.fMaxFrameRate = 30.0f; // input frame rate
|
sParam.fMaxFrameRate = 60.0f; // input frame rate
|
||||||
sParam.iPicWidth = 1280; // width of picture in samples
|
sParam.iPicWidth = 1280; // width of picture in samples
|
||||||
sParam.iPicHeight = 720; // height of picture in samples
|
sParam.iPicHeight = 720; // height of picture in samples
|
||||||
sParam.iTargetBitrate = 2500000; // target bitrate desired
|
sParam.iTargetBitrate = 2500000; // target bitrate desired
|
||||||
@@ -909,9 +919,14 @@ int ProcessEncoding (ISVCEncoder* pPtrEnc, int argc, char** argv, bool bConfigFi
|
|||||||
|
|
||||||
if (iActualFrameEncodedCount > 0) {
|
if (iActualFrameEncodedCount > 0) {
|
||||||
double dElapsed = iTotal / 1e6;
|
double dElapsed = iTotal / 1e6;
|
||||||
printf ("Width: %d\nHeight: %d\nFrames: %d\nencode time: %f sec\nFPS: %f fps\n",
|
printf ("Width:\t\t%d\nHeight:\t\t%d\nFrames:\t\t%d\nencode time:\t%f sec\nFPS:\t\t%f fps\n",
|
||||||
sSvcParam.iPicWidth, sSvcParam.iPicHeight,
|
sSvcParam.iPicWidth, sSvcParam.iPicHeight,
|
||||||
iActualFrameEncodedCount, dElapsed, (iActualFrameEncodedCount * 1.0) / dElapsed);
|
iActualFrameEncodedCount, dElapsed, (iActualFrameEncodedCount * 1.0) / dElapsed);
|
||||||
|
#if defined (WINDOWS_PHONE)
|
||||||
|
g_fFPS = (iActualFrameEncodedCount * 1.0f) / (float) dElapsed;
|
||||||
|
g_dEncoderTime = dElapsed;
|
||||||
|
g_iEncodedFrame = iActualFrameEncodedCount;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
INSIDE_MEM_FREE:
|
INSIDE_MEM_FREE:
|
||||||
if (pFpBs) {
|
if (pFpBs) {
|
||||||
@@ -987,7 +1002,7 @@ void DestroySVCEncHandle (ISVCEncoder* pEncoder) {
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* main:
|
* main:
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#if defined(ANDROID_NDK) || defined(APPLE_IOS)
|
#if defined(ANDROID_NDK) || defined(APPLE_IOS) || defined (WINDOWS_PHONE)
|
||||||
extern "C" int EncMain (int argc, char** argv)
|
extern "C" int EncMain (int argc, char** argv)
|
||||||
#else
|
#else
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
|
|||||||
@@ -31,42 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
#ifdef __APPLE__
|
|
||||||
|
|
||||||
.macro ROW_TRANSFORM_1_STEP
|
|
||||||
// { // input: src_d[0]~[3], output: e_q[0]~[3]; working: $8 $9
|
|
||||||
vaddl.s16 $4, $0, $2 //int32 e[i][0] = src[0] + src[2];
|
|
||||||
vsubl.s16 $5, $0, $2 //int32 e[i][1] = src[0] - src[2];
|
|
||||||
vshr.s16 $8, $1, #1
|
|
||||||
vshr.s16 $9, $3, #1
|
|
||||||
vsubl.s16 $6, $8, $3 //int32 e[i][2] = (src[1]>>1)-src[3];
|
|
||||||
vaddl.s16 $7, $1, $9 //int32 e[i][3] = src[1] + (src[3]>>1);
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro TRANSFORM_4BYTES // both row & col transform used
|
|
||||||
// { // output: f_q[0]~[3], input: e_q[0]~[3];
|
|
||||||
vadd.s32 $0, $4, $7 //int16 f[i][0] = e[i][0] + e[i][3];
|
|
||||||
vadd.s32 $1, $5, $6 //int16 f[i][1] = e[i][1] + e[i][2];
|
|
||||||
vsub.s32 $2, $5, $6 //int16 f[i][2] = e[i][1] - e[i][2];
|
|
||||||
vsub.s32 $3, $4, $7 //int16 f[i][3] = e[i][0] - e[i][3];
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro COL_TRANSFORM_1_STEP
|
|
||||||
// { // input: src_q[0]~[3], output: e_q[0]~[3];
|
|
||||||
vadd.s32 $4, $0, $2 //int32 e[0][j] = f[0][j] + f[2][j];
|
|
||||||
vsub.s32 $5, $0, $2 //int32 e[1][j] = f[0][j] - f[2][j];
|
|
||||||
vshr.s32 $6, $1, #1
|
|
||||||
vshr.s32 $7, $3, #1
|
|
||||||
vsub.s32 $6, $6, $3 //int32 e[2][j] = (f[1][j]>>1) - f[3][j];
|
|
||||||
vadd.s32 $7, $1, $7 //int32 e[3][j] = f[1][j] + (f[3][j]>>1);
|
|
||||||
// }
|
|
||||||
.endm
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
.macro ROW_TRANSFORM_1_STEP arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
.macro ROW_TRANSFORM_1_STEP arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
|
||||||
// { // input: src_d[0]~[3], output: e_q[0]~[3]; working: $8 $9
|
// { // input: src_d[0]~[3], output: e_q[0]~[3]; working: $8 $9
|
||||||
@@ -98,7 +63,6 @@
|
|||||||
vadd.s32 \arg7, \arg1, \arg7 //int32 e[3][j] = f[1][j] + (f[3][j]>>1);
|
vadd.s32 \arg7, \arg1, \arg7 //int32 e[3][j] = f[1][j] + (f[3][j]>>1);
|
||||||
// }
|
// }
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
// uint8_t *pred, const int32_t stride, int16_t *rs
|
// uint8_t *pred, const int32_t stride, int16_t *rs
|
||||||
WELS_ASM_FUNC_BEGIN IdctResAddPred_neon
|
WELS_ASM_FUNC_BEGIN IdctResAddPred_neon
|
||||||
|
|||||||
@@ -32,22 +32,8 @@
|
|||||||
|
|
||||||
#ifdef HAVE_NEON
|
#ifdef HAVE_NEON
|
||||||
//Global macro
|
//Global macro
|
||||||
.text
|
|
||||||
#include "arm_arch_common_macro.S"
|
#include "arm_arch_common_macro.S"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
//Global macro
|
|
||||||
.macro GET_8BYTE_DATA
|
|
||||||
vld1.8 {$0[0]}, [$1], $2
|
|
||||||
vld1.8 {$0[1]}, [$1], $2
|
|
||||||
vld1.8 {$0[2]}, [$1], $2
|
|
||||||
vld1.8 {$0[3]}, [$1], $2
|
|
||||||
vld1.8 {$0[4]}, [$1], $2
|
|
||||||
vld1.8 {$0[5]}, [$1], $2
|
|
||||||
vld1.8 {$0[6]}, [$1], $2
|
|
||||||
vld1.8 {$0[7]}, [$1], $2
|
|
||||||
.endmacro
|
|
||||||
#else
|
|
||||||
//Global macro
|
//Global macro
|
||||||
.macro GET_8BYTE_DATA arg0, arg1, arg2
|
.macro GET_8BYTE_DATA arg0, arg1, arg2
|
||||||
vld1.8 {\arg0[0]}, [\arg1], \arg2
|
vld1.8 {\arg0[0]}, [\arg1], \arg2
|
||||||
@@ -59,7 +45,6 @@
|
|||||||
vld1.8 {\arg0[6]}, [\arg1], \arg2
|
vld1.8 {\arg0[6]}, [\arg1], \arg2
|
||||||
vld1.8 {\arg0[7]}, [\arg1], \arg2
|
vld1.8 {\arg0[7]}, [\arg1], \arg2
|
||||||
.endm
|
.endm
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
WELS_ASM_FUNC_BEGIN WelsDecoderI16x16LumaPredV_neon
|
WELS_ASM_FUNC_BEGIN WelsDecoderI16x16LumaPredV_neon
|
||||||
|
|||||||