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
8d6eaec1
Commit
8d6eaec1
authored
Oct 24, 2016
by
Jingning Han
Committed by
Gerrit Code Review
Oct 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Refactor av1_predict_intra_block tx_size interface" into nextgenv2
parents
9b040645
c4c99da9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
23 deletions
+20
-23
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+2
-4
av1/common/reconintra.c
av1/common/reconintra.c
+4
-8
av1/common/reconintra.h
av1/common/reconintra.h
+1
-1
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+1
-1
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+2
-4
av1/encoder/firstpass.c
av1/encoder/firstpass.c
+3
-0
av1/encoder/mbgraph.c
av1/encoder/mbgraph.c
+1
-1
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+6
-4
No files found.
av1/common/onyxc_int.h
View file @
8d6eaec1
...
...
@@ -527,14 +527,12 @@ static INLINE void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh, int bwl,
int
bhl
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_MB_PLANE
;
i
++
)
{
xd
->
plane
[
i
].
width
=
block_size_wide
[
xd
->
mi
[
0
]
->
mbmi
.
sb_type
]
>>
xd
->
plane
[
i
].
subsampling_x
;
xd
->
plane
[
i
].
height
=
block_size_high
[
xd
->
mi
[
0
]
->
mbmi
.
sb_type
]
>>
xd
->
plane
[
i
].
subsampling_y
;
xd
->
plane
[
i
].
n4_w
=
(
bw
<<
1
)
>>
xd
->
plane
[
i
].
subsampling_x
;
xd
->
plane
[
i
].
n4_h
=
(
bh
<<
1
)
>>
xd
->
plane
[
i
].
subsampling_y
;
xd
->
plane
[
i
].
n4_wl
=
bwl
-
xd
->
plane
[
i
].
subsampling_x
;
xd
->
plane
[
i
].
n4_hl
=
bhl
-
xd
->
plane
[
i
].
subsampling_y
;
xd
->
plane
[
i
].
width
=
xd
->
plane
[
i
].
n4_w
*
4
;
xd
->
plane
[
i
].
height
=
xd
->
plane
[
i
].
n4_h
*
4
;
}
}
...
...
av1/common/reconintra.c
View file @
8d6eaec1
...
...
@@ -1507,25 +1507,21 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
}
}
void
av1_predict_intra_block
(
const
MACROBLOCKD
*
xd
,
int
bwl_in
,
int
bhl_in
,
void
av1_predict_intra_block
(
const
MACROBLOCKD
*
xd
,
int
wpx
,
int
hpx
,
TX_SIZE
tx_size
,
PREDICTION_MODE
mode
,
const
uint8_t
*
ref
,
int
ref_stride
,
uint8_t
*
dst
,
int
dst_stride
,
int
col_off
,
int
row_off
,
int
plane
)
{
const
BLOCK_SIZE
bsize
=
xd
->
mi
[
0
]
->
mbmi
.
sb_type
;
const
struct
macroblockd_plane
*
const
pd
=
&
xd
->
plane
[
plane
];
const
int
txw
=
num_4x4_blocks_wide_txsize_lookup
[
tx_size
];
const
int
txh
=
num_4x4_blocks_high_txsize_lookup
[
tx_size
];
const
int
txw
=
tx_size_wide_unit
[
tx_size
];
const
int
txh
=
tx_size_high_unit
[
tx_size
];
const
int
have_top
=
row_off
||
xd
->
up_available
;
const
int
have_left
=
col_off
||
xd
->
left_available
;
const
int
x
=
col_off
*
4
;
const
int
y
=
row_off
*
4
;
const
int
bw
=
pd
->
subsampling_x
?
1
<<
bwl_in
:
AOMMAX
(
2
,
1
<<
bwl_in
);
const
int
bh
=
pd
->
subsampling_y
?
1
<<
bhl_in
:
AOMMAX
(
2
,
1
<<
bhl_in
);
const
int
mi_row
=
-
xd
->
mb_to_top_edge
>>
(
3
+
MI_SIZE_LOG2
);
const
int
mi_col
=
-
xd
->
mb_to_left_edge
>>
(
3
+
MI_SIZE_LOG2
);
const
int
wpx
=
4
*
bw
;
const
int
hpx
=
4
*
bh
;
const
int
txwpx
=
4
*
txw
;
const
int
txhpx
=
4
*
txh
;
// Distance between the right edge of this prediction block to
...
...
@@ -1554,7 +1550,7 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, int bhl_in,
#if CONFIG_PALETTE
if
(
xd
->
mi
[
0
]
->
mbmi
.
palette_mode_info
.
palette_size
[
plane
!=
0
]
>
0
)
{
const
int
bs
=
4
*
num_4x4_blocks_wide_txsize_lookup
[
tx_size
];
const
int
stride
=
4
*
(
1
<<
bwl_in
)
;
const
int
stride
=
wpx
;
int
r
,
c
;
uint8_t
*
map
=
NULL
;
#if CONFIG_AOM_HIGHBITDEPTH
...
...
av1/common/reconintra.h
View file @
8d6eaec1
...
...
@@ -21,7 +21,7 @@ extern "C" {
void
av1_init_intra_predictors
(
void
);
void
av1_predict_intra_block
(
const
MACROBLOCKD
*
xd
,
int
bw
l_in
,
int
bhl_in
,
void
av1_predict_intra_block
(
const
MACROBLOCKD
*
xd
,
int
bw
,
int
bh
,
TX_SIZE
tx_size
,
PREDICTION_MODE
mode
,
const
uint8_t
*
ref
,
int
ref_stride
,
uint8_t
*
dst
,
int
dst_stride
,
int
aoff
,
int
loff
,
int
plane
);
...
...
av1/decoder/decodeframe.c
View file @
8d6eaec1
...
...
@@ -293,7 +293,7 @@ static void predict_and_reconstruct_intra_block(AV1_COMMON *cm,
if
(
mbmi
->
sb_type
<
BLOCK_8X8
)
if
(
plane
==
0
)
mode
=
xd
->
mi
[
0
]
->
bmi
[(
row
<<
1
)
+
col
].
as_mode
;
av1_predict_intra_block
(
xd
,
pd
->
n4_wl
,
pd
->
n4_hl
,
tx_size
,
mode
,
dst
,
av1_predict_intra_block
(
xd
,
pd
->
width
,
pd
->
height
,
tx_size
,
mode
,
dst
,
pd
->
dst
.
stride
,
dst
,
pd
->
dst
.
stride
,
col
,
row
,
plane
);
if
(
!
mbmi
->
skip
)
{
...
...
av1/encoder/encodemb.c
View file @
8d6eaec1
...
...
@@ -1068,7 +1068,6 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
const
TX_TYPE
tx_type
=
get_tx_type
(
plane_type
,
xd
,
block
,
tx_size
);
PREDICTION_MODE
mode
;
const
int
bwl
=
b_width_log2_lookup
[
plane_bsize
];
const
int
bhl
=
b_height_log2_lookup
[
plane_bsize
];
const
int
diff_stride
=
4
*
(
1
<<
bwl
);
uint8_t
*
src
,
*
dst
;
int16_t
*
src_diff
;
...
...
@@ -1087,10 +1086,9 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col,
dst
=
&
pd
->
dst
.
buf
[
4
*
(
blk_row
*
dst_stride
+
blk_col
)];
src
=
&
p
->
src
.
buf
[
4
*
(
blk_row
*
src_stride
+
blk_col
)];
src_diff
=
&
p
->
src_diff
[
4
*
(
blk_row
*
diff_stride
+
blk_col
)];
mode
=
plane
==
0
?
get_y_mode
(
xd
->
mi
[
0
],
block
)
:
mbmi
->
uv_mode
;
av1_predict_intra_block
(
xd
,
bwl
,
bhl
,
tx_size
,
mode
,
dst
,
dst_stri
de
,
dst
,
dst_stride
,
blk_col
,
blk_row
,
plane
);
av1_predict_intra_block
(
xd
,
pd
->
width
,
pd
->
height
,
tx_size
,
mo
de
,
dst
,
dst_stride
,
dst
,
dst_stride
,
blk_col
,
blk_row
,
plane
);
#if CONFIG_AOM_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
aom_highbd_subtract_block
(
tx1d_height
,
tx1d_width
,
src_diff
,
diff_stride
,
...
...
av1/encoder/firstpass.c
View file @
8d6eaec1
...
...
@@ -579,6 +579,9 @@ void av1_first_pass(AV1_COMP *cpi, const struct lookahead_entry *source) {
set_mi_row_col
(
xd
,
&
tile
,
mb_row
<<
1
,
num_8x8_blocks_high_lookup
[
bsize
],
mb_col
<<
1
,
num_8x8_blocks_wide_lookup
[
bsize
],
cm
->
mi_rows
,
cm
->
mi_cols
);
set_plane_n4
(
xd
,
num_8x8_blocks_wide_lookup
[
bsize
],
num_8x8_blocks_high_lookup
[
bsize
],
mi_width_log2_lookup
[
bsize
],
mi_height_log2_lookup
[
bsize
]);
// Do intra 16x16 prediction.
xd
->
mi
[
0
]
->
mbmi
.
segment_id
=
0
;
...
...
av1/encoder/mbgraph.c
View file @
8d6eaec1
...
...
@@ -149,7 +149,7 @@ static int find_best_16x16_intra(AV1_COMP *cpi, PREDICTION_MODE *pbest_mode) {
unsigned
int
err
;
xd
->
mi
[
0
]
->
mbmi
.
mode
=
mode
;
av1_predict_intra_block
(
xd
,
2
,
2
,
TX_16X16
,
mode
,
x
->
plane
[
0
].
src
.
buf
,
av1_predict_intra_block
(
xd
,
16
,
16
,
TX_16X16
,
mode
,
x
->
plane
[
0
].
src
.
buf
,
x
->
plane
[
0
].
src
.
stride
,
xd
->
plane
[
0
].
dst
.
buf
,
xd
->
plane
[
0
].
dst
.
stride
,
0
,
0
,
0
);
err
=
aom_sad16x16
(
x
->
plane
[
0
].
src
.
buf
,
x
->
plane
[
0
].
src
.
stride
,
...
...
av1/encoder/rdopt.c
View file @
8d6eaec1
...
...
@@ -1944,8 +1944,9 @@ static int64_t rd_pick_intra4x4block(
int16_t *const src_diff =
av1_raster_block_offset_int16(BLOCK_8X8, block, p->src_diff);
xd->mi[0]->bmi[block].as_mode = mode;
av1_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst,
dst_stride, col + idx, row + idy, 0);
av1_predict_intra_block(xd, pd->width, pd->height, TX_4X4, mode, dst,
dst_stride, dst, dst_stride, col + idx,
row + idy, 0);
aom_highbd_subtract_block(4, 4, src_diff, 8, src, src_stride, dst,
dst_stride, xd->bd);
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
...
...
@@ -2064,8 +2065,9 @@ static int64_t rd_pick_intra4x4block(
int16_t *const src_diff =
av1_raster_block_offset_int16(BLOCK_8X8, block, p->src_diff);
xd->mi[0]->bmi[block].as_mode = mode;
av1_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst,
dst_stride, col + idx, row + idy, 0);
av1_predict_intra_block(xd, pd->width, pd->height, TX_4X4, mode, dst,
dst_stride, dst, dst_stride, col + idx,
row + idy, 0);
aom_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride);
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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