summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c')
-rw-r--r--chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c b/chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c
index 518a23d424a..0448c0d1e89 100644
--- a/chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c
+++ b/chromium/third_party/ffmpeg/libavfilter/vf_hqdn3d.c
@@ -133,7 +133,7 @@ static void denoise_depth(HQDN3DContext *s,
uint16_t *frame_ant = *frame_ant_ptr;
if (!frame_ant) {
uint8_t *frame_src = src;
- *frame_ant_ptr = frame_ant = av_malloc(w*h*sizeof(uint16_t));
+ *frame_ant_ptr = frame_ant = av_malloc_array(w, h*sizeof(uint16_t));
for (y = 0; y < h; y++, src += sstride, frame_ant += w)
for (x = 0; x < w; x++)
frame_ant[x] = LOAD(x);
@@ -147,6 +147,7 @@ static void denoise_depth(HQDN3DContext *s,
else
denoise_temporal(src, dst, frame_ant,
w, h, sstride, dstride, temporal, depth);
+ emms_c();
}
#define denoise(...) \
@@ -258,7 +259,7 @@ static int config_input(AVFilterLink *inlink)
s->vsub = desc->log2_chroma_h;
s->depth = desc->comp[0].depth_minus1+1;
- s->line = av_malloc(inlink->w * sizeof(*s->line));
+ s->line = av_malloc_array(inlink->w, sizeof(*s->line));
if (!s->line)
return AVERROR(ENOMEM);