History

avcodec/ffv1enc: avoid slices larger than 360x288 if no value is specified

This improves speed by providing more independent things for more CPUs

Michael Niedermayer committed 1 year ago

Commit 175cd4c1 parent 1b04fb32 files · +13 −9Browse files

Showing the changes to libavcodec (1 of 2 files). Show all

Unified · Split

libavcodec/ffv1enc.c+5−1
@@ -581,7 +581,11 @@ int ff_ffv1_encode_determine_slices(AVCodecContext *avctx) · 580 unmodified lines
581581 if ( ff_need_new_slices(avctx->width , s->num_h_slices, s->chroma_h_shift)
582582 ||ff_need_new_slices(avctx->height, s->num_v_slices, s->chroma_v_shift))
583583 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)
585589 return 0;
586590 }
587591 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t