OSDN Git Service

Fix bug that was causing one sec. of audio to be dropped on many ffmpeg files. Proble...
[handbrake-jp/handbrake-jp-git.git] / libhb / denoise.c
index 6d335fc..26e2535 100644 (file)
@@ -17,7 +17,7 @@
 */
 
 #include "hb.h"
-#include "libavcodec/avcodec.h"
+#include "hbffmpeg.h"
 #include "mpeg2dec/mpeg2.h"
 
 #define HQDN3D_SPATIAL_LUMA_DEFAULT    4.0f
@@ -368,8 +368,7 @@ hb_filter_private_t * hb_denoise_init( int pix_fmt,
     hqdn3d_precalc_coef( pv->hqdn3d_coef[2], spatial_chroma );
     hqdn3d_precalc_coef( pv->hqdn3d_coef[3], temporal_chroma );
 
-    int buf_size = 3 * width * height / 2;
-    pv->buf_out = hb_buffer_init( buf_size );
+    pv->buf_out = hb_video_buffer_init( width, height );
 
     return pv;
 }