History

vo_gpu_next: add support for video-target-params

Kacper Michajłow committed 3 years ago

Commit fc5d5331 parent da3bfc91 file · +13 −1Browse files

Unified · Split

video/out/vo_gpu_next.c+13−1
@@ -1114,8 +1114,20 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) · 1113 unmodified lines
11141114 goto done;
11151115 }
11161116
1117− const struct pl_frame *cur_frame = pl_frame_mix_nearest(&mix);
11181117 mp_mutex_lock(&vo->params_mutex);
1118+ if (!vo->target_params)
1119+ vo->target_params = talloc(vo, struct mp_image_params);
1120+ *vo->target_params = (struct mp_image_params){
1121+ .imgfmt_name = swframe.fbo->params.format
1122+ ? swframe.fbo->params.format->name : NULL,
1123+ .w = swframe.fbo->params.w,
1124+ .h = swframe.fbo->params.h,
1125+ .color = target.color,
1126+ .repr = target.repr,
1127+ .rotate = target.rotation,
1128+ };
1129+
1130+ const struct pl_frame *cur_frame = pl_frame_mix_nearest(&mix);
11191131 if (cur_frame && vo->params) {
11201132 vo->params->color.hdr = cur_frame->color.hdr;
11211133 // Augment metadata with peak detection max_pq_y / avg_pq_y

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t