On Thu, Sep 03, 2015 at 01:01:34PM -0300, Pedro Arthur wrote: > Hi, > > This patch implement gamma conversion in the refactored scaling code, and > re-enable it in old code. > If it is good let me know and I'll push it. [...]
> if (need_lum_conv) { > - ff_init_desc_fmt_convert(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], pal); > + res = ff_init_desc_fmt_convert(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], pal); > + if (res < 0) goto cleanup; > c->desc[index].alpha = c->alpPixBuf != 0; > ++index; > srcIdx = dstIdx; > @@ -276,7 +284,8 @@ int ff_init_filters(SwsContext * c) > > > dstIdx = FFMAX(num_ydesc, num_cdesc); > - ff_init_desc_hscale(&c->desc[index], &c->slice[index], > &c->slice[dstIdx], c->hLumFilter, c->hLumFilterPos, c->hLumFilterSize, > c->lumXInc); > + res = ff_init_desc_hscale(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], c->hLumFilter, c->hLumFilterPos, c->hLumFilterSize, > c->lumXInc); > + if (res < 0) goto cleanup; > c->desc[index].alpha = c->alpPixBuf != 0; > > > @@ -285,23 +294,31 @@ int ff_init_filters(SwsContext * c) > srcIdx = 0; > dstIdx = 1; > if (need_chr_conv) { > - ff_init_desc_cfmt_convert(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], pal); > + res = ff_init_desc_cfmt_convert(&c->desc[index], > &c->slice[srcIdx], &c->slice[dstIdx], pal); > + if (res < 0) goto cleanup; > ++index; > srcIdx = dstIdx; > } > > dstIdx = FFMAX(num_ydesc, num_cdesc); > if (c->needs_hcscale) > - ff_init_desc_chscale(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], c->hChrFilter, c->hChrFilterPos, c->hChrFilterSize, > c->chrXInc); > + res = ff_init_desc_chscale(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx], c->hChrFilter, c->hChrFilterPos, c->hChrFilterSize, > c->chrXInc); > else > - ff_init_desc_no_chr(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx]); > + res = ff_init_desc_no_chr(&c->desc[index], &c->slice[srcIdx], > &c->slice[dstIdx]); > + if (res < 0) goto cleanup; > } > > ++index; > { > srcIdx = c->numSlice - 2; > dstIdx = c->numSlice - 1; > - ff_init_vscale(c, c->desc + index, c->slice + srcIdx, c->slice + > dstIdx); > + res = ff_init_vscale(c, c->desc + index, c->slice + srcIdx, c->slice > + dstIdx); > + } the return code checking LGTM but should be in a seperate commit rest of the patch LGTM too thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 3 "Rare item" - "Common item with rare defect or maybe just a lie" "Professional" - "'Toy' made in china, not functional except as doorstop" "Experts will know" - "The seller hopes you are not an expert"
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel