Index: source/libvpx/vp9/encoder/vp9_encoder.c |
diff --git a/source/libvpx/vp9/encoder/vp9_encoder.c b/source/libvpx/vp9/encoder/vp9_encoder.c |
index f35dd086e95a87ad5c2dc012ec9824121fe20098..35fea57f5372ae0f2d7e5bef681420a352f20981 100644 |
--- a/source/libvpx/vp9/encoder/vp9_encoder.c |
+++ b/source/libvpx/vp9/encoder/vp9_encoder.c |
@@ -607,7 +607,7 @@ static void init_config(struct VP9_COMP *cpi, VP9EncoderConfig *oxcf) { |
#if CONFIG_VP9_HIGHBITDEPTH |
cm->use_highbitdepth = oxcf->use_highbitdepth; |
#endif |
- cm->color_space = UNKNOWN; |
+ cm->color_space = oxcf->color_space; |
cm->width = oxcf->width; |
cm->height = oxcf->height; |
@@ -1264,6 +1264,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) { |
if (cm->profile != oxcf->profile) |
cm->profile = oxcf->profile; |
cm->bit_depth = oxcf->bit_depth; |
+ cm->color_space = oxcf->color_space; |
if (cm->profile <= PROFILE_1) |
assert(cm->bit_depth == VPX_BITS_8); |
@@ -1785,7 +1786,7 @@ void vp9_remove_compressor(VP9_COMP *cpi) { |
for (t = 0; t < cpi->num_workers; ++t) { |
VP9Worker *const worker = &cpi->workers[t]; |
- EncWorkerData *const thread_data = (EncWorkerData*)worker->data1; |
+ EncWorkerData *const thread_data = &cpi->tile_thr_data[t]; |
// Deallocate allocated threads. |
vp9_get_worker_interface()->end(worker); |
@@ -1796,11 +1797,13 @@ void vp9_remove_compressor(VP9_COMP *cpi) { |
vp9_free_pc_tree(thread_data->td); |
vpx_free(thread_data->td); |
} |
- |
- vpx_free(worker->data1); |
} |
+ vpx_free(cpi->tile_thr_data); |
vpx_free(cpi->workers); |
+ if (cpi->num_workers > 1) |
+ vp9_loop_filter_dealloc(&cpi->lf_row_sync); |
+ |
dealloc_compressor_data(cpi); |
for (i = 0; i < sizeof(cpi->mbgraph_stats) / |
@@ -2436,7 +2439,13 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) { |
} |
if (lf->filter_level > 0) { |
- vp9_loop_filter_frame(cm->frame_to_show, cm, xd, lf->filter_level, 0, 0); |
+ if (cpi->num_workers > 1) |
+ vp9_loop_filter_frame_mt(cm->frame_to_show, cm, xd->plane, |
+ lf->filter_level, 0, 0, |
+ cpi->workers, cpi->num_workers, |
+ &cpi->lf_row_sync); |
+ else |
+ vp9_loop_filter_frame(cm->frame_to_show, cm, xd, lf->filter_level, 0, 0); |
} |
vp9_extend_frame_inner_borders(cm->frame_to_show); |
@@ -3436,13 +3445,13 @@ int vp9_receive_raw_frame(VP9_COMP *cpi, unsigned int frame_flags, |
if ((cm->profile == PROFILE_0 || cm->profile == PROFILE_2) && |
(subsampling_x != 1 || subsampling_y != 1)) { |
vpx_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, |
- "Non-4:2:0 color space requires profile 1 or 3"); |
+ "Non-4:2:0 color format requires profile 1 or 3"); |
res = -1; |
} |
if ((cm->profile == PROFILE_1 || cm->profile == PROFILE_3) && |
(subsampling_x == 1 && subsampling_y == 1)) { |
vpx_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, |
- "4:2:0 color space requires profile 0 or 2"); |
+ "4:2:0 color format requires profile 0 or 2"); |
res = -1; |
} |