Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
dcb6aa8e
Commit
dcb6aa8e
authored
Jul 22, 2014
by
James Zern
Committed by
Gerrit Code Review
Jul 22, 2014
Browse files
Merge "vp9_bitstream.c: cosmetics"
parents
f2f69dd3
de4db2dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_bitstream.c
View file @
dcb6aa8e
...
...
@@ -520,7 +520,7 @@ static void update_coef_probs_common(vp9_writer* const bc, VP9_COMP *cpi,
int
i
,
j
,
k
,
l
,
t
;
switch
(
cpi
->
sf
.
use_fast_coef_updates
)
{
case
TWO_LOOP
:
{
/* dry run to see if there is any u
d
pate at all needed */
/* dry run to see if there is any up
d
ate at all needed */
int
savings
=
0
;
int
update
[
2
]
=
{
0
,
0
};
for
(
i
=
0
;
i
<
PLANE_TYPES
;
++
i
)
{
...
...
@@ -739,7 +739,6 @@ static void encode_quantization(VP9_COMMON *cm,
write_delta_q
(
wb
,
cm
->
uv_ac_delta_q
);
}
static
void
encode_segmentation
(
VP9_COMP
*
cpi
,
struct
vp9_write_bit_buffer
*
wb
)
{
int
i
,
j
;
...
...
@@ -802,7 +801,6 @@ static void encode_segmentation(VP9_COMP *cpi,
}
}
static
void
encode_txfm_probs
(
VP9_COMMON
*
cm
,
vp9_writer
*
w
)
{
// Mode
vp9_write_literal
(
w
,
MIN
(
cm
->
tx_mode
,
ALLOW_32X32
),
2
);
...
...
@@ -890,28 +888,28 @@ static void write_tile_info(VP9_COMMON *cm, struct vp9_write_bit_buffer *wb) {
}
static
int
get_refresh_mask
(
VP9_COMP
*
cpi
)
{
if
(
!
cpi
->
multi_arf_allowed
&&
cpi
->
refresh_golden_frame
&&
cpi
->
rc
.
is_src_frame_alt_ref
&&
!
cpi
->
use_svc
)
{
// Preserve the previously existing golden frame and update the frame in
// the alt ref slot instead. This is highly specific to the use of
// alt-ref as a forward reference, and this needs to be generalized as
// other uses are implemented (like RTC/temporal scaling)
//
// gld_fb_idx and alt_fb_idx need to be swapped for future frames, but
// that happens in vp9_encoder.c:update_reference_frames() so that it can
// be done outside of the recode loop.
return
(
cpi
->
refresh_last_frame
<<
cpi
->
lst_fb_idx
)
|
(
cpi
->
refresh_golden_frame
<<
cpi
->
alt_fb_idx
);
}
else
{
int
arf_idx
=
cpi
->
alt_fb_idx
;
if
((
cpi
->
pass
==
2
)
&&
cpi
->
multi_arf_allowed
)
{
const
GF_GROUP
*
const
gf_group
=
&
cpi
->
twopass
.
gf_group
;
arf_idx
=
gf_group
->
arf_update_idx
[
gf_group
->
index
];
}
return
(
cpi
->
refresh_last_frame
<<
cpi
->
lst_fb_idx
)
|
(
cpi
->
refresh_golden_frame
<<
cpi
->
gld_fb_idx
)
|
(
cpi
->
refresh_alt_ref_frame
<<
arf_idx
);
if
(
!
cpi
->
multi_arf_allowed
&&
cpi
->
refresh_golden_frame
&&
cpi
->
rc
.
is_src_frame_alt_ref
&&
!
cpi
->
use_svc
)
{
// Preserve the previously existing golden frame and update the frame in
// the alt ref slot instead. This is highly specific to the use of
// alt-ref as a forward reference, and this needs to be generalized as
// other uses are implemented (like RTC/temporal scaling)
//
// gld_fb_idx and alt_fb_idx need to be swapped for future frames, but
// that happens in vp9_encoder.c:update_reference_frames() so that it can
// be done outside of the recode loop.
return
(
cpi
->
refresh_last_frame
<<
cpi
->
lst_fb_idx
)
|
(
cpi
->
refresh_golden_frame
<<
cpi
->
alt_fb_idx
);
}
else
{
int
arf_idx
=
cpi
->
alt_fb_idx
;
if
((
cpi
->
pass
==
2
)
&&
cpi
->
multi_arf_allowed
)
{
const
GF_GROUP
*
const
gf_group
=
&
cpi
->
twopass
.
gf_group
;
arf_idx
=
gf_group
->
arf_update_idx
[
gf_group
->
index
];
}
return
(
cpi
->
refresh_last_frame
<<
cpi
->
lst_fb_idx
)
|
(
cpi
->
refresh_golden_frame
<<
cpi
->
gld_fb_idx
)
|
(
cpi
->
refresh_alt_ref_frame
<<
arf_idx
);
}
}
static
size_t
encode_tiles
(
VP9_COMP
*
cpi
,
uint8_t
*
data_ptr
)
{
...
...
@@ -1223,4 +1221,3 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size) {
*
size
=
data
-
dest
;
}
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