Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
2afe7320
Commit
2afe7320
authored
Sep 23, 2015
by
hui su
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add identity transform to ext-tx experiment
ext-tx on derflr: +1.756% (was +1.648) Change-Id: I8a87970fa589e8f5f96db7aa68ec9b6c98e20188
parent
4b7043f8
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
302 additions
and
128 deletions
+302
-128
vp10/common/blockd.h
vp10/common/blockd.h
+1
-0
vp10/common/entropymode.c
vp10/common/entropymode.c
+15
-11
vp10/common/enums.h
vp10/common/enums.h
+2
-0
vp10/common/idct.c
vp10/common/idct.c
+82
-39
vp10/common/scan.c
vp10/common/scan.c
+148
-68
vp10/encoder/encodemb.c
vp10/encoder/encodemb.c
+44
-0
vp10/encoder/rdopt.c
vp10/encoder/rdopt.c
+10
-10
No files found.
vp10/common/blockd.h
View file @
2afe7320
...
...
@@ -249,6 +249,7 @@ static TX_TYPE ext_tx_to_txtype[EXT_TX_TYPES] = {
DST_FLIPADST
,
FLIPADST_DST
,
DST_DST
,
IDTX
,
};
#endif // CONFIG_EXT_TX
...
...
vp10/common/entropymode.c
View file @
2afe7320
...
...
@@ -316,27 +316,31 @@ static const vpx_prob default_switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
#if CONFIG_EXT_TX
const
vpx_tree_index
vp10_ext_tx_tree
[
TREE_SIZE
(
EXT_TX_TYPES
)]
=
{
-
NORM
,
2
,
-
ALT15
,
4
,
6
,
16
,
8
,
10
,
-
ALT16
,
2
-
NORM
,
4
,
-
ALT15
,
6
,
8
,
18
,
10
,
12
,
-
ALT9
,
-
ALT10
,
1
2
,
14
,
1
4
,
16
,
-
ALT1
,
-
ALT2
,
-
ALT4
,
-
ALT5
,
18
,
24
,
2
0
,
22
,
20
,
26
,
2
2
,
24
,
-
ALT11
,
-
ALT12
,
-
ALT13
,
-
ALT14
,
2
6
,
28
,
2
8
,
30
,
-
ALT3
,
-
ALT6
,
-
ALT7
,
-
ALT8
};
static
const
vpx_prob
default_ext_tx_prob
[
EXT_TX_SIZES
][
EXT_TX_TYPES
-
1
]
=
{
{
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
{
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
{
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
{
12
,
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
{
12
,
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
{
12
,
112
,
16
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
},
};
#endif // CONFIG_EXT_TX
...
...
vp10/common/enums.h
View file @
2afe7320
...
...
@@ -107,6 +107,7 @@ typedef enum {
DST_FLIPADST
=
13
,
FLIPADST_DST
=
14
,
DST_DST
=
15
,
IDTX
=
16
,
#endif // CONFIG_EXT_TX
TX_TYPES
,
}
TX_TYPE
;
...
...
@@ -130,6 +131,7 @@ typedef enum {
ALT13
=
13
,
ALT14
=
14
,
ALT15
=
15
,
ALT16
=
16
,
EXT_TX_TYPES
}
EXT_TX_TYPE
;
#endif // CONFIG_EXT_TX
...
...
vp10/common/idct.c
View file @
2afe7320
...
...
@@ -181,6 +181,52 @@ void idst16_c(const tran_low_t *input, tran_low_t *output) {
output
[
15
]
=
WRAPLOW
(
ROUND_POWER_OF_TWO
(
sum
,
(
2
*
DCT_CONST_BITS
)),
8
);
}
static
void
fliplr
(
uint8_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
;
++
i
)
{
for
(
j
=
0
;
j
<
l
/
2
;
++
j
)
{
const
uint8_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[
i
*
stride
+
l
-
1
-
j
];
dest
[
i
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
}
}
static
void
flipud
(
uint8_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
j
=
0
;
j
<
l
;
++
j
)
{
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
const
uint8_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
j
]
=
tmp
;
}
}
}
static
void
fliplrud
(
uint8_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
for
(
j
=
0
;
j
<
l
;
++
j
)
{
const
uint8_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
}
}
// Inverse identiy transform and add.
static
void
inv_idtx_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
int
bs
)
{
int
r
,
c
;
const
int
shift
=
bs
<
32
?
3
:
2
;
for
(
r
=
0
;
r
<
bs
;
++
r
)
{
for
(
c
=
0
;
c
<
bs
;
++
c
)
dest
[
c
]
=
clip_pixel_add
(
dest
[
c
],
input
[
c
]
>>
shift
);
dest
+=
stride
;
input
+=
bs
;
}
}
#if CONFIG_VP9_HIGHBITDEPTH
void
highbd_idst4_c
(
const
tran_low_t
*
input
,
tran_low_t
*
output
,
int
bd
)
{
// {sin(pi/5), sin(pi*2/5)} * sqrt(2/5) * sqrt(2)
...
...
@@ -346,75 +392,54 @@ void highbd_idst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
d69
*
sinvalue_lookup
[
6
]
-
d78
*
sinvalue_lookup
[
7
];
output
[
15
]
=
WRAPLOW
(
ROUND_POWER_OF_TWO
(
sum
,
(
2
*
DCT_CONST_BITS
)),
bd
);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_EXT_TX
#if CONFIG_EXT_TX
void
fliplr
(
uint8_t
*
dest
,
int
stride
,
int
l
)
{
static
void
fliplr16
(
uint16_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
;
++
i
)
{
for
(
j
=
0
;
j
<
l
/
2
;
++
j
)
{
const
uint
8
_t
tmp
=
dest
[
i
*
stride
+
j
];
const
uint
16
_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[
i
*
stride
+
l
-
1
-
j
];
dest
[
i
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
}
}
void
flipud
(
uint8
_t
*
dest
,
int
stride
,
int
l
)
{
static
void
flipud16
(
uint16
_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
j
=
0
;
j
<
l
;
++
j
)
{
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
const
uint
8
_t
tmp
=
dest
[
i
*
stride
+
j
];
const
uint
16
_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
j
]
=
tmp
;
}
}
}
void
fliplrud
(
uint8
_t
*
dest
,
int
stride
,
int
l
)
{
static
void
fliplrud16
(
uint16
_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
for
(
j
=
0
;
j
<
l
;
++
j
)
{
const
uint
8
_t
tmp
=
dest
[
i
*
stride
+
j
];
const
uint
16
_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
}
}
void
fliplr16
(
uint16_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
;
++
i
)
{
for
(
j
=
0
;
j
<
l
/
2
;
++
j
)
{
const
uint16_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[
i
*
stride
+
l
-
1
-
j
];
dest
[
i
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
}
}
void
flipud16
(
uint16_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
j
=
0
;
j
<
l
;
++
j
)
{
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
const
uint16_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
j
]
=
tmp
;
}
}
}
static
void
highbd_inv_idtx_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest8
,
int
stride
,
int
bs
,
int
bd
)
{
int
r
,
c
;
const
int
shift
=
bs
<
32
?
3
:
2
;
uint16_t
*
dest
=
CONVERT_TO_SHORTPTR
(
dest8
);
void
fliplrud16
(
uint16_t
*
dest
,
int
stride
,
int
l
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
l
/
2
;
++
i
)
{
for
(
j
=
0
;
j
<
l
;
++
j
)
{
const
uint16_t
tmp
=
dest
[
i
*
stride
+
j
];
dest
[
i
*
stride
+
j
]
=
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
];
dest
[(
l
-
1
-
i
)
*
stride
+
l
-
1
-
j
]
=
tmp
;
}
for
(
r
=
0
;
r
<
bs
;
++
r
)
{
for
(
c
=
0
;
c
<
bs
;
++
c
)
dest
[
c
]
=
highbd_clip_pixel_add
(
dest
[
c
],
input
[
c
]
>>
shift
,
bd
);
dest
+=
stride
;
input
+=
bs
;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_EXT_TX
void
vp10_iht4x4_16_add_c
(
const
tran_low_t
*
input
,
uint8_t
*
dest
,
int
stride
,
...
...
@@ -679,6 +704,9 @@ void vp10_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
vp10_iht4x4_16_add_c
(
input
,
dest
,
stride
,
DST_ADST
);
fliplr
(
dest
,
stride
,
4
);
break
;
case
IDTX
:
inv_idtx_add_c
(
input
,
dest
,
stride
,
4
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -742,6 +770,9 @@ void vp10_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
vp10_iht8x8_64_add_c
(
input
,
dest
,
stride
,
DST_ADST
);
fliplr
(
dest
,
stride
,
8
);
break
;
case
IDTX
:
inv_idtx_add_c
(
input
,
dest
,
stride
,
8
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -804,6 +835,9 @@ void vp10_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
vp10_iht16x16_256_add_c
(
input
,
dest
,
stride
,
DST_ADST
);
fliplr
(
dest
,
stride
,
16
);
break
;
case
IDTX
:
inv_idtx_add_c
(
input
,
dest
,
stride
,
16
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -1098,6 +1132,9 @@ void vp10_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
vp10_highbd_iht4x4_16_add_c
(
input
,
dest
,
stride
,
DST_ADST
,
bd
);
fliplr16
(
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
4
);
break
;
case
IDTX
:
highbd_inv_idtx_add_c
(
input
,
dest
,
stride
,
4
,
bd
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -1162,6 +1199,9 @@ void vp10_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
vp10_highbd_iht8x8_64_add_c
(
input
,
dest
,
stride
,
DST_ADST
,
bd
);
fliplr16
(
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
8
);
break
;
case
IDTX
:
highbd_inv_idtx_add_c
(
input
,
dest
,
stride
,
8
,
bd
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -1225,6 +1265,9 @@ void vp10_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
vp10_highbd_iht16x16_256_add_c
(
input
,
dest
,
stride
,
DST_ADST
,
bd
);
fliplr16
(
CONVERT_TO_SHORTPTR
(
dest
),
stride
,
16
);
break
;
case
IDTX
:
highbd_inv_idtx_add_c
(
input
,
dest
,
stride
,
16
,
bd
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
vp10/common/scan.c
View file @
2afe7320
...
...
@@ -721,6 +721,7 @@ const scan_order vp10_intra_scan_orders[TX_SIZES][TX_TYPES] = {
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
},
{
// TX_8X8
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
row_scan_8x8
,
vp10_row_iscan_8x8
,
row_scan_8x8_neighbors
},
...
...
@@ -738,40 +739,75 @@ const scan_order vp10_intra_scan_orders[TX_SIZES][TX_TYPES] = {
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
},
{
// TX_16X16
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
row_scan_16x16
,
vp10_row_iscan_16x16
,
row_scan_16x16_neighbors
},
{
col_scan_16x16
,
vp10_col_iscan_16x16
,
col_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
},
{
// TX_32X32
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
}
};
...
...
@@ -793,6 +829,7 @@ const scan_order vp10_inter_scan_orders[TX_SIZES][TX_TYPES] = {
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
{
default_scan_4x4
,
vp10_default_iscan_4x4
,
default_scan_4x4_neighbors
},
},
{
// TX_8X8
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
...
...
@@ -810,40 +847,77 @@ const scan_order vp10_inter_scan_orders[TX_SIZES][TX_TYPES] = {
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
},
},
{
// TX_16X16
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
},
{
// TX_32X32
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
}
};
...
...
@@ -861,15 +935,21 @@ const scan_order vp10_intra_scan_orders[TX_SIZES][TX_TYPES] = {
{
col_scan_8x8
,
vp10_col_iscan_8x8
,
col_scan_8x8_neighbors
},
{
default_scan_8x8
,
vp10_default_iscan_8x8
,
default_scan_8x8_neighbors
}
},
{
// TX_16X16
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
},
{
row_scan_16x16
,
vp10_row_iscan_16x16
,
row_scan_16x16_neighbors
},
{
col_scan_16x16
,
vp10_col_iscan_16x16
,
col_scan_16x16_neighbors
},
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
}
{
default_scan_16x16
,
vp10_default_iscan_16x16
,
default_scan_16x16_neighbors
}
},
{
// TX_32X32
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
{
default_scan_32x32
,
vp10_default_iscan_32x32
,
default_scan_32x32_neighbors
},
}
};
#endif // CONFIG_EXT_TX
vp10/encoder/encodemb.c
View file @
2afe7320
...
...
@@ -385,6 +385,20 @@ static void copy_fliplrud(const int16_t *src, int src_stride, int l,
copy_block
(
src
,
src_stride
,
l
,
dest
,
dest_stride
);
fliplrud
(
dest
,
dest_stride
,
l
);
}
// Forward identity transform.
static
void
fwd_idtx_c
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
int
stride
,
int
bs
)
{
int
r
,
c
;
const
int
shift
=
bs
<
32
?
3
:
2
;
for
(
r
=
0
;
r
<
bs
;
++
r
)
{
for
(
c
=
0
;
c
<
bs
;
++
c
)
coeff
[
c
]
=
src_diff
[
c
]
<<
shift
;
src_diff
+=
stride
;
coeff
+=
bs
;
}
}
#endif // CONFIG_EXT_TX
void
vp10_fwd_txfm_4x4
(
const
int16_t
*
src_diff
,
tran_low_t
*
coeff
,
...
...
@@ -441,6 +455,9 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
4
,
src_diff2
,
4
);
vp10_fht4x4_c
(
src_diff2
,
coeff
,
4
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
4
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -498,6 +515,9 @@ static void fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
8
,
src_diff2
,
8
);
vp10_fht8x8_c
(
src_diff2
,
coeff
,
8
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
8
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -554,6 +574,9 @@ static void fwd_txfm_8x8_1(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
8
,
src_diff2
,
8
);
vp10_fht8x8_c
(
src_diff2
,
coeff
,
8
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
8
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -610,6 +633,9 @@ static void fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
16
,
src_diff2
,
16
);
vp10_fht16x16_c
(
src_diff2
,
coeff
,
16
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
16
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -666,6 +692,9 @@ static void fwd_txfm_16x16_1(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
16
,
src_diff2
,
16
);
vp10_fht16x16_c
(
src_diff2
,
coeff
,
16
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
16
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -765,6 +794,9 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
4
,
src_diff2
,
4
);
vp10_highbd_fht4x4_c
(
src_diff2
,
coeff
,
4
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
4
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -824,6 +856,9 @@ static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
8
,
src_diff2
,
8
);
vp10_highbd_fht8x8_c
(
src_diff2
,
coeff
,
8
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
8
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -882,6 +917,9 @@ static void highbd_fwd_txfm_8x8_1(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
8
,
src_diff2
,
8
);
vp10_highbd_fht8x8_c
(
src_diff2
,
coeff
,
8
,
ADST_DST
);
break
;
case
IDTX
:
fwd_idtx_c
(
src_diff
,
coeff
,
diff_stride
,
8
);
break
;
#endif // CONFIG_EXT_TX
default:
assert
(
0
);
...
...
@@ -940,6 +978,9 @@ static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff,
copy_flipud
(
src_diff
,
diff_stride
,
16
,
src_diff2
,
16
);
vp10_highbd_fht16x16_c
(
src_diff2
,
coeff
,
16
,
ADST_DST
);