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

Side by Side Diff: source/libvpx/vp9/vp9_dx_iface.c

Issue 1169543007: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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/vp9_cx_iface.c ('k') | source/libvpx/vpx/exports_dec » ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 int postproc_cfg_set; 48 int postproc_cfg_set;
49 vp8_postproc_cfg_t postproc_cfg; 49 vp8_postproc_cfg_t postproc_cfg;
50 vpx_decrypt_cb decrypt_cb; 50 vpx_decrypt_cb decrypt_cb;
51 void *decrypt_state; 51 void *decrypt_state;
52 vpx_image_t img; 52 vpx_image_t img;
53 int img_avail; 53 int img_avail;
54 int flushed; 54 int flushed;
55 int invert_tile_order; 55 int invert_tile_order;
56 int last_show_frame; // Index of last output frame. 56 int last_show_frame; // Index of last output frame.
57 int byte_alignment; 57 int byte_alignment;
58 int skip_loop_filter;
58 59
59 // Frame parallel related. 60 // Frame parallel related.
60 int frame_parallel_decode; // frame-based threading. 61 int frame_parallel_decode; // frame-based threading.
61 VP9Worker *frame_workers; 62 VP9Worker *frame_workers;
62 int num_frame_workers; 63 int num_frame_workers;
63 int next_submit_worker_id; 64 int next_submit_worker_id;
64 int last_submit_worker_id; 65 int last_submit_worker_id;
65 int next_output_worker_id; 66 int next_output_worker_id;
66 int available_threads; 67 int available_threads;
67 cache_frame frame_cache[FRAME_CACHE_SIZE]; 68 cache_frame frame_cache[FRAME_CACHE_SIZE];
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 int i; 279 int i;
279 280
280 for (i = 0; i < ctx->num_frame_workers; ++i) { 281 for (i = 0; i < ctx->num_frame_workers; ++i) {
281 VP9Worker *const worker = &ctx->frame_workers[i]; 282 VP9Worker *const worker = &ctx->frame_workers[i];
282 FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; 283 FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
283 VP9_COMMON *const cm = &frame_worker_data->pbi->common; 284 VP9_COMMON *const cm = &frame_worker_data->pbi->common;
284 BufferPool *const pool = cm->buffer_pool; 285 BufferPool *const pool = cm->buffer_pool;
285 286
286 cm->new_fb_idx = INVALID_IDX; 287 cm->new_fb_idx = INVALID_IDX;
287 cm->byte_alignment = ctx->byte_alignment; 288 cm->byte_alignment = ctx->byte_alignment;
289 cm->skip_loop_filter = ctx->skip_loop_filter;
288 290
289 if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) { 291 if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) {
290 pool->get_fb_cb = ctx->get_ext_fb_cb; 292 pool->get_fb_cb = ctx->get_ext_fb_cb;
291 pool->release_fb_cb = ctx->release_ext_fb_cb; 293 pool->release_fb_cb = ctx->release_ext_fb_cb;
292 pool->cb_priv = ctx->ext_priv; 294 pool->cb_priv = ctx->ext_priv;
293 } else { 295 } else {
294 pool->get_fb_cb = vp9_get_frame_buffer; 296 pool->get_fb_cb = vp9_get_frame_buffer;
295 pool->release_fb_cb = vp9_release_frame_buffer; 297 pool->release_fb_cb = vp9_release_frame_buffer;
296 298
297 if (vp9_alloc_internal_frame_buffers(&pool->int_frame_buffers)) 299 if (vp9_alloc_internal_frame_buffers(&pool->int_frame_buffers))
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 ctx->byte_alignment = byte_alignment; 1054 ctx->byte_alignment = byte_alignment;
1053 if (ctx->frame_workers) { 1055 if (ctx->frame_workers) {
1054 VP9Worker *const worker = ctx->frame_workers; 1056 VP9Worker *const worker = ctx->frame_workers;
1055 FrameWorkerData *const frame_worker_data = 1057 FrameWorkerData *const frame_worker_data =
1056 (FrameWorkerData *)worker->data1; 1058 (FrameWorkerData *)worker->data1;
1057 frame_worker_data->pbi->common.byte_alignment = byte_alignment; 1059 frame_worker_data->pbi->common.byte_alignment = byte_alignment;
1058 } 1060 }
1059 return VPX_CODEC_OK; 1061 return VPX_CODEC_OK;
1060 } 1062 }
1061 1063
1064 static vpx_codec_err_t ctrl_set_skip_loop_filter(vpx_codec_alg_priv_t *ctx,
1065 va_list args) {
1066 ctx->skip_loop_filter = va_arg(args, int);
1067
1068 if (ctx->frame_workers) {
1069 VP9Worker *const worker = ctx->frame_workers;
1070 FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
1071 frame_worker_data->pbi->common.skip_loop_filter = ctx->skip_loop_filter;
1072 }
1073
1074 return VPX_CODEC_OK;
1075 }
1076
1062 static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = { 1077 static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
1063 {VP8_COPY_REFERENCE, ctrl_copy_reference}, 1078 {VP8_COPY_REFERENCE, ctrl_copy_reference},
1064 1079
1065 // Setters 1080 // Setters
1066 {VP8_SET_REFERENCE, ctrl_set_reference}, 1081 {VP8_SET_REFERENCE, ctrl_set_reference},
1067 {VP8_SET_POSTPROC, ctrl_set_postproc}, 1082 {VP8_SET_POSTPROC, ctrl_set_postproc},
1068 {VP8_SET_DBG_COLOR_REF_FRAME, ctrl_set_dbg_options}, 1083 {VP8_SET_DBG_COLOR_REF_FRAME, ctrl_set_dbg_options},
1069 {VP8_SET_DBG_COLOR_MB_MODES, ctrl_set_dbg_options}, 1084 {VP8_SET_DBG_COLOR_MB_MODES, ctrl_set_dbg_options},
1070 {VP8_SET_DBG_COLOR_B_MODES, ctrl_set_dbg_options}, 1085 {VP8_SET_DBG_COLOR_B_MODES, ctrl_set_dbg_options},
1071 {VP8_SET_DBG_DISPLAY_MV, ctrl_set_dbg_options}, 1086 {VP8_SET_DBG_DISPLAY_MV, ctrl_set_dbg_options},
1072 {VP9_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order}, 1087 {VP9_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order},
1073 {VPXD_SET_DECRYPTOR, ctrl_set_decryptor}, 1088 {VPXD_SET_DECRYPTOR, ctrl_set_decryptor},
1074 {VP9_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment}, 1089 {VP9_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment},
1090 {VP9_SET_SKIP_LOOP_FILTER, ctrl_set_skip_loop_filter},
1075 1091
1076 // Getters 1092 // Getters
1077 {VP8D_GET_LAST_REF_UPDATES, ctrl_get_last_ref_updates}, 1093 {VP8D_GET_LAST_REF_UPDATES, ctrl_get_last_ref_updates},
1078 {VP8D_GET_FRAME_CORRUPTED, ctrl_get_frame_corrupted}, 1094 {VP8D_GET_FRAME_CORRUPTED, ctrl_get_frame_corrupted},
1079 {VP9_GET_REFERENCE, ctrl_get_reference}, 1095 {VP9_GET_REFERENCE, ctrl_get_reference},
1080 {VP9D_GET_DISPLAY_SIZE, ctrl_get_display_size}, 1096 {VP9D_GET_DISPLAY_SIZE, ctrl_get_display_size},
1081 {VP9D_GET_BIT_DEPTH, ctrl_get_bit_depth}, 1097 {VP9D_GET_BIT_DEPTH, ctrl_get_bit_depth},
1082 {VP9D_GET_FRAME_SIZE, ctrl_get_frame_size}, 1098 {VP9D_GET_FRAME_SIZE, ctrl_get_frame_size},
1083 1099
1084 { -1, NULL}, 1100 { -1, NULL},
(...skipping 21 matching lines...) Expand all
1106 0, 1122 0,
1107 NULL, // vpx_codec_enc_cfg_map_t 1123 NULL, // vpx_codec_enc_cfg_map_t
1108 NULL, // vpx_codec_encode_fn_t 1124 NULL, // vpx_codec_encode_fn_t
1109 NULL, // vpx_codec_get_cx_data_fn_t 1125 NULL, // vpx_codec_get_cx_data_fn_t
1110 NULL, // vpx_codec_enc_config_set_fn_t 1126 NULL, // vpx_codec_enc_config_set_fn_t
1111 NULL, // vpx_codec_get_global_headers_fn_t 1127 NULL, // vpx_codec_get_global_headers_fn_t
1112 NULL, // vpx_codec_get_preview_frame_fn_t 1128 NULL, // vpx_codec_get_preview_frame_fn_t
1113 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t 1129 NULL // vpx_codec_enc_mr_get_mem_loc_fn_t
1114 } 1130 }
1115 }; 1131 };
OLDNEW
« no previous file with comments | « source/libvpx/vp9/vp9_cx_iface.c ('k') | source/libvpx/vpx/exports_dec » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698