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

Unified Diff: libvpx/source/libvpx/vp8/encoder/encodemb.c

Issue 7624054: Revert r97185 "Update libvpx snapshot to v0.9.7-p1 (Cayuga)." (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party
Patch Set: Created 9 years, 4 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 | « libvpx/source/libvpx/vp8/encoder/encodemb.h ('k') | libvpx/source/libvpx/vp8/encoder/encodemv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libvpx/source/libvpx/vp8/encoder/encodemb.c
diff --git a/libvpx/source/libvpx/vp8/encoder/encodemb.c b/libvpx/source/libvpx/vp8/encoder/encodemb.c
index 3ed16b6814626da5f086242daceaec7ec1efc54f..463dbcaa92c72bd7c499a2643347c5f4bcfd8899 100644
--- a/libvpx/source/libvpx/vp8/encoder/encodemb.c
+++ b/libvpx/source/libvpx/vp8/encoder/encodemb.c
@@ -19,7 +19,6 @@
#include "vp8/common/reconintra.h"
#include "dct.h"
#include "vpx_mem/vpx_mem.h"
-#include "rdopt.h"
#if CONFIG_RUNTIME_CPU_DETECT
#define IF_RTCD(x) (x)
@@ -101,9 +100,7 @@ void vp8_subtract_mby_c(short *diff, unsigned char *src, unsigned char *pred, in
static void vp8_subtract_mb(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
{
- BLOCK *b = &x->block[0];
-
- ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), x->e_mbd.predictor, b->src_stride);
+ ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, x->src.y_buffer, x->e_mbd.predictor, x->src.y_stride);
ENCODEMB_INVOKE(&rtcd->encodemb, submbuv)(x->src_diff, x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, x->src.uv_stride);
}
@@ -198,7 +195,42 @@ static void transform_mby(MACROBLOCK *x)
}
+void vp8_stuff_inter16x16(MACROBLOCK *x)
+{
+ vp8_build_inter_predictors_mb_s(&x->e_mbd);
+ /*
+ // recon = copy from predictors to destination
+ {
+ BLOCKD *b = &x->e_mbd.block[0];
+ unsigned char *pred_ptr = b->predictor;
+ unsigned char *dst_ptr = *(b->base_dst) + b->dst;
+ int stride = b->dst_stride;
+
+ int i;
+ for(i=0;i<16;i++)
+ vpx_memcpy(dst_ptr+i*stride,pred_ptr+16*i,16);
+
+ b = &x->e_mbd.block[16];
+ pred_ptr = b->predictor;
+ dst_ptr = *(b->base_dst) + b->dst;
+ stride = b->dst_stride;
+
+ for(i=0;i<8;i++)
+ vpx_memcpy(dst_ptr+i*stride,pred_ptr+8*i,8);
+
+ b = &x->e_mbd.block[20];
+ pred_ptr = b->predictor;
+ dst_ptr = *(b->base_dst) + b->dst;
+ stride = b->dst_stride;
+
+ for(i=0;i<8;i++)
+ vpx_memcpy(dst_ptr+i*stride,pred_ptr+8*i,8);
+ }
+ */
+}
+#if !(CONFIG_REALTIME_ONLY)
+#define RDCOST(RM,DM,R,D) ( ((128+(R)*(RM)) >> 8) + (DM)*(D) )
#define RDTRUNC(RM,DM,R,D) ( (128+(R)*(RM)) & 0xFF )
typedef struct vp8_token_state vp8_token_state;
@@ -240,7 +272,7 @@ static void optimize_b(MACROBLOCK *mb, int ib, int type,
int i0;
int rc;
int x;
- int sz = 0;
+ int sz;
int next;
int rdmult;
int rddiv;
@@ -576,6 +608,7 @@ void vp8_optimize_mbuv(MACROBLOCK *x, const VP8_ENCODER_RTCD *rtcd)
ta + vp8_block2above[b], tl + vp8_block2left[b], rtcd);
}
}
+#endif
void vp8_encode_inter16x16(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
{
@@ -587,8 +620,10 @@ void vp8_encode_inter16x16(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
vp8_quantize_mb(x);
+#if !(CONFIG_REALTIME_ONLY)
if (x->optimize)
optimize_mb(x, rtcd);
+#endif
vp8_inverse_transform_mb(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
@@ -600,11 +635,9 @@ void vp8_encode_inter16x16(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
/* this funciton is used by first pass only */
void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
{
- BLOCK *b = &x->block[0];
-
- vp8_build_inter16x16_predictors_mby(&x->e_mbd);
+ vp8_build_inter_predictors_mby(&x->e_mbd);
- ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), x->e_mbd.predictor, b->src_stride);
+ ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, x->src.y_buffer, x->e_mbd.predictor, x->src.y_stride);
transform_mby(x);
« no previous file with comments | « libvpx/source/libvpx/vp8/encoder/encodemb.h ('k') | libvpx/source/libvpx/vp8/encoder/encodemv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698