Mercurial > libavcodec.hg
annotate xvmcvideo.c @ 2600:2bcea6618a87 libavcodec
fix QROOT != 8
author | michael |
---|---|
date | Sat, 09 Apr 2005 19:48:59 +0000 |
parents | 7b345b735ac7 |
children | 511e3afc43e1 |
rev | line source |
---|---|
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
1 /* |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
2 * XVideo Motion Compensation |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
3 * Copyright (c) 2003 Ivan Kalvachev |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
4 * |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
5 * This library is free software; you can redistribute it and/or |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
6 * modify it under the terms of the GNU Lesser General Public |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
7 * License as published by the Free Software Foundation; either |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
8 * version 2 of the License, or (at your option) any later version. |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
9 * |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
10 * This library is distributed in the hope that it will be useful, |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
13 * Lesser General Public License for more details. |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
14 * |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
15 * You should have received a copy of the GNU Lesser General Public |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
16 * License along with this library; if not, write to the Free Software |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
18 */ |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
19 |
1381 | 20 #include <limits.h> |
21 | |
22 //avcodec include | |
23 #include "avcodec.h" | |
24 #include "dsputil.h" | |
25 #include "mpegvideo.h" | |
26 | |
27 #undef NDEBUG | |
28 #include <assert.h> | |
29 | |
30 #ifdef USE_FASTMEMCPY | |
31 #include "fastmemcpy.h" | |
32 #endif | |
33 | |
34 #ifdef HAVE_XVMC | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
35 |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
36 //X11 includes are in the xvmc_render.h |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
37 //by replacing it with none-X one |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
38 //XvMC emulation could be performed |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
39 |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
40 #include "xvmc_render.h" |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
41 |
1381 | 42 //#include "xvmc_debug.h" |
43 | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
44 //set s->block |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
45 inline void XVMC_init_block(MpegEncContext *s){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
46 xvmc_render_state_t * render; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
47 render = (xvmc_render_state_t*)s->current_picture.data[2]; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
48 assert(render != NULL); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
49 if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
50 assert(0); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
51 return;//make sure that this is render packet |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
52 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
53 s->block =(DCTELEM *)(render->data_blocks+(render->next_free_data_block_num)*64); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
54 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
55 |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
56 void XVMC_pack_pblocks(MpegEncContext *s, int cbp){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
57 int i,j; |
2076 | 58 const int mb_block_count = 4+(1<<s->chroma_format); |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
59 |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
60 j=0; |
2076 | 61 cbp<<= 12-mb_block_count; |
62 for(i=0; i<mb_block_count; i++){ | |
63 if(cbp & (1<<11)) { | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
64 s->pblocks[i] = (short *)(&s->block[(j++)]); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
65 }else{ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
66 s->pblocks[i] = NULL; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
67 } |
2076 | 68 cbp+=cbp; |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
69 // printf("s->pblocks[%d]=%p ,s->block=%p cbp=%d\n",i,s->pblocks[i],s->block,cbp); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
70 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
71 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
72 |
1381 | 73 //these functions should be called on every new field or/and frame |
74 //They should be safe if they are called few times for same field! | |
75 int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){ | |
76 xvmc_render_state_t * render,* last, * next; | |
77 | |
78 assert(avctx != NULL); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
79 |
1381 | 80 render = (xvmc_render_state_t*)s->current_picture.data[2]; |
81 assert(render != NULL); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
82 if( (render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC) ) |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
83 return -1;//make sure that this is render packet |
1381 | 84 |
85 render->picture_structure = s->picture_structure; | |
86 render->flags = (s->first_field)? 0: XVMC_SECOND_FIELD; | |
87 | |
88 //make sure that all data is drawn by XVMC_end_frame | |
89 assert(render->filled_mv_blocks_num==0); | |
90 | |
91 render->p_future_surface = NULL; | |
92 render->p_past_surface = NULL; | |
93 | |
94 switch(s->pict_type){ | |
95 case I_TYPE: | |
96 return 0;// no prediction from other frames | |
97 case B_TYPE: | |
98 next = (xvmc_render_state_t*)s->next_picture.data[2]; | |
99 assert(next!=NULL); | |
100 assert(next->state & MP_XVMC_STATE_PREDICTION); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
101 if(next == NULL) return -1; |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
102 if(next->magic != MP_XVMC_RENDER_MAGIC) return -1; |
1381 | 103 render->p_future_surface = next->p_surface; |
104 //no return here, going to set forward prediction | |
105 case P_TYPE: | |
106 last = (xvmc_render_state_t*)s->last_picture.data[2]; | |
107 if(last == NULL)// && !s->first_field) | |
108 last = render;//predict second field from the first | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
109 if(last->magic != MP_XVMC_RENDER_MAGIC) return -1; |
1381 | 110 assert(last->state & MP_XVMC_STATE_PREDICTION); |
111 render->p_past_surface = last->p_surface; | |
112 return 0; | |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
113 } |
1381 | 114 |
115 return -1; | |
116 } | |
117 | |
118 void XVMC_field_end(MpegEncContext *s){ | |
119 xvmc_render_state_t * render; | |
120 render = (xvmc_render_state_t*)s->current_picture.data[2]; | |
121 assert(render != NULL); | |
122 | |
123 if(render->filled_mv_blocks_num > 0){ | |
124 // printf("xvmcvideo.c: rendering %d left blocks after last slice!!!\n",render->filled_mv_blocks_num ); | |
125 ff_draw_horiz_band(s,0,0); | |
126 } | |
127 } | |
128 | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
129 void XVMC_decode_mb(MpegEncContext *s){ |
1381 | 130 XvMCMacroBlock * mv_block; |
131 xvmc_render_state_t * render; | |
132 int i,cbp,blocks_per_mb; | |
133 | |
134 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | |
135 | |
136 | |
137 if(s->encoding){ | |
1830
024752284c25
av_log() patch by ("Steven M. Schultz" <sms at 2BSD dot COM>)
michael
parents:
1580
diff
changeset
|
138 av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n"); |
2281 | 139 return -1; |
1381 | 140 } |
141 | |
142 //from MPV_decode_mb(), | |
143 /* update DC predictors for P macroblocks */ | |
144 if (!s->mb_intra) { | |
145 s->last_dc[0] = | |
146 s->last_dc[1] = | |
147 s->last_dc[2] = 128 << s->intra_dc_precision; | |
148 } | |
149 | |
150 //MC doesn't skip blocks | |
151 s->mb_skiped = 0; | |
152 | |
153 | |
154 // do I need to export quant when I could not perform postprocessing? | |
155 // anyway, it doesn't hurrt | |
156 s->current_picture.qscale_table[mb_xy] = s->qscale; | |
157 | |
158 //START OF XVMC specific code | |
159 render = (xvmc_render_state_t*)s->current_picture.data[2]; | |
160 assert(render!=NULL); | |
161 assert(render->magic==MP_XVMC_RENDER_MAGIC); | |
162 assert(render->mv_blocks); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
163 |
1381 | 164 //take the next free macroblock |
165 mv_block = &render->mv_blocks[render->start_mv_blocks_num + | |
166 render->filled_mv_blocks_num ]; | |
167 | |
168 // memset(mv_block,0,sizeof(XvMCMacroBlock)); | |
169 | |
170 mv_block->x = s->mb_x; | |
171 mv_block->y = s->mb_y; | |
172 mv_block->dct_type = s->interlaced_dct;//XVMC_DCT_TYPE_FRAME/FIELD; | |
173 // mv_block->motion_type = 0; //zero to silense warnings | |
174 if(s->mb_intra){ | |
175 mv_block->macroblock_type = XVMC_MB_TYPE_INTRA;//no MC, all done | |
176 }else{ | |
177 mv_block->macroblock_type = XVMC_MB_TYPE_PATTERN; | |
178 | |
179 if(s->mv_dir & MV_DIR_FORWARD){ | |
180 mv_block->macroblock_type|= XVMC_MB_TYPE_MOTION_FORWARD; | |
181 //pmv[n][dir][xy]=mv[dir][n][xy] | |
182 mv_block->PMV[0][0][0] = s->mv[0][0][0]; | |
183 mv_block->PMV[0][0][1] = s->mv[0][0][1]; | |
184 mv_block->PMV[1][0][0] = s->mv[0][1][0]; | |
185 mv_block->PMV[1][0][1] = s->mv[0][1][1]; | |
186 } | |
187 if(s->mv_dir & MV_DIR_BACKWARD){ | |
188 mv_block->macroblock_type|=XVMC_MB_TYPE_MOTION_BACKWARD; | |
189 mv_block->PMV[0][1][0] = s->mv[1][0][0]; | |
190 mv_block->PMV[0][1][1] = s->mv[1][0][1]; | |
191 mv_block->PMV[1][1][0] = s->mv[1][1][0]; | |
192 mv_block->PMV[1][1][1] = s->mv[1][1][1]; | |
193 } | |
194 | |
195 switch(s->mv_type){ | |
196 case MV_TYPE_16X16: | |
197 mv_block->motion_type = XVMC_PREDICTION_FRAME; | |
198 break; | |
199 case MV_TYPE_16X8: | |
200 mv_block->motion_type = XVMC_PREDICTION_16x8; | |
201 break; | |
202 case MV_TYPE_FIELD: | |
203 mv_block->motion_type = XVMC_PREDICTION_FIELD; | |
204 if(s->picture_structure == PICT_FRAME){ | |
205 mv_block->PMV[0][0][1]<<=1; | |
206 mv_block->PMV[1][0][1]<<=1; | |
207 mv_block->PMV[0][1][1]<<=1; | |
208 mv_block->PMV[1][1][1]<<=1; | |
209 } | |
210 break; | |
211 case MV_TYPE_DMV: | |
212 mv_block->motion_type = XVMC_PREDICTION_DUAL_PRIME; | |
213 if(s->picture_structure == PICT_FRAME){ | |
214 | |
215 mv_block->PMV[0][0][0] = s->mv[0][0][0];//top from top | |
216 mv_block->PMV[0][0][1] = s->mv[0][0][1]<<1; | |
217 | |
218 mv_block->PMV[0][1][0] = s->mv[0][0][0];//bottom from bottom | |
219 mv_block->PMV[0][1][1] = s->mv[0][0][1]<<1; | |
220 | |
221 mv_block->PMV[1][0][0] = s->mv[0][2][0];//dmv00, top from bottom | |
222 mv_block->PMV[1][0][1] = s->mv[0][2][1]<<1;//dmv01 | |
223 | |
224 mv_block->PMV[1][1][0] = s->mv[0][3][0];//dmv10, bottom from top | |
225 mv_block->PMV[1][1][1] = s->mv[0][3][1]<<1;//dmv11 | |
226 | |
227 }else{ | |
228 mv_block->PMV[0][1][0] = s->mv[0][2][0];//dmv00 | |
229 mv_block->PMV[0][1][1] = s->mv[0][2][1];//dmv01 | |
230 } | |
231 break; | |
232 default: | |
233 assert(0); | |
234 } | |
235 | |
236 mv_block->motion_vertical_field_select = 0; | |
237 | |
238 //set correct field referenses | |
239 if(s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8){ | |
240 if( s->field_select[0][0] ) mv_block->motion_vertical_field_select|=1; | |
241 if( s->field_select[1][0] ) mv_block->motion_vertical_field_select|=2; | |
242 if( s->field_select[0][1] ) mv_block->motion_vertical_field_select|=4; | |
243 if( s->field_select[1][1] ) mv_block->motion_vertical_field_select|=8; | |
244 } | |
245 }//!intra | |
246 //time to handle data blocks; | |
247 mv_block->index = render->next_free_data_block_num; | |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
248 |
1381 | 249 blocks_per_mb = 6; |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
250 if( s->chroma_format >= 2){ |
1849 | 251 blocks_per_mb = 4 + (1 << (s->chroma_format)); |
1381 | 252 } |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
253 |
2076 | 254 // calculate cbp |
255 cbp = 0; | |
256 for(i=0; i<blocks_per_mb; i++) { | |
257 cbp+= cbp; | |
258 if(s->block_last_index[i] >= 0) | |
259 cbp++; | |
260 } | |
261 | |
1381 | 262 if(s->flags & CODEC_FLAG_GRAY){ |
263 if(s->mb_intra){//intra frames are alwasy full chroma block | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
264 for(i=4; i<blocks_per_mb; i++){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
265 memset(s->pblocks[i],0,sizeof(short)*8*8);//so we need to clear them |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
266 if(!render->unsigned_intra) |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
267 s->pblocks[i][0] = 1<<10; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
268 } |
2076 | 269 }else{ |
270 cbp&= 0xf << (blocks_per_mb - 4); | |
1381 | 271 blocks_per_mb = 4;//Luminance blocks only |
2076 | 272 } |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
273 } |
1381 | 274 mv_block->coded_block_pattern = cbp; |
275 if(cbp == 0) | |
276 mv_block->macroblock_type &= ~XVMC_MB_TYPE_PATTERN; | |
277 | |
278 for(i=0; i<blocks_per_mb; i++){ | |
279 if(s->block_last_index[i] >= 0){ | |
280 // i do not have unsigned_intra MOCO to test, hope it is OK | |
281 if( (s->mb_intra) && ( render->idct || (!render->idct && !render->unsigned_intra)) ) | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
282 s->pblocks[i][0]-=1<<10; |
1381 | 283 if(!render->idct){ |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
284 s->dsp.idct(s->pblocks[i]); |
1381 | 285 //!!TODO!clip!!! |
286 } | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
287 //copy blocks only if the codec doesn't support pblocks reordering |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
288 if(s->avctx->xvmc_acceleration == 1){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
289 memcpy(&render->data_blocks[(render->next_free_data_block_num)*64], |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
290 s->pblocks[i],sizeof(short)*8*8); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
291 }else{ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
292 /* if(s->pblocks[i] != &render->data_blocks[ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
293 (render->next_free_data_block_num)*64]){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
294 printf("ERROR mb(%d,%d) s->pblocks[i]=%p data_block[]=%p\n", |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
295 s->mb_x,s->mb_y, s->pblocks[i], |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
296 &render->data_blocks[(render->next_free_data_block_num)*64]); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
297 }*/ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
298 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
299 render->next_free_data_block_num++; |
1381 | 300 } |
301 } | |
302 render->filled_mv_blocks_num++; | |
303 | |
304 assert(render->filled_mv_blocks_num <= render->total_number_of_mv_blocks); | |
305 assert(render->next_free_data_block_num <= render->total_number_of_data_blocks); | |
306 | |
307 | |
308 if(render->filled_mv_blocks_num >= render->total_number_of_mv_blocks) | |
309 ff_draw_horiz_band(s,0,0); | |
310 | |
311 // DumpRenderInfo(render); | |
312 // DumpMBlockInfo(mv_block); | |
313 | |
314 } | |
315 | |
316 #endif |