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

Side by Side Diff: source/libvpx/vp8/encoder/onyx_int.h

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years 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
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
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 int rd_thresh_mult[MAX_MODES]; 356 int rd_thresh_mult[MAX_MODES];
357 int rd_baseline_thresh[MAX_MODES]; 357 int rd_baseline_thresh[MAX_MODES];
358 int rd_threshes[MAX_MODES]; 358 int rd_threshes[MAX_MODES];
359 359
360 int RDMULT; 360 int RDMULT;
361 int RDDIV ; 361 int RDDIV ;
362 362
363 CODING_CONTEXT coding_context; 363 CODING_CONTEXT coding_context;
364 364
365 /* Rate targetting variables */ 365 /* Rate targetting variables */
366 int64_t prediction_error;
366 int64_t last_prediction_error; 367 int64_t last_prediction_error;
368 int64_t intra_error;
367 int64_t last_intra_error; 369 int64_t last_intra_error;
368 370
369 int this_frame_target; 371 int this_frame_target;
370 int projected_frame_size; 372 int projected_frame_size;
371 int last_q[2]; /* Separate values for Intra/Inter */ 373 int last_q[2]; /* Separate values for Intra/Inter */
372 374
373 double rate_correction_factor; 375 double rate_correction_factor;
374 double key_frame_rate_correction_factor; 376 double key_frame_rate_correction_factor;
375 double gf_rate_correction_factor; 377 double gf_rate_correction_factor;
376 378
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 int worst_quality; 445 int worst_quality;
444 int active_worst_quality; 446 int active_worst_quality;
445 int best_quality; 447 int best_quality;
446 int active_best_quality; 448 int active_best_quality;
447 449
448 int cq_target_quality; 450 int cq_target_quality;
449 451
450 int drop_frames_allowed; /* Are we permitted to drop frames? */ 452 int drop_frames_allowed; /* Are we permitted to drop frames? */
451 int drop_frame; /* Drop this frame? */ 453 int drop_frame; /* Drop this frame? */
452 454
455 int ymode_count [VP8_YMODES]; /* intra MB type cts this frame */
456 int uv_mode_count[VP8_UV_MODES]; /* intra MB type cts this frame */
457
458 unsigned int MVcount [2] [MVvals]; /* (row,col) MV cts this frame */
459
460 unsigned int coef_counts [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MA X_ENTROPY_TOKENS]; /* for this frame */
461
453 vp8_prob frame_coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [E NTROPY_NODES]; 462 vp8_prob frame_coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [E NTROPY_NODES];
454 char update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_N ODES]; 463 char update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_N ODES];
455 464
456 unsigned int frame_branch_ct [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES][2]; 465 unsigned int frame_branch_ct [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES][2];
457 466
458 int gfu_boost; 467 int gfu_boost;
459 int kf_boost; 468 int kf_boost;
460 int last_boost; 469 int last_boost;
461 470
462 int target_bandwidth; 471 int target_bandwidth;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 513
505 /* Data used for real time conferencing mode to help determine if it 514 /* Data used for real time conferencing mode to help determine if it
506 * would be good to update the gf 515 * would be good to update the gf
507 */ 516 */
508 int inter_zz_count; 517 int inter_zz_count;
509 /* Count ZEROMV on all reference frames. */ 518 /* Count ZEROMV on all reference frames. */
510 int zeromv_count; 519 int zeromv_count;
511 int lf_zeromv_pct; 520 int lf_zeromv_pct;
512 int gf_bad_count; 521 int gf_bad_count;
513 int gf_update_recommended; 522 int gf_update_recommended;
523 int skip_true_count;
514 524
515 unsigned char *segmentation_map; 525 unsigned char *segmentation_map;
516 signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; 526 signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS];
517 int segment_encode_breakout[MAX_MB_SEGMENTS]; 527 int segment_encode_breakout[MAX_MB_SEGMENTS];
518 528
519 unsigned char *active_map; 529 unsigned char *active_map;
520 unsigned int active_map_enabled; 530 unsigned int active_map_enabled;
521 531
522 /* Video conferencing cyclic refresh mode flags. This is a mode 532 /* Video conferencing cyclic refresh mode flags. This is a mode
523 * designed to clean up the background over time in live encoding 533 * designed to clean up the background over time in live encoding
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 double total_ssimg_v; 652 double total_ssimg_v;
643 double total_ssimg_all; 653 double total_ssimg_all;
644 654
645 int b_calculate_ssimg; 655 int b_calculate_ssimg;
646 #endif 656 #endif
647 int b_calculate_psnr; 657 int b_calculate_psnr;
648 658
649 /* Per MB activity measurement */ 659 /* Per MB activity measurement */
650 unsigned int activity_avg; 660 unsigned int activity_avg;
651 unsigned int * mb_activity_map; 661 unsigned int * mb_activity_map;
662 int * mb_norm_activity_map;
652 663
653 /* Record of which MBs still refer to last golden frame either 664 /* Record of which MBs still refer to last golden frame either
654 * directly or through 0,0 665 * directly or through 0,0
655 */ 666 */
656 unsigned char *gf_active_flags; 667 unsigned char *gf_active_flags;
657 int gf_active_count; 668 int gf_active_count;
658 669
659 int output_partition; 670 int output_partition;
660 671
661 /* Store last frame's MV info for next frame MV prediction */ 672 /* Store last frame's MV info for next frame MV prediction */
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; 722 [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS];
712 } rd_costs; 723 } rd_costs;
713 } VP8_COMP; 724 } VP8_COMP;
714 725
715 void control_data_rate(VP8_COMP *cpi); 726 void control_data_rate(VP8_COMP *cpi);
716 727
717 void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char *dest_ end, unsigned long *size); 728 void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char *dest_ end, unsigned long *size);
718 729
719 int rd_cost_intra_mb(MACROBLOCKD *x); 730 int rd_cost_intra_mb(MACROBLOCKD *x);
720 731
721 void vp8_tokenize_mb(VP8_COMP *, MACROBLOCK *, TOKENEXTRA **); 732 void vp8_tokenize_mb(VP8_COMP *, MACROBLOCKD *, TOKENEXTRA **);
722 733
723 void vp8_set_speed_features(VP8_COMP *cpi); 734 void vp8_set_speed_features(VP8_COMP *cpi);
724 735
725 #if CONFIG_DEBUG 736 #if CONFIG_DEBUG
726 #define CHECK_MEM_ERROR(lval,expr) do {\ 737 #define CHECK_MEM_ERROR(lval,expr) do {\
727 lval = (expr); \ 738 lval = (expr); \
728 if(!lval) \ 739 if(!lval) \
729 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,\ 740 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,\
730 "Failed to allocate "#lval" at %s:%d", \ 741 "Failed to allocate "#lval" at %s:%d", \
731 __FILE__,__LINE__);\ 742 __FILE__,__LINE__);\
732 } while(0) 743 } while(0)
733 #else 744 #else
734 #define CHECK_MEM_ERROR(lval,expr) do {\ 745 #define CHECK_MEM_ERROR(lval,expr) do {\
735 lval = (expr); \ 746 lval = (expr); \
736 if(!lval) \ 747 if(!lval) \
737 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,\ 748 vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,\
738 "Failed to allocate "#lval);\ 749 "Failed to allocate "#lval);\
739 } while(0) 750 } while(0)
740 #endif 751 #endif
741 #endif 752 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698