Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
f33e01d7
Commit
f33e01d7
authored
Nov 22, 2017
by
Peter de Rivaz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unconditionally use LAST_FRAME for prev_frame.
BUG=aomedia:78 Change-Id: Id85cf22302317d33b593345fd31090a6620f4101
parent
000d196b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+2
-3
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+11
-0
av1/encoder/encodeframe.c
av1/encoder/encodeframe.c
+6
-0
No files found.
av1/common/onyxc_int.h
View file @
f33e01d7
...
...
@@ -662,9 +662,8 @@ static INLINE int frame_might_use_prev_frame_mvs(const AV1_COMMON *cm) {
// Returns 1 if this frame really can use MVs from some previous frame.
static
INLINE
int
frame_can_use_prev_frame_mvs
(
const
AV1_COMMON
*
cm
)
{
return
(
frame_might_use_prev_frame_mvs
(
cm
)
&&
cm
->
last_show_frame
&&
cm
->
prev_frame
&&
!
cm
->
prev_frame
->
intra_only
&&
cm
->
width
==
cm
->
prev_frame
->
width
&&
return
(
frame_might_use_prev_frame_mvs
(
cm
)
&&
cm
->
prev_frame
&&
!
cm
->
prev_frame
->
intra_only
&&
cm
->
width
==
cm
->
prev_frame
->
width
&&
cm
->
height
==
cm
->
prev_frame
->
height
);
}
#endif
...
...
av1/decoder/decodeframe.c
View file @
f33e01d7
...
...
@@ -2973,6 +2973,11 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
else
cm
->
use_ref_frame_mvs
=
0
;
cm
->
prev_frame
=
cm
->
frame_refs
[
LAST_FRAME
-
LAST_FRAME
].
idx
!=
INVALID_IDX
?
&
cm
->
buffer_pool
->
frame_bufs
[
cm
->
frame_refs
[
LAST_FRAME
-
LAST_FRAME
].
idx
]
:
NULL
;
cm
->
use_prev_frame_mvs
=
cm
->
use_ref_frame_mvs
&&
frame_can_use_prev_frame_mvs
(
cm
);
#endif
...
...
@@ -3233,6 +3238,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
if
(
cm
->
use_adapt_scan
==
0
)
av1_init_scan_order
(
cm
);
#endif // CONFIG_ADAPT_SCAN
#if !CONFIG_TEMPMV_SIGNALING
// NOTE(zoeliu): As cm->prev_frame can take neither a frame of
// show_exisiting_frame=1, nor can it take a frame not used as
// a reference, it is probable that by the time it is being
...
...
@@ -3251,6 +3257,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
->
frame_bufs
[
cm
->
frame_refs
[
LAST_FRAME
-
LAST_FRAME
].
idx
]
:
NULL
;
}
#endif
#if CONFIG_TEMPMV_SIGNALING
if
(
cm
->
use_prev_frame_mvs
&&
!
frame_can_use_prev_frame_mvs
(
cm
))
{
...
...
@@ -3429,7 +3436,9 @@ size_t av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
uint8_t
clear_data
[
MAX_AV1_HEADER_SIZE
];
size_t
first_partition_size
;
YV12_BUFFER_CONFIG
*
new_fb
;
#if !CONFIG_TEMPMV_SIGNALING
RefBuffer
*
last_fb_ref_buf
=
&
cm
->
frame_refs
[
LAST_FRAME
-
LAST_FRAME
];
#endif
#if CONFIG_ADAPT_SCAN
av1_deliver_eob_threshold
(
cm
,
xd
);
...
...
@@ -3489,6 +3498,7 @@ size_t av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
cm
->
setup_mi
(
cm
);
#if !CONFIG_TEMPMV_SIGNALING
// NOTE(zoeliu): As cm->prev_frame can take neither a frame of
// show_exisiting_frame=1, nor can it take a frame not used as
// a reference, it is probable that by the time it is being
...
...
@@ -3505,6 +3515,7 @@ size_t av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
?
&
cm
->
buffer_pool
->
frame_bufs
[
last_fb_ref_buf
->
idx
]
:
NULL
;
}
#endif
#if CONFIG_TEMPMV_SIGNALING
if
(
cm
->
use_prev_frame_mvs
&&
!
frame_can_use_prev_frame_mvs
(
cm
))
{
...
...
av1/encoder/encodeframe.c
View file @
f33e01d7
...
...
@@ -4170,6 +4170,11 @@ static void encode_frame_internal(AV1_COMP *cpi) {
av1_initialize_me_consts
(
cpi
,
x
,
cm
->
base_qindex
);
init_encode_frame_mb_context
(
cpi
);
#if CONFIG_TEMPMV_SIGNALING
cm
->
prev_frame
=
last_fb_buf_idx
!=
INVALID_IDX
?
&
cm
->
buffer_pool
->
frame_bufs
[
last_fb_buf_idx
]
:
NULL
;
#else
// NOTE(zoeliu): As cm->prev_frame can take neither a frame of
// show_exisiting_frame=1, nor can it take a frame not used as
// a reference, it is probable that by the time it is being
...
...
@@ -4186,6 +4191,7 @@ static void encode_frame_internal(AV1_COMP *cpi) {
?
&
cm
->
buffer_pool
->
frame_bufs
[
last_fb_buf_idx
]
:
NULL
;
}
#endif
#if CONFIG_TEMPMV_SIGNALING
cm
->
use_prev_frame_mvs
&=
frame_can_use_prev_frame_mvs
(
cm
);
...
...
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