Mercurial > libavcodec.hg
annotate xvmcvideo.c @ 6033:bd7600c7a061 libavcodec
Fix crash in PCM decoder when number of channels is not set.
Patch by "wg": video06 malloc de
See Issue298
author | benoit |
---|---|
date | Mon, 17 Dec 2007 10:41:47 +0000 |
parents | fc98cdbe29b8 |
children | 493dc59d469a |
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 | |
32 #ifdef HAVE_XVMC | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
33 |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
34 //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
|
35 //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
|
36 //XvMC emulation could be performed |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
37 |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
38 #include "xvmc_render.h" |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
39 |
1381 | 40 //#include "xvmc_debug.h" |
41 | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
42 //set s->block |
5691 | 43 void XVMC_init_block(MpegEncContext *s){ |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
44 xvmc_render_state_t * render; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
45 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
|
46 assert(render != NULL); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
47 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
|
48 assert(0); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
49 return;//make sure that this is render packet |
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 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
|
52 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
53 |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
54 void XVMC_pack_pblocks(MpegEncContext *s, int cbp){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
55 int i,j; |
2076 | 56 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
|
57 |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
58 j=0; |
2076 | 59 cbp<<= 12-mb_block_count; |
60 for(i=0; i<mb_block_count; i++){ | |
61 if(cbp & (1<<11)) { | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
62 s->pblocks[i] = (short *)(&s->block[(j++)]); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
63 }else{ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
64 s->pblocks[i] = NULL; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
65 } |
2979 | 66 cbp+=cbp; |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
67 // 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
|
68 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
69 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
70 |
1381 | 71 //these functions should be called on every new field or/and frame |
72 //They should be safe if they are called few times for same field! | |
73 int XVMC_field_start(MpegEncContext*s, AVCodecContext *avctx){ | |
74 xvmc_render_state_t * render,* last, * next; | |
75 | |
76 assert(avctx != NULL); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
77 |
1381 | 78 render = (xvmc_render_state_t*)s->current_picture.data[2]; |
79 assert(render != NULL); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
80 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
|
81 return -1;//make sure that this is render packet |
1381 | 82 |
83 render->picture_structure = s->picture_structure; | |
84 render->flags = (s->first_field)? 0: XVMC_SECOND_FIELD; | |
85 | |
86 //make sure that all data is drawn by XVMC_end_frame | |
87 assert(render->filled_mv_blocks_num==0); | |
88 | |
89 render->p_future_surface = NULL; | |
90 render->p_past_surface = NULL; | |
91 | |
92 switch(s->pict_type){ | |
93 case I_TYPE: | |
94 return 0;// no prediction from other frames | |
95 case B_TYPE: | |
96 next = (xvmc_render_state_t*)s->next_picture.data[2]; | |
97 assert(next!=NULL); | |
98 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
|
99 if(next == NULL) return -1; |
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
100 if(next->magic != MP_XVMC_RENDER_MAGIC) return -1; |
1381 | 101 render->p_future_surface = next->p_surface; |
102 //no return here, going to set forward prediction | |
103 case P_TYPE: | |
104 last = (xvmc_render_state_t*)s->last_picture.data[2]; | |
105 if(last == NULL)// && !s->first_field) | |
106 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
|
107 if(last->magic != MP_XVMC_RENDER_MAGIC) return -1; |
1381 | 108 assert(last->state & MP_XVMC_STATE_PREDICTION); |
109 render->p_past_surface = last->p_surface; | |
110 return 0; | |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
111 } |
1381 | 112 |
113 return -1; | |
114 } | |
115 | |
116 void XVMC_field_end(MpegEncContext *s){ | |
117 xvmc_render_state_t * render; | |
118 render = (xvmc_render_state_t*)s->current_picture.data[2]; | |
119 assert(render != NULL); | |
120 | |
121 if(render->filled_mv_blocks_num > 0){ | |
122 // printf("xvmcvideo.c: rendering %d left blocks after last slice!!!\n",render->filled_mv_blocks_num ); | |
123 ff_draw_horiz_band(s,0,0); | |
124 } | |
125 } | |
126 | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
127 void XVMC_decode_mb(MpegEncContext *s){ |
1381 | 128 XvMCMacroBlock * mv_block; |
129 xvmc_render_state_t * render; | |
130 int i,cbp,blocks_per_mb; | |
131 | |
132 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | |
133 | |
134 | |
135 if(s->encoding){ | |
1830
024752284c25
av_log() patch by ("Steven M. Schultz" <sms at 2BSD dot COM>)
michael
parents:
1580
diff
changeset
|
136 av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n"); |
4010 | 137 return; |
1381 | 138 } |
139 | |
140 //from MPV_decode_mb(), | |
141 /* update DC predictors for P macroblocks */ | |
142 if (!s->mb_intra) { | |
143 s->last_dc[0] = | |
144 s->last_dc[1] = | |
145 s->last_dc[2] = 128 << s->intra_dc_precision; | |
146 } | |
147 | |
148 //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
|
149 s->mb_skipped = 0; |
1381 | 150 |
151 | |
152 // do I need to export quant when I could not perform postprocessing? | |
153 // anyway, it doesn't hurrt | |
154 s->current_picture.qscale_table[mb_xy] = s->qscale; | |
155 | |
156 //START OF XVMC specific code | |
157 render = (xvmc_render_state_t*)s->current_picture.data[2]; | |
158 assert(render!=NULL); | |
159 assert(render->magic==MP_XVMC_RENDER_MAGIC); | |
160 assert(render->mv_blocks); | |
1392
13a02518ffb6
Add GNU header, remove X includes, add more check for xvmc render packet
iive
parents:
1381
diff
changeset
|
161 |
1381 | 162 //take the next free macroblock |
2967 | 163 mv_block = &render->mv_blocks[render->start_mv_blocks_num + |
1381 | 164 render->filled_mv_blocks_num ]; |
165 | |
166 // memset(mv_block,0,sizeof(XvMCMacroBlock)); | |
167 | |
168 mv_block->x = s->mb_x; | |
169 mv_block->y = s->mb_y; | |
170 mv_block->dct_type = s->interlaced_dct;//XVMC_DCT_TYPE_FRAME/FIELD; | |
171 // mv_block->motion_type = 0; //zero to silense warnings | |
172 if(s->mb_intra){ | |
173 mv_block->macroblock_type = XVMC_MB_TYPE_INTRA;//no MC, all done | |
174 }else{ | |
175 mv_block->macroblock_type = XVMC_MB_TYPE_PATTERN; | |
176 | |
177 if(s->mv_dir & MV_DIR_FORWARD){ | |
178 mv_block->macroblock_type|= XVMC_MB_TYPE_MOTION_FORWARD; | |
179 //pmv[n][dir][xy]=mv[dir][n][xy] | |
180 mv_block->PMV[0][0][0] = s->mv[0][0][0]; | |
181 mv_block->PMV[0][0][1] = s->mv[0][0][1]; | |
182 mv_block->PMV[1][0][0] = s->mv[0][1][0]; | |
183 mv_block->PMV[1][0][1] = s->mv[0][1][1]; | |
184 } | |
185 if(s->mv_dir & MV_DIR_BACKWARD){ | |
186 mv_block->macroblock_type|=XVMC_MB_TYPE_MOTION_BACKWARD; | |
187 mv_block->PMV[0][1][0] = s->mv[1][0][0]; | |
188 mv_block->PMV[0][1][1] = s->mv[1][0][1]; | |
189 mv_block->PMV[1][1][0] = s->mv[1][1][0]; | |
190 mv_block->PMV[1][1][1] = s->mv[1][1][1]; | |
191 } | |
192 | |
193 switch(s->mv_type){ | |
194 case MV_TYPE_16X16: | |
195 mv_block->motion_type = XVMC_PREDICTION_FRAME; | |
196 break; | |
197 case MV_TYPE_16X8: | |
198 mv_block->motion_type = XVMC_PREDICTION_16x8; | |
199 break; | |
200 case MV_TYPE_FIELD: | |
201 mv_block->motion_type = XVMC_PREDICTION_FIELD; | |
202 if(s->picture_structure == PICT_FRAME){ | |
203 mv_block->PMV[0][0][1]<<=1; | |
204 mv_block->PMV[1][0][1]<<=1; | |
205 mv_block->PMV[0][1][1]<<=1; | |
206 mv_block->PMV[1][1][1]<<=1; | |
207 } | |
208 break; | |
209 case MV_TYPE_DMV: | |
210 mv_block->motion_type = XVMC_PREDICTION_DUAL_PRIME; | |
211 if(s->picture_structure == PICT_FRAME){ | |
212 | |
213 mv_block->PMV[0][0][0] = s->mv[0][0][0];//top from top | |
214 mv_block->PMV[0][0][1] = s->mv[0][0][1]<<1; | |
215 | |
216 mv_block->PMV[0][1][0] = s->mv[0][0][0];//bottom from bottom | |
217 mv_block->PMV[0][1][1] = s->mv[0][0][1]<<1; | |
218 | |
219 mv_block->PMV[1][0][0] = s->mv[0][2][0];//dmv00, top from bottom | |
220 mv_block->PMV[1][0][1] = s->mv[0][2][1]<<1;//dmv01 | |
221 | |
222 mv_block->PMV[1][1][0] = s->mv[0][3][0];//dmv10, bottom from top | |
223 mv_block->PMV[1][1][1] = s->mv[0][3][1]<<1;//dmv11 | |
224 | |
225 }else{ | |
226 mv_block->PMV[0][1][0] = s->mv[0][2][0];//dmv00 | |
227 mv_block->PMV[0][1][1] = s->mv[0][2][1];//dmv01 | |
228 } | |
229 break; | |
230 default: | |
231 assert(0); | |
232 } | |
233 | |
234 mv_block->motion_vertical_field_select = 0; | |
235 | |
236 //set correct field referenses | |
237 if(s->mv_type == MV_TYPE_FIELD || s->mv_type == MV_TYPE_16X8){ | |
238 if( s->field_select[0][0] ) mv_block->motion_vertical_field_select|=1; | |
239 if( s->field_select[1][0] ) mv_block->motion_vertical_field_select|=2; | |
240 if( s->field_select[0][1] ) mv_block->motion_vertical_field_select|=4; | |
241 if( s->field_select[1][1] ) mv_block->motion_vertical_field_select|=8; | |
242 } | |
243 }//!intra | |
244 //time to handle data blocks; | |
245 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
|
246 |
1381 | 247 blocks_per_mb = 6; |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
248 if( s->chroma_format >= 2){ |
1849 | 249 blocks_per_mb = 4 + (1 << (s->chroma_format)); |
1381 | 250 } |
1848
c72589baee53
initial chroma_format changes,xvmc tweaks and codec_cap
iive
parents:
1830
diff
changeset
|
251 |
2076 | 252 // calculate cbp |
253 cbp = 0; | |
254 for(i=0; i<blocks_per_mb; i++) { | |
255 cbp+= cbp; | |
256 if(s->block_last_index[i] >= 0) | |
257 cbp++; | |
258 } | |
2967 | 259 |
1381 | 260 if(s->flags & CODEC_FLAG_GRAY){ |
261 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
|
262 for(i=4; i<blocks_per_mb; i++){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
263 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
|
264 if(!render->unsigned_intra) |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
265 s->pblocks[i][0] = 1<<10; |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
266 } |
2076 | 267 }else{ |
268 cbp&= 0xf << (blocks_per_mb - 4); | |
1381 | 269 blocks_per_mb = 4;//Luminance blocks only |
2076 | 270 } |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
271 } |
1381 | 272 mv_block->coded_block_pattern = cbp; |
273 if(cbp == 0) | |
274 mv_block->macroblock_type &= ~XVMC_MB_TYPE_PATTERN; | |
275 | |
276 for(i=0; i<blocks_per_mb; i++){ | |
277 if(s->block_last_index[i] >= 0){ | |
278 // i do not have unsigned_intra MOCO to test, hope it is OK | |
279 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
|
280 s->pblocks[i][0]-=1<<10; |
1381 | 281 if(!render->idct){ |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
282 s->dsp.idct(s->pblocks[i]); |
1381 | 283 //!!TODO!clip!!! |
284 } | |
1580
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
285 //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
|
286 if(s->avctx->xvmc_acceleration == 1){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
287 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
|
288 s->pblocks[i],sizeof(short)*8*8); |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
289 }else{ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
290 /* if(s->pblocks[i] != &render->data_blocks[ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
291 (render->next_free_data_block_num)*64]){ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
292 printf("ERROR mb(%d,%d) s->pblocks[i]=%p data_block[]=%p\n", |
2967 | 293 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
|
294 &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
|
295 }*/ |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
296 } |
628bf341e099
XvMC speedup by removing one memcpy and doing MB packing
iive
parents:
1517
diff
changeset
|
297 render->next_free_data_block_num++; |
1381 | 298 } |
299 } | |
300 render->filled_mv_blocks_num++; | |
301 | |
302 assert(render->filled_mv_blocks_num <= render->total_number_of_mv_blocks); | |
303 assert(render->next_free_data_block_num <= render->total_number_of_data_blocks); | |
304 | |
305 | |
306 if(render->filled_mv_blocks_num >= render->total_number_of_mv_blocks) | |
307 ff_draw_horiz_band(s,0,0); | |
308 | |
309 // DumpRenderInfo(render); | |
310 // DumpMBlockInfo(mv_block); | |
311 | |
312 } | |
313 | |
314 #endif |