Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(667)

Unified Diff: source/libvpx/vp9/encoder/vp9_temporal_filter.c

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_temporal_filter.h ('k') | source/libvpx/vp9/encoder/vp9_tokenize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/vp9_temporal_filter.c
===================================================================
--- source/libvpx/vp9/encoder/vp9_temporal_filter.c (revision 177019)
+++ source/libvpx/vp9/encoder/vp9_temporal_filter.c (working copy)
@@ -17,7 +17,7 @@
#include "vp9/encoder/vp9_mcomp.h"
#include "vp9/encoder/vp9_firstpass.h"
#include "vp9/encoder/vp9_psnr.h"
-#include "vpx_scale/vpxscale.h"
+#include "vpx_scale/vpx_scale.h"
#include "vp9/common/vp9_extend.h"
#include "vp9/encoder/vp9_ratectrl.h"
#include "vp9/common/vp9_quant_common.h"
@@ -35,19 +35,16 @@
#if VP9_TEMPORAL_ALT_REF
-static void temporal_filter_predictors_mb_c
-(
- MACROBLOCKD *xd,
- unsigned char *y_mb_ptr,
- unsigned char *u_mb_ptr,
- unsigned char *v_mb_ptr,
- int stride,
- int mv_row,
- int mv_col,
- unsigned char *pred
-) {
+static void temporal_filter_predictors_mb_c(MACROBLOCKD *xd,
+ uint8_t *y_mb_ptr,
+ uint8_t *u_mb_ptr,
+ uint8_t *v_mb_ptr,
+ int stride,
+ int mv_row,
+ int mv_col,
+ uint8_t *pred) {
int offset;
- unsigned char *yptr, *uptr, *vptr;
+ uint8_t *yptr, *uptr, *vptr;
int omv_row, omv_col;
// Y
@@ -75,23 +72,20 @@
(omv_col & 15), (omv_row & 15), &pred[256], 8);
xd->subpixel_predict8x8(vptr, stride,
(omv_col & 15), (omv_row & 15), &pred[320], 8);
- }
- else {
+ } else {
vp9_copy_mem8x8(uptr, stride, &pred[256], 8);
vp9_copy_mem8x8(vptr, stride, &pred[320], 8);
}
}
-void vp9_temporal_filter_apply_c
-(
- unsigned char *frame1,
- unsigned int stride,
- unsigned char *frame2,
- unsigned int block_size,
- int strength,
- int filter_weight,
- unsigned int *accumulator,
- unsigned short *count
-) {
+
+void vp9_temporal_filter_apply_c(uint8_t *frame1,
+ unsigned int stride,
+ uint8_t *frame2,
+ unsigned int block_size,
+ int strength,
+ int filter_weight,
+ unsigned int *accumulator,
+ uint16_t *count) {
unsigned int i, j, k;
int modifier;
int byte = 0;
@@ -129,17 +123,13 @@
#if ALT_REF_MC_ENABLED
-static int temporal_filter_find_matching_mb_c
-(
- VP9_COMP *cpi,
- YV12_BUFFER_CONFIG *arf_frame,
- YV12_BUFFER_CONFIG *frame_ptr,
- int mb_offset,
- int error_thresh
-) {
+static int temporal_filter_find_matching_mb_c(VP9_COMP *cpi,
+ YV12_BUFFER_CONFIG *arf_frame,
+ YV12_BUFFER_CONFIG *frame_ptr,
+ int mb_offset,
+ int error_thresh) {
MACROBLOCK *x = &cpi->mb;
int step_param;
- int further_steps;
int sadpb = x->sadperbit16;
int bestsme = INT_MAX;
@@ -149,10 +139,10 @@
int_mv best_ref_mv1_full; /* full-pixel value of best_ref_mv1 */
// Save input state
- unsigned char **base_src = b->base_src;
+ uint8_t **base_src = b->base_src;
int src = b->src;
int src_stride = b->src_stride;
- unsigned char **base_pre = d->base_pre;
+ uint8_t **base_pre = d->base_pre;
int pre = d->pre;
int pre_stride = d->pre_stride;
@@ -173,11 +163,8 @@
if (cpi->Speed < 8) {
step_param = cpi->sf.first_step +
((cpi->Speed > 5) ? 1 : 0);
- further_steps =
- (cpi->sf.max_step_search_steps - 1) - step_param;
} else {
step_param = cpi->sf.first_step + 2;
- further_steps = 0;
}
/*cpi->sf.search_method == HEX*/
@@ -216,13 +203,10 @@
}
#endif
-static void temporal_filter_iterate_c
-(
- VP9_COMP *cpi,
- int frame_count,
- int alt_ref_index,
- int strength
-) {
+static void temporal_filter_iterate_c(VP9_COMP *cpi,
+ int frame_count,
+ int alt_ref_index,
+ int strength) {
int byte;
int frame;
int mb_col, mb_row;
@@ -232,16 +216,16 @@
int mb_y_offset = 0;
int mb_uv_offset = 0;
DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16 * 16 + 8 * 8 + 8 * 8);
- DECLARE_ALIGNED_ARRAY(16, unsigned short, count, 16 * 16 + 8 * 8 + 8 * 8);
+ DECLARE_ALIGNED_ARRAY(16, uint16_t, count, 16 * 16 + 8 * 8 + 8 * 8);
MACROBLOCKD *mbd = &cpi->mb.e_mbd;
YV12_BUFFER_CONFIG *f = cpi->frames[alt_ref_index];
- unsigned char *dst1, *dst2;
- DECLARE_ALIGNED_ARRAY(16, unsigned char, predictor, 16 * 16 + 8 * 8 + 8 * 8);
+ uint8_t *dst1, *dst2;
+ DECLARE_ALIGNED_ARRAY(16, uint8_t, predictor, 16 * 16 + 8 * 8 + 8 * 8);
// Save input state
- unsigned char *y_buffer = mbd->pre.y_buffer;
- unsigned char *u_buffer = mbd->pre.u_buffer;
- unsigned char *v_buffer = mbd->pre.v_buffer;
+ uint8_t *y_buffer = mbd->pre.y_buffer;
+ uint8_t *u_buffer = mbd->pre.u_buffer;
+ uint8_t *v_buffer = mbd->pre.v_buffer;
for (mb_row = 0; mb_row < mb_rows; mb_row++) {
#if ALT_REF_MC_ENABLED
@@ -266,7 +250,7 @@
int stride;
vpx_memset(accumulator, 0, 384 * sizeof(unsigned int));
- vpx_memset(count, 0, 384 * sizeof(unsigned short));
+ vpx_memset(count, 0, 384 * sizeof(uint16_t));
#if ALT_REF_MC_ENABLED
cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND));
@@ -341,7 +325,7 @@
pval *= cpi->fixed_divide[count[k]];
pval >>= 19;
- dst1[byte] = (unsigned char)pval;
+ dst1[byte] = (uint8_t)pval;
// move to next pixel
byte++;
@@ -362,13 +346,13 @@
unsigned int pval = accumulator[k] + (count[k] >> 1);
pval *= cpi->fixed_divide[count[k]];
pval >>= 19;
- dst1[byte] = (unsigned char)pval;
+ dst1[byte] = (uint8_t)pval;
// V
pval = accumulator[m] + (count[m] >> 1);
pval *= cpi->fixed_divide[count[m]];
pval >>= 19;
- dst2[byte] = (unsigned char)pval;
+ dst2[byte] = (uint8_t)pval;
// move to next pixel
byte++;
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_temporal_filter.h ('k') | source/libvpx/vp9/encoder/vp9_tokenize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698