Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
d5a026d6
Commit
d5a026d6
authored
10 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Removing old unused vp9_tapify.py."
parents
138f0be1
7b59014b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/common/vp9_tapify.py
+0
-106
0 additions, 106 deletions
vp9/common/vp9_tapify.py
with
0 additions
and
106 deletions
vp9/common/vp9_tapify.py
deleted
100644 → 0
+
0
−
106
View file @
138f0be1
"""
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
"""
#!/usr/bin/env python
import
sys
,
string
,
os
,
re
,
math
,
numpy
scale
=
2
**
16
def
dist
(
p1
,
p2
):
x1
,
y1
=
p1
x2
,
y2
=
p2
if
x1
==
x2
and
y1
==
y2
:
return
1.0
return
1
/
math
.
sqrt
((
x1
-
x2
)
*
(
x1
-
x2
)
+
(
y1
-
y2
)
*
(
y1
-
y2
))
def
gettaps
(
p
):
def
l
(
b
):
return
int
(
math
.
floor
(
b
))
def
h
(
b
):
return
int
(
math
.
ceil
(
b
))
def
t
(
b
,
p
,
s
):
return
int
((
scale
*
dist
(
b
,
p
)
+
s
/
2
)
/
s
)
r
,
c
=
p
ul
=
[
l
(
r
),
l
(
c
)]
ur
=
[
l
(
r
),
h
(
c
)]
ll
=
[
h
(
r
),
l
(
c
)]
lr
=
[
h
(
r
),
h
(
c
)]
sum
=
dist
(
ul
,
p
)
+
dist
(
ur
,
p
)
+
dist
(
ll
,
p
)
+
dist
(
lr
,
p
)
t4
=
scale
-
t
(
ul
,
p
,
sum
)
-
t
(
ur
,
p
,
sum
)
-
t
(
ll
,
p
,
sum
);
return
[[
ul
,
t
(
ul
,
p
,
sum
)],[
ur
,
t
(
ur
,
p
,
sum
)],
[
ll
,
t
(
ll
,
p
,
sum
)],[
lr
,
t4
]]
def
print_mb_taps
(
angle
,
blocksize
):
theta
=
angle
/
57.2957795
;
affine
=
[[
math
.
cos
(
theta
),
-
math
.
sin
(
theta
)],
[
math
.
sin
(
theta
),
math
.
cos
(
theta
)]]
radius
=
(
float
(
blocksize
)
-
1
)
/
2
print
"
// angle of
"
,
angle
,
"
degrees
"
for
y
in
range
(
blocksize
)
:
for
x
in
range
(
blocksize
)
:
r
,
c
=
numpy
.
dot
(
affine
,[
y
-
radius
,
x
-
radius
])
tps
=
gettaps
([
r
+
radius
,
c
+
radius
])
for
t
in
tps
:
p
,
t
=
t
tr
,
tc
=
p
print
"
%2d, %2d, %5d,
"
%
(
tr
,
tc
,
t
,),
print
"
// %2d,%2d
"
%
(
y
,
x
)
i
=
float
(
sys
.
argv
[
1
])
while
i
<=
float
(
sys
.
argv
[
2
])
:
print_mb_taps
(
i
,
float
(
sys
.
argv
[
4
]))
i
=
i
+
float
(
sys
.
argv
[
3
])
"""
taps = []
pt=dict()
ptr=dict()
for y in range(16) :
for x in range(16) :
r,c = numpy.dot(affine,[y-7.5, x-7.5])
tps = gettaps([r+7.5,c+7.5])
j=0
for tp in tps :
p,i = tp
r,c = p
pt[y,x,j]= [p,i]
try:
ptr[r,j,c].append([y,x])
except:
ptr[r,j,c]=[[y,x]]
j = j+1
for key in sorted(pt.keys()) :
print key,pt[key]
lr = -99
lj = -99
lc = 0
shuf=
""
mask=
""
for r,j,c in sorted(ptr.keys()) :
for y,x in ptr[r,j,c] :
if lr != r or lj != j :
print
"
shuf_
"
+str(lr)+
"
_
"
+str(lj)+
"
_
"
+shuf.ljust(16,
"
0
"
), lc
shuf=
""
lc = 0
for i in range(lc,c-1) :
shuf = shuf +
"
0
"
shuf = shuf + hex(x)[2]
lc =c
break
lr = r
lj = j
# print r,j,c,ptr[r,j,c]
# print
for r,j,c in sorted(ptr.keys()) :
for y,x in ptr[r,j,c] :
print r,j,c,y,x
break
"""
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment