"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavfilter/vf_fade.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

vf_fade.c  (libav-12):vf_fade.c  (libav-12.1)
skipping to change at line 126 skipping to change at line 126
return 0; return 0;
} }
static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr, static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr,
int nb_jobs) int nb_jobs)
{ {
FadeContext *s = ctx->priv; FadeContext *s = ctx->priv;
AVFrame *frame = arg; AVFrame *frame = arg;
int slice_h = FFALIGN(frame->height / nb_jobs, 1 << s->vsub); int slice_h = FFALIGN(frame->height / nb_jobs, 1 << s->vsub);
int slice_start = jobnr * slice_h; int slice_start = jobnr * slice_h;
int slice_end = FFMIN((jobnr + 1) * slice_h, frame->height); int slice_end = (jobnr == nb_jobs - 1) ? frame->height :
FFMIN((jobnr + 1) * slice_h, fram
e->height);
int i, j, plane; int i, j, plane;
for (plane = 1; plane < 3; plane++) { for (plane = 1; plane < 3; plane++) {
for (i = slice_start; i < slice_end; i++) { for (i = slice_start; i < slice_end; i++) {
uint8_t *p = frame->data[plane] + (i >> s->vsub) * frame->linesize[p lane]; uint8_t *p = frame->data[plane] + (i >> s->vsub) * frame->linesize[p lane];
for (j = 0; j < frame->width >> s->hsub; j++) { for (j = 0; j < frame->width >> s->hsub; j++) {
/* 8421367 = ((128 << 1) + 1) << 15. It is an integer /* 8421367 = ((128 << 1) + 1) << 15. It is an integer
* representation of 128.5. The .5 is for rounding * representation of 128.5. The .5 is for rounding
* purposes. */ * purposes. */
*p = ((*p - 128) * s->factor + 8421367) >> 16; *p = ((*p - 128) * s->factor + 8421367) >> 16;
 End of changes. 1 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS