| OLD | NEW |
| 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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 pick_quickcompress_mode(ctx, duration, deadline); | 872 pick_quickcompress_mode(ctx, duration, deadline); |
| 873 vpx_codec_pkt_list_init(&ctx->pkt_list); | 873 vpx_codec_pkt_list_init(&ctx->pkt_list); |
| 874 | 874 |
| 875 // If no flags are set in the encode call, then use the frame flags as | 875 // If no flags are set in the encode call, then use the frame flags as |
| 876 // defined via the control function: vp8e_set_frame_flags. | 876 // defined via the control function: vp8e_set_frame_flags. |
| 877 if (!flags) { | 877 if (!flags) { |
| 878 flags = ctx->control_frame_flags; | 878 flags = ctx->control_frame_flags; |
| 879 } | 879 } |
| 880 ctx->control_frame_flags = 0; | 880 ctx->control_frame_flags = 0; |
| 881 | 881 |
| 882 res = set_reference_and_update(ctx, flags); | 882 if (!res) |
| 883 res = set_reference_and_update(ctx, flags); |
| 883 | 884 |
| 884 /* Handle fixed keyframe intervals */ | 885 /* Handle fixed keyframe intervals */ |
| 885 if (ctx->cfg.kf_mode == VPX_KF_AUTO | 886 if (ctx->cfg.kf_mode == VPX_KF_AUTO |
| 886 && ctx->cfg.kf_min_dist == ctx->cfg.kf_max_dist) | 887 && ctx->cfg.kf_min_dist == ctx->cfg.kf_max_dist) |
| 887 { | 888 { |
| 888 if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist) | 889 if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist) |
| 889 { | 890 { |
| 890 flags |= VPX_EFLAG_FORCE_KF; | 891 flags |= VPX_EFLAG_FORCE_KF; |
| 891 ctx->fixed_kf_cntr = 1; | 892 ctx->fixed_kf_cntr = 1; |
| 892 } | 893 } |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 1, /* 1 cfg map */ | 1387 1, /* 1 cfg map */ |
| 1387 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t cfg_maps; */ | 1388 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t cfg_maps; */ |
| 1388 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ | 1389 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ |
| 1389 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t get_cx_data; */ | 1390 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t get_cx_data; */ |
| 1390 vp8e_set_config, | 1391 vp8e_set_config, |
| 1391 NULL, | 1392 NULL, |
| 1392 vp8e_get_preview, | 1393 vp8e_get_preview, |
| 1393 vp8e_mr_alloc_mem, | 1394 vp8e_mr_alloc_mem, |
| 1394 } /* encoder functions */ | 1395 } /* encoder functions */ |
| 1395 }; | 1396 }; |
| OLD | NEW |