eba9c762a1
Currently, VP9 supports column-tile encoding, which allows a frame to be encoded in multiple column tiles independently. The number of column tiles are set by encoder option "--tile-columns". This provides a way to encode a frame in parallel. Based on previous set of patches, this patch implemented the tile- based multi-threaded encoder. Each thread processes one or more tiles. Usage: For HD clips: --tile-columns=2 --threads=1/2/3/4 While using 4 threads, tests showed that the encoder achieved 2.3X - 2.5X speedup at good-quality speed 3, and 2X speedup at realtime speed 5. Change-Id: Ied987f8f2618b1283a8643ad255e88341733c9d4
46 lines
1.3 KiB
C
46 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
|
|
#ifndef VP9_ENCODER_VP9_ENCODEFRAME_H_
|
|
#define VP9_ENCODER_VP9_ENCODEFRAME_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct macroblock;
|
|
struct yv12_buffer_config;
|
|
struct VP9_COMP;
|
|
struct ThreadData;
|
|
|
|
// Constants used in SOURCE_VAR_BASED_PARTITION
|
|
#define VAR_HIST_MAX_BG_VAR 1000
|
|
#define VAR_HIST_FACTOR 10
|
|
#define VAR_HIST_BINS (VAR_HIST_MAX_BG_VAR / VAR_HIST_FACTOR + 1)
|
|
#define VAR_HIST_LARGE_CUT_OFF 75
|
|
#define VAR_HIST_SMALL_CUT_OFF 45
|
|
|
|
void vp9_setup_src_planes(struct macroblock *x,
|
|
const struct yv12_buffer_config *src,
|
|
int mi_row, int mi_col);
|
|
|
|
void vp9_encode_frame(struct VP9_COMP *cpi);
|
|
|
|
void vp9_init_tile_data(struct VP9_COMP *cpi);
|
|
void vp9_encode_tile(struct VP9_COMP *cpi, struct ThreadData *td,
|
|
int tile_row, int tile_col);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif // VP9_ENCODER_VP9_ENCODEFRAME_H_
|