/* These bulk costs increase every iteration */
lowest_bulk_cost += s->pixel_size;
sec_lowest_bulk_cost += s->pixel_size;
-
- this_line -= s->pixel_size;
- prev_line -= s->pixel_size;
+ if (this_line >= p->data[0] + s->pixel_size)
+ this_line -= s->pixel_size;
+ if (prev_line >= s->previous_frame->data[0] + s->pixel_size)
+ prev_line -= s->pixel_size;
}
/* Good! Now we have the best sequence for this line, let's output it. */
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
},
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};