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