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

Side by Side Diff: source/libvpx/vp9/common/vp9_debugmodes.c

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include <stdio.h>
12 #include "vp9/common/vp9_blockd.h"
13
14 void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
15 int frame) {
16 int mb_row;
17 int mb_col;
18 int mb_index = 0;
19 FILE *mvs = fopen("mvs.stt", "a");
20
21 /* print out the macroblock Y modes */
22 mb_index = 0;
23 fprintf(mvs, "Mb Modes for Frame %d\n", frame);
24
25 for (mb_row = 0; mb_row < rows; mb_row++) {
26 for (mb_col = 0; mb_col < cols; mb_col++) {
27
28 fprintf(mvs, "%2d ", mi[mb_index].mbmi.mode);
29
30 mb_index++;
31 }
32
33 fprintf(mvs, "\n");
34 mb_index++;
35 }
36
37 fprintf(mvs, "\n");
38
39 mb_index = 0;
40 fprintf(mvs, "Mb mv ref for Frame %d\n", frame);
41
42 for (mb_row = 0; mb_row < rows; mb_row++) {
43 for (mb_col = 0; mb_col < cols; mb_col++) {
44
45 fprintf(mvs, "%2d ", mi[mb_index].mbmi.ref_frame);
46
47 mb_index++;
48 }
49
50 fprintf(mvs, "\n");
51 mb_index++;
52 }
53
54 fprintf(mvs, "\n");
55
56 /* print out the macroblock UV modes */
57 mb_index = 0;
58 fprintf(mvs, "UV Modes for Frame %d\n", frame);
59
60 for (mb_row = 0; mb_row < rows; mb_row++) {
61 for (mb_col = 0; mb_col < cols; mb_col++) {
62
63 fprintf(mvs, "%2d ", mi[mb_index].mbmi.uv_mode);
64
65 mb_index++;
66 }
67
68 mb_index++;
69 fprintf(mvs, "\n");
70 }
71
72 fprintf(mvs, "\n");
73
74 /* print out the block modes */
75 mb_index = 0;
76 fprintf(mvs, "Mbs for Frame %d\n", frame);
77 {
78 int b_row;
79
80 for (b_row = 0; b_row < 4 * rows; b_row++) {
81 int b_col;
82 int bindex;
83
84 for (b_col = 0; b_col < 4 * cols; b_col++) {
85 mb_index = (b_row >> 2) * (cols + 1) + (b_col >> 2);
86 bindex = (b_row & 3) * 4 + (b_col & 3);
87
88 if (mi[mb_index].mbmi.mode == B_PRED) {
89 fprintf(mvs, "%2d ", mi[mb_index].bmi[bindex].as_mode.first);
90 #if CONFIG_COMP_INTRA_PRED
91 fprintf(mvs, "%2d ", mi[mb_index].bmi[bindex].as_mode.second);
92 #endif
93 } else
94 fprintf(mvs, "xx ");
95
96 }
97
98 fprintf(mvs, "\n");
99 }
100 }
101 fprintf(mvs, "\n");
102
103 /* print out the macroblock mvs */
104 mb_index = 0;
105 fprintf(mvs, "MVs for Frame %d\n", frame);
106
107 for (mb_row = 0; mb_row < rows; mb_row++) {
108 for (mb_col = 0; mb_col < cols; mb_col++) {
109 fprintf(mvs, "%5d:%-5d", mi[mb_index].mbmi.mv[0].as_mv.row / 2,
110 mi[mb_index].mbmi.mv[0].as_mv.col / 2);
111
112 mb_index++;
113 }
114
115 mb_index++;
116 fprintf(mvs, "\n");
117 }
118
119 fprintf(mvs, "\n");
120
121 /* print out the block modes */
122 mb_index = 0;
123 fprintf(mvs, "MVs for Frame %d\n", frame);
124 {
125 int b_row;
126
127 for (b_row = 0; b_row < 4 * rows; b_row++) {
128 int b_col;
129 int bindex;
130
131 for (b_col = 0; b_col < 4 * cols; b_col++) {
132 mb_index = (b_row >> 2) * (cols + 1) + (b_col >> 2);
133 bindex = (b_row & 3) * 4 + (b_col & 3);
134 fprintf(mvs, "%3d:%-3d ",
135 mi[mb_index].bmi[bindex].as_mv.first.as_mv.row,
136 mi[mb_index].bmi[bindex].as_mv.first.as_mv.col);
137
138 }
139
140 fprintf(mvs, "\n");
141 }
142 }
143 fprintf(mvs, "\n");
144
145 fclose(mvs);
146 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698