mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
ffv1: split clear_slice_state() out so individual slices can be cleared.
This allows us to clear outside of the main thread for example. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
32883c0667
commit
c7a435aab2
@ -1118,11 +1118,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
#endif /* CONFIG_FFV1_ENCODER */
|
#endif /* CONFIG_FFV1_ENCODER */
|
||||||
|
|
||||||
|
|
||||||
static void clear_state(FFV1Context *f){
|
static void clear_slice_state(FFV1Context *f, FFV1Context *fs){
|
||||||
int i, si, j;
|
int i, j;
|
||||||
|
|
||||||
for(si=0; si<f->slice_count; si++){
|
|
||||||
FFV1Context *fs= f->slice_context[si];
|
|
||||||
for(i=0; i<f->plane_count; i++){
|
for(i=0; i<f->plane_count; i++){
|
||||||
PlaneContext *p= &fs->plane[i];
|
PlaneContext *p= &fs->plane[i];
|
||||||
|
|
||||||
@ -1144,6 +1142,14 @@ static void clear_state(FFV1Context *f){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clear_state(FFV1Context *f){
|
||||||
|
int si;
|
||||||
|
|
||||||
|
for(si=0; si<f->slice_count; si++){
|
||||||
|
FFV1Context *fs= f->slice_context[si];
|
||||||
|
clear_slice_state(f, fs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_FFV1_ENCODER
|
#if CONFIG_FFV1_ENCODER
|
||||||
|
Loading…
Reference in New Issue
Block a user