xref: /rockchip-linux_mpp/mpp/codec/rc/jpege_rc.c (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2016 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #define MODULE_TAG "jpege_rc"
18 
19 #include <math.h>
20 #include <string.h>
21 
22 #include "mpp_env.h"
23 #include "mpp_mem.h"
24 #include "mpp_common.h"
25 
26 #include "rc_debug.h"
27 #include "rc_ctx.h"
28 #include "rc_model_v2.h"
29 
30 const RcImplApi default_jpege = {
31     "default",
32     MPP_VIDEO_CodingMJPEG,
33     sizeof(RcModelV2Ctx),
34     rc_model_v2_init,
35     rc_model_v2_deinit,
36     NULL,
37     rc_model_v2_check_reenc,
38     rc_model_v2_start,
39     rc_model_v2_end,
40     rc_model_v2_hal_start,
41     rc_model_v2_hal_end,
42 };
43