Mercurial > mplayer.hg
comparison libmpeg2/decode.c @ 2253:0cc88042ff21
enable postprocess for interlaced fields
author | iive |
---|---|
date | Thu, 18 Oct 2001 15:43:35 +0000 |
parents | c568f4fffb0a |
children | b3624c70aba2 |
comparison
equal
deleted
inserted
replaced
2252:6697e0568f87 | 2253:0cc88042ff21 |
---|---|
166 picture->display_picture_height-y, | 166 picture->display_picture_height-y, |
167 0, y); | 167 0, y); |
168 | 168 |
169 ++picture->slice; | 169 ++picture->slice; |
170 } | 170 } |
171 void draw_frame(vo_functions_t * output) | |
172 { | |
173 int stride[3]; | |
174 | |
175 stride[0]=picture->coded_picture_width; | |
176 stride[1]=stride[2]=stride[0]/2; | |
177 #ifdef MPEG12_POSTPROC | |
178 if( picture->pp_options ) | |
179 {// apply postprocess filter | |
180 postprocess((picture->picture_coding_type == B_TYPE) ? | |
181 picture->current_frame->base : | |
182 picture->forward_reference_frame->base, | |
183 stride[0], frames[3].base, stride[0], | |
184 picture->coded_picture_width, picture->coded_picture_height, | |
185 &quant_store[1][1], (MBC+1), picture->pp_options); | |
186 output->draw_slice (frames[3].base, stride, | |
187 picture->display_picture_width, | |
188 picture->display_picture_height, 0, 0); | |
189 }else | |
190 #endif | |
191 { | |
192 output->draw_slice ((picture->picture_coding_type == B_TYPE) ? | |
193 picture->current_frame->base : | |
194 picture->forward_reference_frame->base, | |
195 stride, | |
196 picture->display_picture_width, | |
197 picture->display_picture_height, 0, 0); | |
198 } | |
199 } | |
171 | 200 |
172 static int in_slice_flag=0; | 201 static int in_slice_flag=0; |
173 | 202 |
174 static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int framedrop) | 203 static int parse_chunk (vo_functions_t * output, int code, uint8_t * buffer, int framedrop) |
175 { | 204 { |
184 // if(picture->picture_structure != FRAME_PICTURE) printf("Field! %d \n",picture->second_field); | 213 // if(picture->picture_structure != FRAME_PICTURE) printf("Field! %d \n",picture->second_field); |
185 | 214 |
186 if(picture->picture_structure == FRAME_PICTURE) | 215 if(picture->picture_structure == FRAME_PICTURE) |
187 { | 216 { |
188 #ifdef MPEG12_POSTPROC | 217 #ifdef MPEG12_POSTPROC |
189 if( (picture->pp_options) && (!framedrop) ){ | 218 if( (picture->pp_options) && (!framedrop) ) |
190 // apply postprocess filter | 219 draw_frame(output); |
191 int stride[3]; | |
192 stride[0]=picture->coded_picture_width; | |
193 stride[1]=stride[2]=stride[0]/2; | |
194 postprocess((picture->picture_coding_type == B_TYPE) ? | |
195 picture->current_frame->base : | |
196 picture->forward_reference_frame->base, | |
197 stride[0], frames[3].base, stride[0], | |
198 picture->coded_picture_width, picture->coded_picture_height, | |
199 &quant_store[1][1], (MBC+1), picture->pp_options); | |
200 output->draw_slice (frames[3].base, stride, | |
201 picture->display_picture_width, | |
202 picture->display_picture_height, 0, 0); | |
203 } | |
204 #endif | 220 #endif |
205 }else{ | 221 }else |
206 if( (picture->second_field) && (!framedrop) ) | 222 { |
207 { | 223 if( (picture->second_field) && (!framedrop) ) |
208 int stride[3]; | 224 draw_frame(output); |
209 stride[0]=picture->coded_picture_width; | 225 else |
210 stride[1]=stride[2]=stride[0]/2; | 226 is_frame_done=0;// we don't draw first fields |
211 output->draw_slice ((picture->picture_coding_type == B_TYPE) ? | |
212 picture->current_frame->base : | |
213 picture->forward_reference_frame->base, | |
214 stride, | |
215 picture->display_picture_width, | |
216 picture->display_picture_height, 0, 0); | |
217 }else | |
218 is_frame_done=0;// we don't draw top fields | |
219 } | 227 } |
220 #ifdef ARCH_X86 | 228 #ifdef ARCH_X86 |
221 if (config.flags & MM_ACCEL_X86_MMX) emms(); | 229 if (config.flags & MM_ACCEL_X86_MMX) emms(); |
222 #endif | 230 #endif |
223 // output->flip_page(); | 231 // output->flip_page(); |