mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
1f162027b6
This updates our in-tree copy of libvpx to match the 1.2.0 git tag. All but one of the patches we were carrying are in this upstream version. Our update.sh script should copy the new files needed but will not remove the old ones for you. Runtime cpu detection was rewritten upstream. We now generate per-platform headers for this and include the correct one from a vpx_rtcd.h wrapper like we were already doing for vpx_config.h This revision includes improved assembly optimizations and should be faster on all platforms. Includes work by Jan Gerber and Ralph Giles. --HG-- rename : media/libvpx/vp8/common/arm/neon/save_neon_reg.asm => media/libvpx/vp8/common/arm/neon/save_reg_neon.asm rename : media/libvpx/vp8/common/arm/armv6/vp8_mse16x16_armv6.asm => media/libvpx/vp8/encoder/arm/armv6/vp8_mse16x16_armv6.asm rename : media/libvpx/vp8/common/arm/neon/vp8_mse16x16_neon.asm => media/libvpx/vp8/encoder/arm/neon/vp8_mse16x16_neon.asm rename : media/libvpx/vp8/encoder/x86/x86_csystemdependent.c => media/libvpx/vp8/encoder/x86/vp8_enc_stubs_mmx.c rename : media/libvpx/vpx_config_arm-linux-gcc.c => media/libvpx/vpx_config_armv7-android-gcc.c rename : media/libvpx/vpx_config_arm-linux-gcc.h => media/libvpx/vpx_config_armv7-android-gcc.h
67 lines
2.3 KiB
C
67 lines
2.3 KiB
C
/*
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
|
|
#include "segmentation.h"
|
|
#include "vpx_mem/vpx_mem.h"
|
|
|
|
void vp8_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm, MACROBLOCK *x)
|
|
{
|
|
int mb_row, mb_col;
|
|
|
|
MODE_INFO *this_mb_mode_info = cm->mi;
|
|
|
|
x->gf_active_ptr = (signed char *)cpi->gf_active_flags;
|
|
|
|
if ((cm->frame_type == KEY_FRAME) || (cm->refresh_golden_frame))
|
|
{
|
|
/* Reset Gf useage monitors */
|
|
vpx_memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
|
cpi->gf_active_count = cm->mb_rows * cm->mb_cols;
|
|
}
|
|
else
|
|
{
|
|
/* for each macroblock row in image */
|
|
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++)
|
|
{
|
|
/* for each macroblock col in image */
|
|
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
|
|
{
|
|
|
|
/* If using golden then set GF active flag if not already set.
|
|
* If using last frame 0,0 mode then leave flag as it is
|
|
* else if using non 0,0 motion or intra modes then clear
|
|
* flag if it is currently set
|
|
*/
|
|
if ((this_mb_mode_info->mbmi.ref_frame == GOLDEN_FRAME) || (this_mb_mode_info->mbmi.ref_frame == ALTREF_FRAME))
|
|
{
|
|
if (*(x->gf_active_ptr) == 0)
|
|
{
|
|
*(x->gf_active_ptr) = 1;
|
|
cpi->gf_active_count ++;
|
|
}
|
|
}
|
|
else if ((this_mb_mode_info->mbmi.mode != ZEROMV) && *(x->gf_active_ptr))
|
|
{
|
|
*(x->gf_active_ptr) = 0;
|
|
cpi->gf_active_count--;
|
|
}
|
|
|
|
x->gf_active_ptr++; /* Step onto next entry */
|
|
this_mb_mode_info++; /* skip to next mb */
|
|
|
|
}
|
|
|
|
/* this is to account for the border */
|
|
this_mb_mode_info++;
|
|
}
|
|
}
|
|
}
|