ffmpeg.js/libavcodec/h264.c
/**
 * Draw edges and report progress for the last MB row.
 */
Draw edges and report progress for the last MB row.
Draw edges and report progress for the last MB row .
static void decode_finish_row(H264Context *h)
{
    int top            = 16 * (h->mb_y      >> FIELD_PICTURE(h));
    int pic_height     = 16 *  h->mb_height >> FIELD_PICTURE(h);
    int height         =  16      << FRAME_MBAFF(h);
    int deblock_border = (16 + 4) << FRAME_MBAFF(h);
    if (h->deblocking_filter) {
        if ((top + height) >= pic_height)
            height += deblock_border;
        top -= deblock_border;
    }
    if (top >= pic_height || (top + height) < 0)
        return;
    height = FFMIN(height, pic_height - top);
    if (top < 0) {
        height = top + height;
        top    = 0;
    }
    ff_h264_draw_horiz_band(h, top, height);
    if (h->droppable || h->er.error_occurred)
        return;
    ff_thread_report_progress(&h->cur_pic_ptr->tf, top + height - 1,
                              h->picture_structure == PICT_BOTTOM_FIELD);
}
static void decode_finish_row ( H264Context * h ) { int top = 16 * ( h -> mb_y >> FIELD_PICTURE ( h ) ) ; int pic_height = 16 * h -> mb_height >> FIELD_PICTURE ( h ) ; int height = 16 << FRAME_MBAFF ( h ) ; int deblock_border = ( 16 + 4 ) << FRAME_MBAFF ( h ) ; if ( h -> deblocking_filter ) { if ( ( top + height ) >= pic_height ) height += deblock_border ; top -= deblock_border ; } if ( top >= pic_height || ( top + height ) < 0 ) return ; height = FFMIN ( height , pic_height - top ) ; if ( top < 0 ) { height = top + height ; top = 0 ; } ff_h264_draw_horiz_band ( h , top , height ) ; if ( h -> droppable || h -> er . error_occurred ) return ; ff_thread_report_progress ( & h -> cur_pic_ptr -> tf , top + height - 1 , h -> picture_structure == PICT_BOTTOM_FIELD ) ; }
Draw edges and report progress for the last MB row.
Draw edges and report progress for the last MB row .