Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
ff4f1c4b
Commit
ff4f1c4b
authored
Nov 19, 2013
by
Jim Bankoski
Committed by
Gerrit Code Review
Nov 19, 2013
Browse files
scan order / neighbors converted to lookup
Change-Id: I64b189dfeee1cf3e90134a1a93497072f3361e5e
parent
5b3a8563
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_scan.c
View file @
ff4f1c4b
...
...
@@ -266,6 +266,62 @@ DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_16x16[256]);
DECLARE_ALIGNED
(
16
,
int16_t
,
vp9_default_iscan_16x16
[
256
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
vp9_default_iscan_32x32
[
1024
]);
const
scan_order
inter_scan_orders
[
TX_SIZES
]
=
{
{
vp9_default_scan_4x4
,
vp9_default_scan_4x4_neighbors
},
// NEWMV
{
vp9_default_scan_8x8
,
vp9_default_scan_8x8_neighbors
},
// NEWMV
{
vp9_default_scan_16x16
,
vp9_default_scan_16x16_neighbors
},
// NEWMV
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// NEWMV
};
const
scan_order
intra_scan_orders
[
TX_SIZES
][
INTRA_MODES
]
=
{
{
// 4X4
{
vp9_default_scan_4x4
,
vp9_default_scan_4x4_neighbors
},
// DC
{
vp9_row_scan_4x4
,
vp9_row_scan_4x4_neighbors
},
// V
{
vp9_col_scan_4x4
,
vp9_col_scan_4x4_neighbors
},
// H
{
vp9_default_scan_4x4
,
vp9_default_scan_4x4_neighbors
},
// D45
{
vp9_default_scan_4x4
,
vp9_default_scan_4x4_neighbors
},
// D135
{
vp9_row_scan_4x4
,
vp9_row_scan_4x4_neighbors
},
// D117
{
vp9_col_scan_4x4
,
vp9_col_scan_4x4_neighbors
},
// D153
{
vp9_col_scan_4x4
,
vp9_col_scan_4x4_neighbors
},
// D207
{
vp9_row_scan_4x4
,
vp9_row_scan_4x4_neighbors
},
// D63
{
vp9_default_scan_4x4
,
vp9_default_scan_4x4_neighbors
},
// TM
},
{
// 8x8
{
vp9_default_scan_8x8
,
vp9_default_scan_8x8_neighbors
},
// DC
{
vp9_row_scan_8x8
,
vp9_row_scan_8x8_neighbors
},
// V
{
vp9_col_scan_8x8
,
vp9_col_scan_8x8_neighbors
},
// H
{
vp9_default_scan_8x8
,
vp9_default_scan_8x8_neighbors
},
// D45
{
vp9_default_scan_8x8
,
vp9_default_scan_8x8_neighbors
},
// D135
{
vp9_row_scan_8x8
,
vp9_row_scan_8x8_neighbors
},
// D117
{
vp9_col_scan_8x8
,
vp9_col_scan_8x8_neighbors
},
// D153
{
vp9_col_scan_8x8
,
vp9_col_scan_8x8_neighbors
},
// D207
{
vp9_row_scan_8x8
,
vp9_row_scan_8x8_neighbors
},
// D63
{
vp9_default_scan_8x8
,
vp9_default_scan_8x8_neighbors
},
// TM
},
{
// 16x16
{
vp9_default_scan_16x16
,
vp9_default_scan_16x16_neighbors
},
// DC
{
vp9_row_scan_16x16
,
vp9_row_scan_16x16_neighbors
},
// V
{
vp9_col_scan_16x16
,
vp9_col_scan_16x16_neighbors
},
// H
{
vp9_default_scan_16x16
,
vp9_default_scan_16x16_neighbors
},
// D45
{
vp9_default_scan_16x16
,
vp9_default_scan_16x16_neighbors
},
// D135
{
vp9_row_scan_16x16
,
vp9_row_scan_16x16_neighbors
},
// D117
{
vp9_col_scan_16x16
,
vp9_col_scan_16x16_neighbors
},
// D153
{
vp9_col_scan_16x16
,
vp9_col_scan_16x16_neighbors
},
// D207
{
vp9_row_scan_16x16
,
vp9_row_scan_16x16_neighbors
},
// D63
{
vp9_default_scan_16x16
,
vp9_default_scan_16x16_neighbors
},
// TM
},
{
// 32x32
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// DC
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// V
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// H
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D45
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D135
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D117
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D153
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D207
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// D63
{
vp9_default_scan_32x32
,
vp9_default_scan_32x32_neighbors
},
// TM
}
};
static
int
find_in_scan
(
const
int16_t
*
scan
,
int
l
,
int
idx
)
{
int
n
,
l2
=
l
*
l
;
for
(
n
=
0
;
n
<
l2
;
n
++
)
{
...
...
vp9/common/vp9_scan.h
View file @
ff4f1c4b
...
...
@@ -15,6 +15,7 @@
#include
"vpx_ports/mem.h"
#include
"vp9/common/vp9_enums.h"
#include
"vp9/common/vp9_blockd.h"
#define MAX_NEIGHBORS 2
...
...
@@ -67,9 +68,16 @@ extern DECLARE_ALIGNED(16, int16_t,
extern
DECLARE_ALIGNED
(
16
,
int16_t
,
vp9_default_scan_32x32_neighbors
[
1025
*
MAX_NEIGHBORS
]);
void
vp9_init_neighbors
();
typedef
struct
{
const
int16_t
*
scan
;
const
int16_t
*
neighbors
;
}
scan_order
;
extern
const
scan_order
intra_scan_orders
[
TX_SIZES
][
INTRA_MODES
];
extern
const
scan_order
inter_scan_orders
[
TX_SIZES
];
static
INLINE
const
int16_t
*
get_scan_4x4
(
TX_TYPE
tx_type
)
{
switch
(
tx_type
)
{
case
ADST_DCT
:
...
...
vp9/decoder/vp9_detokenize.c
View file @
ff4f1c4b
...
...
@@ -110,8 +110,20 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
const
int16_t
*
scan
,
*
nb
;
const
uint8_t
*
cat6
;
const
uint8_t
*
band_translate
=
get_band_translate
(
tx_size
);
get_scan
(
xd
,
tx_size
,
type
,
block_idx
,
&
scan
,
&
nb
);
const
MODE_INFO
*
const
mi
=
xd
->
mi_8x8
[
0
];
const
MB_MODE_INFO
*
const
mbmi
=
&
mi
->
mbmi
;
scan_order
const
*
so
;
if
(
mbmi
->
ref_frame
[
0
]
>
0
||
type
!=
PLANE_TYPE_Y_WITH_DC
||
xd
->
lossless
)
{
so
=
&
inter_scan_orders
[
tx_size
];
}
else
{
MB_PREDICTION_MODE
mode
=
mbmi
->
mode
;
if
(
mbmi
->
sb_type
<
BLOCK_8X8
)
mode
=
mi
->
bmi
[
block_idx
].
as_mode
;
so
=
&
intra_scan_orders
[
tx_size
][
mode
];
}
scan
=
so
->
scan
;
nb
=
so
->
neighbors
;
while
(
c
<
seg_eob
)
{
int
val
;
if
(
c
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment