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

Side by Side Diff: source/libvpx/vp9/decoder/vp9_onyxd_if.c

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_onyxd.h ('k') | source/libvpx/vp9/decoder/vp9_onyxd_int.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 11
12 #include "vp9/common/vp9_onyxc_int.h" 12 #include "vp9/common/vp9_onyxc_int.h"
13 #if CONFIG_POSTPROC 13 #if CONFIG_POSTPROC
14 #include "vp9/common/vp9_postproc.h" 14 #include "vp9/common/vp9_postproc.h"
15 #endif 15 #endif
16 #include "vp9/common/vp9_onyxd.h" 16 #include "vp9/decoder/vp9_onyxd.h"
17 #include "vp9/decoder/vp9_onyxd_int.h" 17 #include "vp9/decoder/vp9_onyxd_int.h"
18 #include "vpx_mem/vpx_mem.h" 18 #include "vpx_mem/vpx_mem.h"
19 #include "vp9/common/vp9_alloccommon.h" 19 #include "vp9/common/vp9_alloccommon.h"
20 #include "vp9/common/vp9_loopfilter.h" 20 #include "vp9/common/vp9_loopfilter.h"
21 #include "vp9/common/vp9_swapyv12buffer.h" 21 #include "vp9/common/vp9_swapyv12buffer.h"
22 #include <stdio.h> 22 #include <stdio.h>
23 #include <assert.h> 23 #include <assert.h>
24 24
25 #include "vp9/common/vp9_quant_common.h" 25 #include "vp9/common/vp9_quant_common.h"
26 #include "vpx_scale/vpxscale.h" 26 #include "vpx_scale/vpx_scale.h"
27 #include "vp9/common/vp9_systemdependent.h" 27 #include "vp9/common/vp9_systemdependent.h"
28 #include "vpx_ports/vpx_timer.h" 28 #include "vpx_ports/vpx_timer.h"
29 #include "vp9/decoder/vp9_decodframe.h" 29 #include "vp9/decoder/vp9_decodframe.h"
30 #include "vp9/decoder/vp9_detokenize.h" 30 #include "vp9/decoder/vp9_detokenize.h"
31 #include "./vpx_scale_rtcd.h" 31 #include "./vpx_scale_rtcd.h"
32 32
33 static int get_free_fb(VP9_COMMON *cm); 33 static int get_free_fb(VP9_COMMON *cm);
34 static void ref_cnt_fb(int *buf, int *idx, int new_idx); 34 static void ref_cnt_fb(int *buf, int *idx, int new_idx);
35 35
36 #define WRITE_RECON_BUFFER 0 36 #define WRITE_RECON_BUFFER 0
37 #if WRITE_RECON_BUFFER == 1 37 #if WRITE_RECON_BUFFER == 1
38 static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) { 38 static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
39 FILE *yuv_file = fopen((char *)name, "ab"); 39 FILE *yuv_file = fopen((char *)name, "ab");
40 unsigned char *src = s->y_buffer; 40 uint8_t *src = s->y_buffer;
41 int h = s->y_height; 41 int h = s->y_height;
42 42
43 do { 43 do {
44 fwrite(src, s->y_width, 1, yuv_file); 44 fwrite(src, s->y_width, 1, yuv_file);
45 src += s->y_stride; 45 src += s->y_stride;
46 } while (--h); 46 } while (--h);
47 47
48 src = s->u_buffer; 48 src = s->u_buffer;
49 h = s->uv_height; 49 h = s->uv_height;
50 50
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 if (cm->show_frame) 375 if (cm->show_frame)
376 write_dx_frame_to_file(cm->frame_to_show, 376 write_dx_frame_to_file(cm->frame_to_show,
377 cm->current_video_frame); 377 cm->current_video_frame);
378 else 378 else
379 write_dx_frame_to_file(cm->frame_to_show, 379 write_dx_frame_to_file(cm->frame_to_show,
380 cm->current_video_frame + 1000); 380 cm->current_video_frame + 1000);
381 #endif 381 #endif
382 382
383 if (cm->filter_level) { 383 if (cm->filter_level) {
384 /* Apply the loop filter if appropriate. */ 384 /* Apply the loop filter if appropriate. */
385 vp9_loop_filter_frame(cm, &pbi->mb); 385 vp9_loop_filter_frame(cm, &pbi->mb, cm->filter_level, 0);
386 } 386 }
387 vp8_yv12_extend_frame_borders(cm->frame_to_show); 387 vp8_yv12_extend_frame_borders(cm->frame_to_show);
388 } 388 }
389 389
390 #if WRITE_RECON_BUFFER == 1 390 #if WRITE_RECON_BUFFER == 1
391 if (cm->show_frame) 391 if (cm->show_frame)
392 recon_write_yuv_frame("recon.yuv", cm->frame_to_show); 392 recon_write_yuv_frame("recon.yuv", cm->frame_to_show);
393 #endif 393 #endif
394 394
395 vp9_clear_system_state(); 395 vp9_clear_system_state();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 sd->uv_height = pbi->common.Height / 2; 445 sd->uv_height = pbi->common.Height / 2;
446 ret = 0; 446 ret = 0;
447 } else { 447 } else {
448 ret = -1; 448 ret = -1;
449 } 449 }
450 450
451 #endif /*!CONFIG_POSTPROC*/ 451 #endif /*!CONFIG_POSTPROC*/
452 vp9_clear_system_state(); 452 vp9_clear_system_state();
453 return ret; 453 return ret;
454 } 454 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_onyxd.h ('k') | source/libvpx/vp9/decoder/vp9_onyxd_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698