/work/svt-av1/Source/Lib/Codec/me_context.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright(c) 2019 Intel Corporation |
3 | | * |
4 | | * This source code is subject to the terms of the BSD 2 Clause License and |
5 | | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
6 | | * was not distributed with this source code in the LICENSE file, you can |
7 | | * obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open |
8 | | * Media Patent License 1.0 was not distributed with this source code in the |
9 | | * PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license. |
10 | | */ |
11 | | |
12 | | #include <stdlib.h> |
13 | | #include <string.h> |
14 | | |
15 | | #include "me_context.h" |
16 | | #include "utility.h" |
17 | | |
18 | 2.84k | static void me_context_dctor(EbPtr p) { |
19 | 2.84k | MeContext* obj = (MeContext*)p; |
20 | | |
21 | 2.84k | EB_FREE_ARRAY(obj->p_eight_pos_sad16x16); |
22 | 2.84k | } |
23 | | |
24 | 2.84k | EbErrorType svt_aom_me_context_ctor(MeContext* object_ptr) { |
25 | 2.84k | object_ptr->dctor = me_context_dctor; |
26 | | |
27 | 2.84k | EB_MALLOC_ARRAY(object_ptr->p_eight_pos_sad16x16, |
28 | 2.84k | 8 * 16); //16= 16 16x16 blocks in a SB. 8=8search points |
29 | | |
30 | | // Initialize Alt-Ref parameters |
31 | 2.84k | object_ptr->me_type = ME_CLOSE_LOOP; |
32 | 2.84k | object_ptr->num_of_list_to_search = 1; |
33 | 2.84k | object_ptr->num_of_ref_pic_to_search[0] = 0; |
34 | 2.84k | object_ptr->num_of_ref_pic_to_search[1] = 0; |
35 | | |
36 | 2.84k | return EB_ErrorNone; |
37 | 2.84k | } |