mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user