@@ -141,8 +141,8 @@ static inline bool can_reuse_mix_texture(const struct obs_core_video_mix *mix, s
141141 continue ;
142142 if (other -> render_space != mix -> render_space )
143143 continue ;
144- if (other -> ovi -> base_width != mix -> ovi -> base_width ||
145- other -> ovi -> base_height != mix -> ovi -> base_height )
144+ if (other -> ovi . base_width != mix -> ovi . base_width ||
145+ other -> ovi . base_height != mix -> ovi . base_height )
146146 continue ;
147147 if (!other -> texture_rendered )
148148 continue ;
@@ -179,15 +179,13 @@ static inline void render_main_texture(struct obs_core_video_mix *video)
179179 gs_set_render_target_with_color_space (video -> render_texture , NULL , video -> render_space );
180180 gs_clear (GS_CLEAR_COLOR , & clear_color , 1.0f , 0 );
181181
182- set_render_size (video -> ovi -> base_width , video -> ovi -> base_height );
182+ set_render_size (video -> ovi . base_width , video -> ovi . base_height );
183183
184184 pthread_mutex_lock (& obs -> data .draw_callbacks_mutex );
185185
186186 for (size_t i = obs -> data .draw_callbacks .num ; i > 0 ; i -- ) {
187- struct draw_callback * const callback =
188- obs -> data .draw_callbacks .array + (i - 1 );
189- callback -> draw (callback -> param , video -> ovi -> base_width ,
190- video -> ovi -> base_height );
187+ struct draw_callback * const callback = obs -> data .draw_callbacks .array + (i - 1 );
188+ callback -> draw (callback -> param , video -> ovi .base_width , video -> ovi .base_height );
191189 }
192190
193191 pthread_mutex_unlock (& obs -> data .draw_callbacks_mutex );
@@ -224,12 +222,12 @@ static inline gs_effect_t *get_scale_effect_internal(struct obs_core_video_mix *
224222 /* if the dimension is under half the size of the original image,
225223 * bicubic/lanczos can't sample enough pixels to create an accurate
226224 * image, so use the bilinear low resolution effect instead */
227- if (info -> width < (mix -> ovi -> base_width / 2 ) &&
228- info -> height < (mix -> ovi -> base_height / 2 )) {
225+ if (info -> width < (mix -> ovi . base_width / 2 ) &&
226+ info -> height < (mix -> ovi . base_height / 2 )) {
229227 return video -> bilinear_lowres_effect ;
230228 }
231229
232- switch (mix -> ovi -> scale_type ) {
230+ switch (mix -> ovi . scale_type ) {
233231 case OBS_SCALE_BILINEAR :
234232 return video -> default_effect ;
235233 case OBS_SCALE_LANCZOS :
@@ -246,8 +244,8 @@ static inline gs_effect_t *get_scale_effect_internal(struct obs_core_video_mix *
246244static inline bool resolution_close (struct obs_core_video_mix * video ,
247245 uint32_t width , uint32_t height )
248246{
249- long width_cmp = (long )video -> ovi -> base_width - (long )width ;
250- long height_cmp = (long )video -> ovi -> base_height - (long )height ;
247+ long width_cmp = (long )video -> ovi . base_width - (long )width ;
248+ long height_cmp = (long )video -> ovi . base_height - (long )height ;
251249
252250 return labs (width_cmp ) <= 16 && labs (height_cmp ) <= 16 ;
253251}
@@ -276,8 +274,7 @@ static gs_texture_t *render_output_texture(struct obs_core_video_mix *mix)
276274 uint32_t width = gs_texture_get_width (target );
277275 uint32_t height = gs_texture_get_height (target );
278276
279- if ((width == mix -> ovi -> base_width ) &&
280- (height == mix -> ovi -> base_height ))
277+ if ((width == mix -> ovi .base_width ) && (height == mix -> ovi .base_height ))
281278 return texture ;
282279
283280 profile_start (render_output_texture_name );
@@ -295,15 +292,13 @@ static gs_texture_t *render_output_texture(struct obs_core_video_mix *mix)
295292
296293 if (bres ) {
297294 struct vec2 base ;
298- vec2_set (& base , (float )mix -> ovi -> base_width ,
299- (float )mix -> ovi -> base_height );
295+ vec2_set (& base , (float )mix -> ovi .base_width , (float )mix -> ovi .base_height );
300296 gs_effect_set_vec2 (bres , & base );
301297 }
302298
303299 if (bres_i ) {
304300 struct vec2 base_i ;
305- vec2_set (& base_i , 1.0f / (float )mix -> ovi -> base_width ,
306- 1.0f / (float )mix -> ovi -> base_height );
301+ vec2_set (& base_i , 1.0f / (float )mix -> ovi .base_width , 1.0f / (float )mix -> ovi .base_height );
307302 gs_effect_set_vec2 (bres_i , & base_i );
308303 }
309304
@@ -883,7 +878,7 @@ static inline void output_frame(struct obs_core_video_mix *video)
883878 else
884879 return ;
885880
886- obs_set_video_rendering_canvas (video -> ovi );
881+ obs_set_video_render_context (video );
887882
888883 const bool raw_active = video -> raw_was_active ;
889884 const bool gpu_active = video -> gpu_was_active ;
0 commit comments