Re: [libav-devel] [PATCH 2/7] hevc: Remove undefined behaviour

2014-02-22 Thread Guillaume Martres
On Wednesday 19 February 2014 22:43:08 Luca Barbato wrote: +#define PX(op, x) \ +PU(x0 op ((x) hshift)) +#define PY(op, y) \ +PU(y0 op ((y) vshift)) +#define IS_INTRA(xop, x, yop, y) \ +MVF(PX(xop, x), PY(yop, y)).is_intra This seems rather ugly, why not simply replace each

Re: [libav-devel] [PATCH 2/7] hevc: Remove undefined behaviour

2014-02-22 Thread Luca Barbato
On 22/02/14 21:24, Guillaume Martres wrote: This seems rather ugly, why not simply replace each xshift by * (1 because of OMGspeed and the set being wrote in sort of autopilot. I wanted to make sure clang+asan miscompilations weren't related to those UB. (they are not =/) lu

[libav-devel] [PATCH 2/7] hevc: Remove undefined behaviour

2014-02-19 Thread Luca Barbato
--- libavcodec/hevcpred_template.c | 43 ++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/libavcodec/hevcpred_template.c b/libavcodec/hevcpred_template.c index 27f4b9e..de77333 100644 --- a/libavcodec/hevcpred_template.c +++

Re: [libav-devel] [PATCH 2/7] hevc: Remove undefined behaviour

2014-02-19 Thread Diego Biurrun
On Wed, Feb 19, 2014 at 10:43:08PM +0100, Luca Barbato wrote: --- libavcodec/hevcpred_template.c | 43 ++ 1 file changed, 23 insertions(+), 20 deletions(-) Please elaborate what is undefined here. Diego ___

Re: [libav-devel] [PATCH 2/7] hevc: Remove undefined behaviour

2014-02-19 Thread Luca Barbato
On 19/02/14 23:12, Diego Biurrun wrote: On Wed, Feb 19, 2014 at 10:43:08PM +0100, Luca Barbato wrote: --- libavcodec/hevcpred_template.c | 43 ++ 1 file changed, 23 insertions(+), 20 deletions(-) Please elaborate what is undefined here. -1 foo