Mercurial > libavcodec.hg
comparison mpegvideo_common.h @ 6578:dfa423a2fc78 libavcodec
cosmetics: Break some overly long lines.
patch by Keiji Costantini, lists strites net
author | diego |
---|---|
date | Thu, 10 Apr 2008 10:40:01 +0000 |
parents | 493dc59d469a |
children | bd5c42ff9e27 |
comparison
equal
deleted
inserted
replaced
6577:1b90003d4d60 | 6578:dfa423a2fc78 |
---|---|
236 pix_op[dxy](dest, src, stride, h); | 236 pix_op[dxy](dest, src, stride, h); |
237 return emu; | 237 return emu; |
238 } | 238 } |
239 | 239 |
240 /* apply one mpeg motion vector to the three components */ | 240 /* apply one mpeg motion vector to the three components */ |
241 static av_always_inline void mpeg_motion(MpegEncContext *s, | 241 static av_always_inline |
242 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, | 242 void mpeg_motion(MpegEncContext *s, |
243 int field_based, int bottom_field, int field_select, | 243 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, |
244 uint8_t **ref_picture, op_pixels_func (*pix_op)[4], | 244 int field_based, int bottom_field, int field_select, |
245 int motion_x, int motion_y, int h) | 245 uint8_t **ref_picture, op_pixels_func (*pix_op)[4], |
246 int motion_x, int motion_y, int h) | |
246 { | 247 { |
247 uint8_t *ptr_y, *ptr_cb, *ptr_cr; | 248 uint8_t *ptr_y, *ptr_cb, *ptr_cr; |
248 int dxy, uvdxy, mx, my, src_x, src_y, uvsrc_x, uvsrc_y, v_edge_pos, uvlinesize, linesize; | 249 int dxy, uvdxy, mx, my, src_x, src_y, |
250 uvsrc_x, uvsrc_y, v_edge_pos, uvlinesize, linesize; | |
249 | 251 |
250 #if 0 | 252 #if 0 |
251 if(s->quarter_sample) | 253 if(s->quarter_sample) |
252 { | 254 { |
253 motion_x>>=1; | 255 motion_x>>=1; |
310 | 312 |
311 if( (unsigned)src_x > s->h_edge_pos - (motion_x&1) - 16 | 313 if( (unsigned)src_x > s->h_edge_pos - (motion_x&1) - 16 |
312 || (unsigned)src_y > v_edge_pos - (motion_y&1) - h){ | 314 || (unsigned)src_y > v_edge_pos - (motion_y&1) - h){ |
313 if(s->codec_id == CODEC_ID_MPEG2VIDEO || | 315 if(s->codec_id == CODEC_ID_MPEG2VIDEO || |
314 s->codec_id == CODEC_ID_MPEG1VIDEO){ | 316 s->codec_id == CODEC_ID_MPEG1VIDEO){ |
315 av_log(s->avctx,AV_LOG_DEBUG,"MPEG motion vector out of boundary\n"); | 317 av_log(s->avctx,AV_LOG_DEBUG, |
318 "MPEG motion vector out of boundary\n"); | |
316 return ; | 319 return ; |
317 } | 320 } |
318 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based, | 321 ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, |
319 src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos); | 322 17, 17+field_based, |
323 src_x, src_y<<field_based, | |
324 s->h_edge_pos, s->v_edge_pos); | |
320 ptr_y = s->edge_emu_buffer; | 325 ptr_y = s->edge_emu_buffer; |
321 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ | 326 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ |
322 uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize; | 327 uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize; |
323 ff_emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, 9+field_based, | 328 ff_emulated_edge_mc(uvbuf , |
324 uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1); | 329 ptr_cb, s->uvlinesize, |
325 ff_emulated_edge_mc(uvbuf+16, ptr_cr, s->uvlinesize, 9, 9+field_based, | 330 9, 9+field_based, |
326 uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1); | 331 uvsrc_x, uvsrc_y<<field_based, |
332 s->h_edge_pos>>1, s->v_edge_pos>>1); | |
333 ff_emulated_edge_mc(uvbuf+16, | |
334 ptr_cr, s->uvlinesize, | |
335 9, 9+field_based, | |
336 uvsrc_x, uvsrc_y<<field_based, | |
337 s->h_edge_pos>>1, s->v_edge_pos>>1); | |
327 ptr_cb= uvbuf; | 338 ptr_cb= uvbuf; |
328 ptr_cr= uvbuf+16; | 339 ptr_cr= uvbuf+16; |
329 } | 340 } |
330 } | 341 } |
331 | 342 |
342 } | 353 } |
343 | 354 |
344 pix_op[0][dxy](dest_y, ptr_y, linesize, h); | 355 pix_op[0][dxy](dest_y, ptr_y, linesize, h); |
345 | 356 |
346 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ | 357 if(!ENABLE_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ |
347 pix_op[s->chroma_x_shift][uvdxy](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift); | 358 pix_op[s->chroma_x_shift][uvdxy] |
348 pix_op[s->chroma_x_shift][uvdxy](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift); | 359 (dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift); |
349 } | 360 pix_op[s->chroma_x_shift][uvdxy] |
350 if((ENABLE_H261_ENCODER || ENABLE_H261_DECODER) && s->out_format == FMT_H261){ | 361 (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift); |
362 } | |
363 if((ENABLE_H261_ENCODER || ENABLE_H261_DECODER) && | |
364 s->out_format == FMT_H261){ | |
351 ff_h261_loop_filter(s); | 365 ff_h261_loop_filter(s); |
352 } | 366 } |
353 } | 367 } |
354 | 368 |
355 //FIXME move to dsputil, avg variant, 16x16 version | 369 //FIXME move to dsputil, avg variant, 16x16 version |