mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Refactor inter_clear_cu_unused.
Replaces duplicated code with a for loop.
This commit is contained in:
parent
33208ac9fb
commit
39302b0328
15
src/inter.c
15
src/inter.c
|
@ -395,15 +395,12 @@ void kvz_inter_recon_lcu_bipred(const encoder_state_t * const state, const kvz_p
|
|||
* \param cu coding unit to clear
|
||||
*/
|
||||
static void inter_clear_cu_unused(cu_info_t* cu) {
|
||||
if(!(cu->inter.mv_dir & 1)) {
|
||||
cu->inter.mv[0][0] = 0;
|
||||
cu->inter.mv[0][1] = 0;
|
||||
cu->inter.mv_ref[0] = 255;
|
||||
}
|
||||
if(!(cu->inter.mv_dir & 2)) {
|
||||
cu->inter.mv[1][0] = 0;
|
||||
cu->inter.mv[1][1] = 0;
|
||||
cu->inter.mv_ref[1] = 255;
|
||||
for (unsigned i = 0; i < 2; ++i) {
|
||||
if (cu->inter.mv_dir & (1 << i)) continue;
|
||||
|
||||
cu->inter.mv[i][0] = 0;
|
||||
cu->inter.mv[i][1] = 0;
|
||||
cu->inter.mv_ref[i] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue