Mercurial > libavcodec.hg
comparison h264_loopfilter.c @ 10942:ee944149442f libavcodec
Sightly simplify initialization of int start.
No real speed change.
| author | michael |
|---|---|
| date | Wed, 20 Jan 2010 00:17:16 +0000 |
| parents | 5660eac25fb4 |
| children | 0d93bbc17950 |
comparison
equal
deleted
inserted
replaced
| 10941:28edcc8c54c0 | 10942:ee944149442f |
|---|---|
| 428 static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int dir) { | 428 static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int dir) { |
| 429 MpegEncContext * const s = &h->s; | 429 MpegEncContext * const s = &h->s; |
| 430 int edge; | 430 int edge; |
| 431 const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy; | 431 const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy; |
| 432 const int mbm_type = s->current_picture.mb_type[mbm_xy]; | 432 const int mbm_type = s->current_picture.mb_type[mbm_xy]; |
| 433 int start = h->slice_table[mbm_xy] == 0xFFFF ? 1 : 0; | |
| 434 | 433 |
| 435 const int edges = (mb_type & (MB_TYPE_16x16|MB_TYPE_SKIP)) | 434 const int edges = (mb_type & (MB_TYPE_16x16|MB_TYPE_SKIP)) |
| 436 == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4; | 435 == (MB_TYPE_16x16|MB_TYPE_SKIP) ? 1 : 4; |
| 437 // how often to recheck mv-based bS when iterating between edges | 436 // how often to recheck mv-based bS when iterating between edges |
| 438 const int mask_edge = (mb_type & (MB_TYPE_16x16 | (MB_TYPE_16x8 << dir))) ? 3 : | 437 const int mask_edge = (mb_type & (MB_TYPE_16x16 | (MB_TYPE_16x8 << dir))) ? 3 : |
| 439 (mb_type & (MB_TYPE_8x16 >> dir)) ? 1 : 0; | 438 (mb_type & (MB_TYPE_8x16 >> dir)) ? 1 : 0; |
| 440 // how often to recheck mv-based bS when iterating along each edge | 439 // how often to recheck mv-based bS when iterating along each edge |
| 441 const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)); | 440 const int mask_par0 = mb_type & (MB_TYPE_16x16 | (MB_TYPE_8x16 >> dir)); |
| 442 | 441 int start = h->slice_table[mbm_xy] == 0xFFFF |
| 443 if (first_vertical_edge_done) { | 442 || first_vertical_edge_done |
| 444 start = 1; | 443 || (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num); |
| 445 } | 444 |
| 446 | |
| 447 if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num) | |
| 448 start = 1; | |
| 449 | 445 |
| 450 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0 | 446 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0 |
| 451 && !IS_INTERLACED(mb_type) | 447 && !IS_INTERLACED(mb_type) |
| 452 && IS_INTERLACED(mbm_type) | 448 && IS_INTERLACED(mbm_type) |
| 453 ) { | 449 ) { |
