[FFmpeg-devel] [RFC]Do not alias data pointer in kega decoder

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Mar 3 19:53:25 CET 2013


On Thu, Feb 28, 2013 at 11:38:50PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes the kega fate failure with icc 13.1.0 on intel64 - 
> http://fate.ffmpeg.org/report.cgi?time=20130228212822&slot=x86_64-archlinux-icc-2013 - 
> a regression since 33cd32b. Since it does not help for ia32, it is probably 
> not the correct solution;-(

Since I believe we know the pointers to be aligned you should be using
AV_WN16A

>              for (i = inp_off; i < count + inp_off; i++) {
> -                out[outcnt++] = inp[i];
> +                AV_WN16(&out[2 * outcnt], AV_RN16(&inp[2 * i]));
> +                outcnt++;

Shouldn't this possibly be using memcpy?
Otherwise use AV_COPY16, using macros inside macros is a bit ugly.
Apart from these (and Paul's) comments, I see no reason to not change
it, the extra complexity IMHO is so minor that it's work getting rid of
the cast regardless of whether it fixes the icc issue.


More information about the ffmpeg-devel mailing list