1 /*
2 * VC1 HW decode acceleration through NVDEC
3 *
4 * Copyright (c) 2017 Philip Langdale
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #include "config_components.h"
24
31
33 {
36
38 CUVIDPICPARAMS *pp = &
ctx->pic_params;
41 AVFrame *cur_frame =
s->cur_pic.ptr->f;
42
44
48
51
52 *pp = (CUVIDPICPARAMS) {
53 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
54 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
55 .CurrPicIdx = cf->
idx,
59
64
65 .CodecSpecific.vc1 = {
68 .FrameWidth = cur_frame->
width,
69 .FrameHeight = cur_frame->
height,
70
75 .progressive_fcm = v->
fcm == 0,
76
87 .maxbframes =
s->max_b_frames,
88
104 }
105 };
106
107 return 0;
108 }
109
112 {
113 // Each frame can at most have one P and one B reference
115 }
116
118 .
p.
name =
"vc1_nvdec",
129 };
130
131 #if CONFIG_WMV3_NVDEC_HWACCEL
133 .
p.
name =
"wmv3_nvdec",
144 };
145 #endif