Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: source/libvpx/vp8/encoder/onyx_if.c

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp8/encoder/encodeframe.c ('k') | source/libvpx/vp8/encoder/pickinter.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/encoder/onyx_if.c
===================================================================
--- source/libvpx/vp8/encoder/onyx_if.c (revision 278778)
+++ source/libvpx/vp8/encoder/onyx_if.c (working copy)
@@ -98,6 +98,9 @@
#ifdef OUTPUT_YUV_SRC
FILE *yuv_file;
#endif
+#ifdef OUTPUT_YUV_DENOISED
+FILE *yuv_denoised_file;
+#endif
#if 0
FILE *framepsnr;
@@ -1748,7 +1751,8 @@
{
int width = (cpi->oxcf.Width + 15) & ~15;
int height = (cpi->oxcf.Height + 15) & ~15;
- vp8_denoiser_allocate(&cpi->denoiser, width, height);
+ vp8_denoiser_allocate(&cpi->denoiser, width, height,
+ cpi->common.mb_rows, cpi->common.mb_cols);
}
}
#endif
@@ -1961,6 +1965,9 @@
#ifdef OUTPUT_YUV_SRC
yuv_file = fopen("bd.yuv", "ab");
#endif
+#ifdef OUTPUT_YUV_DENOISED
+ yuv_denoised_file = fopen("denoised.yuv", "ab");
+#endif
#if 0
framepsnr = fopen("framepsnr.stt", "a");
@@ -2410,6 +2417,9 @@
#ifdef OUTPUT_YUV_SRC
fclose(yuv_file);
#endif
+#ifdef OUTPUT_YUV_DENOISED
+ fclose(yuv_denoised_file);
+#endif
#if 0
@@ -2610,10 +2620,9 @@
}
-#if OUTPUT_YUV_SRC
-void vp8_write_yuv_frame(const char *name, YV12_BUFFER_CONFIG *s)
+#if defined(OUTPUT_YUV_SRC) || defined(OUTPUT_YUV_DENOISED)
+void vp8_write_yuv_frame(FILE *yuv_file, YV12_BUFFER_CONFIG *s)
{
- FILE *yuv_file = fopen(name, "ab");
unsigned char *src = s->y_buffer;
int h = s->y_height;
@@ -2643,12 +2652,9 @@
src += s->uv_stride;
}
while (--h);
-
- fclose(yuv_file);
}
#endif
-
static void scale_and_extend_source(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
{
VP8_COMMON *cm = &cpi->common;
@@ -3895,7 +3901,7 @@
#endif
#ifdef OUTPUT_YUV_SRC
- vp8_write_yuv_frame(cpi->Source);
+ vp8_write_yuv_frame(yuv_file, cpi->Source);
#endif
do
@@ -4434,6 +4440,11 @@
update_reference_frames(cpi);
+#ifdef OUTPUT_YUV_DENOISED
+ vp8_write_yuv_frame(yuv_denoised_file,
+ &cpi->denoiser.yv12_running_avg[INTRA_FRAME]);
+#endif
+
#if !(CONFIG_REALTIME_ONLY & CONFIG_ONTHEFLY_BITPACKING)
if (cpi->oxcf.error_resilient_mode)
{
« no previous file with comments | « source/libvpx/vp8/encoder/encodeframe.c ('k') | source/libvpx/vp8/encoder/pickinter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698