[FFmpeg-devel] [PATCH 4/6] avcodec/hnm4video: Optimize postprocess_current_frame()
Michael Niedermayer
michael at niedermayer.cc
Mon Aug 12 09:04:43 EEST 2019
On Sat, Aug 03, 2019 at 04:07:22PM +0200, Tomas Härdin wrote:
> lör 2019-08-03 klockan 01:49 +0200 skrev Michael Niedermayer:
> > - uint32_t x, y, src_x, src_y;
> > + uint32_t x, y, src_y;
> > + int width = hnm->width;
> >
> > for (y = 0; y < hnm->height; y++) {
> > + uint8_t *dst = hnm->processed + y * width;
> > + const uint8_t *src = hnm->current;
> > src_y = y - (y % 2);
> > - src_x = src_y * hnm->width + (y % 2);
> > - for (x = 0; x < hnm->width; x++) {
> > - hnm->processed[(y * hnm->width) + x] = hnm-
> > >current[src_x];
> > - src_x += 2;
> > + src += src_y * width + (y % 2);
> > + for (x = 0; x < width; x++) {
> > + dst[x] = *src;
> > + src += 2;
>
> Looks OK. Maybe telling the compiler that src and dst don't alias would
> be worthwhile?
will apply (as discussed later without restrict as it doesnt help)
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190812/e108a40e/attachment.sig>
More information about the ffmpeg-devel
mailing list