diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-18 03:11:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-18 03:11:58 +0100 |
commit | 85a685ac0af4594475c444b4ef80c383696123da (patch) | |
tree | c0cbb0e2c61ef1f6dbf2d9c24d57989430125a03 | |
parent | bd593a98dc41256fd753924c5cb404f86610cf01 (diff) | |
parent | 1e7f825a9b212f838cf6df74da70d33113919dbf (diff) | |
download | ffmpeg-85a685ac0af4594475c444b4ef80c383696123da.tar.gz |
Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9:
hqdn3d: Fix out of array read in LOWPASS
vf_gradfun: fix uninitialized variable use
Conflicts:
libavfilter/vf_hqdn3d.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_gradfun.c | 3 | ||||
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index ac23d4267f..93ac76824b 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -201,12 +201,13 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) GradFunContext *gf = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterBufferRef *out; - int p, direct = 0; + int p, direct; if (in->perms & AV_PERM_WRITE) { direct = 1; out = in; } else { + direct = 0; out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); if (!out) { avfilter_unref_bufferp(&in); diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 4da80b4858..15d63bab1c 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -50,9 +50,10 @@ void ff_hqdn3d_row_10_x86(uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16 void ff_hqdn3d_row_16_x86(uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16_t *frame_ant, ptrdiff_t w, int16_t *spatial, int16_t *temporal); #define LUT_BITS (depth==16 ? 8 : 4) -#define LOAD(x) (((depth==8 ? src[x] : AV_RN16A(src+(x)*2)) << (16-depth)) + (((1<<(16-depth))-1)>>1)) -#define STORE(x,val) (depth==8 ? dst[x] = (val) >> (16-depth)\ - : AV_WN16A(dst+(x)*2, (val) >> (16-depth))) +#define LOAD(x) (((depth == 8 ? src[x] : AV_RN16A(src + (x) * 2)) << (16 - depth))\ + + (((1 << (16 - depth)) - 1) >> 1)) +#define STORE(x,val) (depth == 8 ? dst[x] = (val) >> (16 - depth) : \ + AV_WN16A(dst + (x) * 2, (val) >> (16 - depth))) av_always_inline static uint32_t lowpass(int prev, int cur, int16_t *coef, int depth) |