Lines Matching refs:oci
273 int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, in vp8_post_proc_frame() argument
275 int q = oci->filter_level * 10 / 6; in vp8_post_proc_frame()
280 if (!oci->frame_to_show) return -1; in vp8_post_proc_frame()
285 *dest = *oci->frame_to_show; in vp8_post_proc_frame()
288 dest->y_width = oci->Width; in vp8_post_proc_frame()
289 dest->y_height = oci->Height; in vp8_post_proc_frame()
291 oci->postproc_state.last_base_qindex = oci->base_qindex; in vp8_post_proc_frame()
292 oci->postproc_state.last_frame_valid = 1; in vp8_post_proc_frame()
296 if (!oci->postproc_state.generated_noise) { in vp8_post_proc_frame()
297 oci->postproc_state.generated_noise = vpx_calloc( in vp8_post_proc_frame()
298 oci->Width + 256, sizeof(*oci->postproc_state.generated_noise)); in vp8_post_proc_frame()
299 if (!oci->postproc_state.generated_noise) return 1; in vp8_post_proc_frame()
304 if ((flags & VP8D_MFQE) && !oci->post_proc_buffer_int_used) { in vp8_post_proc_frame()
306 int width = (oci->Width + 15) & ~15; in vp8_post_proc_frame()
307 int height = (oci->Height + 15) & ~15; in vp8_post_proc_frame()
309 if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer_int, width, height, in vp8_post_proc_frame()
311 vpx_internal_error(&oci->error, VPX_CODEC_MEM_ERROR, in vp8_post_proc_frame()
315 oci->post_proc_buffer_int_used = 1; in vp8_post_proc_frame()
320 memset((&oci->post_proc_buffer_int)->buffer_alloc, 128, in vp8_post_proc_frame()
321 (&oci->post_proc_buffer)->frame_size); in vp8_post_proc_frame()
327 if ((flags & VP8D_MFQE) && oci->postproc_state.last_frame_valid && in vp8_post_proc_frame()
328 oci->current_video_frame >= 2 && in vp8_post_proc_frame()
329 oci->postproc_state.last_base_qindex < 60 && in vp8_post_proc_frame()
330 oci->base_qindex - oci->postproc_state.last_base_qindex >= 20) { in vp8_post_proc_frame()
331 vp8_multiframe_quality_enhance(oci); in vp8_post_proc_frame()
333 oci->post_proc_buffer_int_used) { in vp8_post_proc_frame()
334 vp8_yv12_copy_frame(&oci->post_proc_buffer, &oci->post_proc_buffer_int); in vp8_post_proc_frame()
336 vp8_deblock(oci, &oci->post_proc_buffer_int, &oci->post_proc_buffer, in vp8_post_proc_frame()
338 vp8_de_mblock(&oci->post_proc_buffer, q + (deblock_level - 5) * 10); in vp8_post_proc_frame()
340 vp8_deblock(oci, &oci->post_proc_buffer_int, &oci->post_proc_buffer, q, in vp8_post_proc_frame()
345 oci->postproc_state.last_base_qindex = in vp8_post_proc_frame()
346 (3 * oci->postproc_state.last_base_qindex + oci->base_qindex) >> 2; in vp8_post_proc_frame()
348 vp8_deblock(oci, oci->frame_to_show, &oci->post_proc_buffer, in vp8_post_proc_frame()
350 vp8_de_mblock(&oci->post_proc_buffer, q + (deblock_level - 5) * 10); in vp8_post_proc_frame()
352 oci->postproc_state.last_base_qindex = oci->base_qindex; in vp8_post_proc_frame()
354 vp8_deblock(oci, oci->frame_to_show, &oci->post_proc_buffer, q, 1, 0); in vp8_post_proc_frame()
355 oci->postproc_state.last_base_qindex = oci->base_qindex; in vp8_post_proc_frame()
357 vp8_yv12_copy_frame(oci->frame_to_show, &oci->post_proc_buffer); in vp8_post_proc_frame()
358 oci->postproc_state.last_base_qindex = oci->base_qindex; in vp8_post_proc_frame()
360 oci->postproc_state.last_frame_valid = 1; in vp8_post_proc_frame()
363 if (oci->postproc_state.last_q != q || in vp8_post_proc_frame()
364 oci->postproc_state.last_noise != noise_level) { in vp8_post_proc_frame()
366 struct postproc_state *ppstate = &oci->postproc_state; in vp8_post_proc_frame()
370 vpx_setup_noise(sigma, ppstate->generated_noise, oci->Width + 256); in vp8_post_proc_frame()
376 oci->post_proc_buffer.y_buffer, oci->postproc_state.generated_noise, in vp8_post_proc_frame()
377 oci->postproc_state.clamp, oci->postproc_state.clamp, in vp8_post_proc_frame()
378 oci->post_proc_buffer.y_width, oci->post_proc_buffer.y_height, in vp8_post_proc_frame()
379 oci->post_proc_buffer.y_stride); in vp8_post_proc_frame()
382 *dest = oci->post_proc_buffer; in vp8_post_proc_frame()
385 dest->y_width = oci->Width; in vp8_post_proc_frame()
386 dest->y_height = oci->Height; in vp8_post_proc_frame()