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

Unified Diff: libvpx/source/libvpx/vp8/encoder/encodemv.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/encodemv.h ('k') | libvpx/source/libvpx/vp8/encoder/ethreading.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libvpx/source/libvpx/vp8/encoder/encodemv.c
diff --git a/libvpx/source/libvpx/vp8/encoder/encodemv.c b/libvpx/source/libvpx/vp8/encoder/encodemv.c
index a4849c6540fd87f8348a5af31ad9198e5e183370..6b1e6f9658a5d7df7838c7366aa144299a7e132e 100644
--- a/libvpx/source/libvpx/vp8/encoder/encodemv.c
+++ b/libvpx/source/libvpx/vp8/encoder/encodemv.c
@@ -134,14 +134,31 @@ static unsigned int cost_mvcomponent(const int v, const struct mv_context *mvc)
return cost; // + vp8_cost_bit( p [MVPsign], v < 0);
}
+//#define M_LOG2_E 0.693147180559945309417
+//#define log2f(x) (log (x) / (float) M_LOG2_E)
-void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int mvc_flag[2])
+void vp8_build_component_cost_table(int *mvcost[2], int *mvsadcost[2], const MV_CONTEXT *mvc, int mvc_flag[2])
{
int i = 1; //-mv_max;
unsigned int cost0 = 0;
unsigned int cost1 = 0;
vp8_clear_system_state();
+#if 0
+ mvsadcost [0] [0] = 300;
+ mvsadcost [1] [0] = 300;
+
+ do
+ {
+ double z = 256 * (2 * (log2f(2 * i) + .6));
+ mvsadcost [0][i] = (int) z;
+ mvsadcost [1][i] = (int) z;
+ mvsadcost [0][-i] = (int) z;
+ mvsadcost [1][-i] = (int) z;
+ }
+ while (++i <= mv_max);
+
+#endif
i = 1;
@@ -176,6 +193,16 @@ void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int m
}
while (++i <= mv_max);
}
+
+ /*
+ i=-mv_max;
+ do
+ {
+ mvcost [0] [i] = cost_mvcomponent( i, mvc[0]);
+ mvcost [1] [i] = cost_mvcomponent( i, mvc[1]);
+ }
+ while( ++i <= mv_max);
+ */
}
@@ -409,7 +436,7 @@ void vp8_write_mvprobs(VP8_COMP *cpi)
);
if (flags[0] || flags[1])
- vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cpi->common.fc.mvc, flags);
+ vp8_build_component_cost_table(cpi->mb.mvcost, cpi->mb.mvsadcost, (const MV_CONTEXT *) cpi->common.fc.mvc, flags);
#ifdef ENTROPY_STATS
active_section = 5;
« no previous file with comments | « libvpx/source/libvpx/vp8/encoder/encodemv.h ('k') | libvpx/source/libvpx/vp8/encoder/ethreading.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698