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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_encoder.h

Issue 898943004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encoder.c » ('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
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 // Multi-threading 451 // Multi-threading
452 int num_workers; 452 int num_workers;
453 VP9Worker *workers; 453 VP9Worker *workers;
454 struct EncWorkerData *tile_thr_data; 454 struct EncWorkerData *tile_thr_data;
455 VP9LfSync lf_row_sync; 455 VP9LfSync lf_row_sync;
456 } VP9_COMP; 456 } VP9_COMP;
457 457
458 void vp9_initialize_enc(void); 458 void vp9_initialize_enc(void);
459 459
460 struct VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf); 460 struct VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf,
461 BufferPool *const pool);
461 void vp9_remove_compressor(VP9_COMP *cpi); 462 void vp9_remove_compressor(VP9_COMP *cpi);
462 463
463 void vp9_change_config(VP9_COMP *cpi, const VP9EncoderConfig *oxcf); 464 void vp9_change_config(VP9_COMP *cpi, const VP9EncoderConfig *oxcf);
464 465
465 // receive a frames worth of data. caller can assume that a copy of this 466 // receive a frames worth of data. caller can assume that a copy of this
466 // frame is made and not just a copy of the pointer.. 467 // frame is made and not just a copy of the pointer..
467 int vp9_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags, 468 int vp9_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags,
468 YV12_BUFFER_CONFIG *sd, int64_t time_stamp, 469 YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
469 int64_t end_time_stamp); 470 int64_t end_time_stamp);
470 471
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 return cpi->lst_fb_idx; 512 return cpi->lst_fb_idx;
512 } else if (ref_frame == GOLDEN_FRAME) { 513 } else if (ref_frame == GOLDEN_FRAME) {
513 return cpi->gld_fb_idx; 514 return cpi->gld_fb_idx;
514 } else { 515 } else {
515 return cpi->alt_fb_idx; 516 return cpi->alt_fb_idx;
516 } 517 }
517 } 518 }
518 519
519 static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer( 520 static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer(
520 VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) { 521 VP9_COMP *cpi, MV_REFERENCE_FRAME ref_frame) {
521 VP9_COMMON * const cm = &cpi->common; 522 VP9_COMMON *const cm = &cpi->common;
522 return &cm->frame_bufs[cm->ref_frame_map[get_ref_frame_idx(cpi, ref_frame)]] 523 BufferPool *const pool = cm->buffer_pool;
524 return &pool->frame_bufs[cm->ref_frame_map[get_ref_frame_idx(cpi, ref_frame)]]
523 .buf; 525 .buf;
524 } 526 }
525 527
526 static INLINE int get_token_alloc(int mb_rows, int mb_cols) { 528 static INLINE int get_token_alloc(int mb_rows, int mb_cols) {
527 // TODO(JBB): double check we can't exceed this token count if we have a 529 // TODO(JBB): double check we can't exceed this token count if we have a
528 // 32x32 transform crossing a boundary at a multiple of 16. 530 // 32x32 transform crossing a boundary at a multiple of 16.
529 // mb_rows, cols are in units of 16 pixels. We assume 3 planes all at full 531 // mb_rows, cols are in units of 16 pixels. We assume 3 planes all at full
530 // resolution. We assume up to 1 token per pixel, and then allow 532 // resolution. We assume up to 1 token per pixel, and then allow
531 // a head room of 4. 533 // a head room of 4.
532 return mb_rows * mb_cols * (16 * 16 * 3 + 4); 534 return mb_rows * mb_cols * (16 * 16 * 3 + 4);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 591
590 static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) { 592 static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) {
591 return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL; 593 return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL;
592 } 594 }
593 595
594 #ifdef __cplusplus 596 #ifdef __cplusplus
595 } // extern "C" 597 } // extern "C"
596 #endif 598 #endif
597 599
598 #endif // VP9_ENCODER_VP9_ENCODER_H_ 600 #endif // VP9_ENCODER_VP9_ENCODER_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_encodeframe.c ('k') | source/libvpx/vp9/encoder/vp9_encoder.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698