This improves speed by providing more independent things for more CPUs
Showing the changes to libavcodec (1 of 2 files). Show all
Unified · Split
| @@ -581,7 +581,11 @@ int ff_ffv1_encode_determine_slices(AVCodecContext *avctx) · 580 unmodified lines | |||
| 581 | if ( ff_need_new_slices(avctx->width , s->num_h_slices, s->chroma_h_shift) | 581 | if ( ff_need_new_slices(avctx->width , s->num_h_slices, s->chroma_h_shift) |
| 582 | ||ff_need_new_slices(avctx->height, s->num_v_slices, s->chroma_v_shift)) | 582 | ||ff_need_new_slices(avctx->height, s->num_v_slices, s->chroma_v_shift)) |
| 583 | continue; | 583 | continue; |
| 584 | if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES || !avctx->slices) | 584 | if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES) |
| 585 | return 0; | ||
| 586 | if (maxw*maxh > 360*288) | ||
| 587 | continue; | ||
| 588 | if (!avctx->slices) | ||
| 585 | return 0; | 589 | return 0; |
| 586 | } | 590 | } |
| 587 | } | 591 | } |