Lines Matching defs:roq
232 RoqContext *const roq = &enc->common;
245 if ((unsigned) mx > roq->width-size || (unsigned) my > roq->height-size)
248 return block_sse(enc->frame_to_enc->data, roq->last_frame->data, x, y,
250 enc->frame_to_enc->linesize, roq->last_frame->linesize,
276 RoqContext *const roq = &enc->common;
278 enc->cel_evals = av_malloc_array(roq->width * roq->height / 64, sizeof(CelEvaluation));
283 for (int y = 0, n = 0; y < roq->height; y += 16)
284 for (int x = 0; x < roq->width; x += 16)
352 RoqContext *const roq = &enc->common;
361 const int max = (roq->width / blocksize) * roq->height / blocksize;
371 for (i = 0; i< roq->height; i += blocksize)
372 for (j = 0; j < roq->width; j += blocksize) {
379 EVAL_MOTION(enc->this_motion8[(i/8) * (roq->width/8) + j/8]);
381 offset = (i/blocksize) * roq->width / blocksize + j / blocksize;
389 offset = (i/blocksize + 1) * roq->width / blocksize + j / blocksize;
393 off[0]= (i/blocksize) * roq->width / blocksize + j/blocksize - 1;
394 off[1]= off[0] - roq->width / blocksize + 1;
423 offset = (i/blocksize) * roq->width / blocksize + j/blocksize;
434 RoqContext *const roq = &enc->common;
444 subcel->motion = enc->this_motion4[y * roq->width / 16 + x / 4];
448 enc->this_motion4[y * roq->width / 16 + x / 4], 4);
454 roq->current_frame->data, x,
457 roq->current_frame->linesize,
462 cluster_index = y * roq->width / 16 + x / 4;
499 RoqContext *const roq = &enc->common;
502 int index = cel->sourceY * roq->width / 64 + cel->sourceX/8;
518 roq->current_frame->data,
522 roq->current_frame->linesize,8);
574 RoqContext *const roq = &enc->common;
584 tempData->codebooks.usedCB2[roq->cb4x4[i].idx[j]]++;
608 RoqContext *const roq = &enc->common;
620 bytestream_put_buffer(outp, roq->cb2x2[tempData->f2i2[i]].y, 4);
621 bytestream_put_byte(outp, roq->cb2x2[tempData->f2i2[i]].u);
622 bytestream_put_byte(outp, roq->cb2x2[tempData->f2i2[i]].v);
627 bytestream_put_byte(outp, tempData->i2f2[roq->cb4x4[tempData->f2i4[i]].idx[j]]);
665 RoqContext *const roq = &enc->common;
705 ff_apply_motion_8x8(roq, x, y,
713 qcell = roq->cb4x4 + eval->cbEntry;
714 ff_apply_vector_4x4(roq, x , y , roq->cb2x2 + qcell->idx[0]);
715 ff_apply_vector_4x4(roq, x+4, y , roq->cb2x2 + qcell->idx[1]);
716 ff_apply_vector_4x4(roq, x , y+4, roq->cb2x2 + qcell->idx[2]);
717 ff_apply_vector_4x4(roq, x+4, y+4, roq->cb2x2 + qcell->idx[3]);
735 ff_apply_motion_4x4(roq, subX, subY,
744 qcell = roq->cb4x4 + eval->subCels[j].cbEntry;
746 ff_apply_vector_2x2(roq, subX , subY ,
747 roq->cb2x2 + qcell->idx[0]);
748 ff_apply_vector_2x2(roq, subX+2, subY ,
749 roq->cb2x2 + qcell->idx[1]);
750 ff_apply_vector_2x2(roq, subX , subY+2,
751 roq->cb2x2 + qcell->idx[2]);
752 ff_apply_vector_2x2(roq, subX+2, subY+2,
753 roq->cb2x2 + qcell->idx[3]);
762 ff_apply_vector_2x2(roq, subX + 2*(k&1), subY + (k&2),
763 roq->cb2x2 + cb_idx);
849 RoqContext *const roq = &enc->common;
850 int max = roq->width * roq->height / 16;
855 create_clusters(enc->frame_to_enc, roq->width, roq->height, points);
866 roq->cb2x2, 2, MAX_CBS_2x2)) < 0)
873 unpack_roq_cell(roq->cb2x2 + i, codebooks->unpacked_cb2 + i*2*2*3);
880 &roq->cb4x4[i].idx[j], 2);
882 unpack_roq_qcell(codebooks->unpacked_cb2, roq->cb4x4 + i,
894 RoqContext *const roq = &enc->common;
909 for (int i = 0; i < roq->width * roq->height / 64; i++)
915 av_log(roq->avctx, AV_LOG_ERROR, "Cannot encode video in Quake compatible form\n");
918 av_log(roq->avctx, AV_LOG_ERROR,
937 reconstruct_and_encode_image(enc, roq->width, roq->height,
938 roq->width * roq->height / 64);
941 FFSWAP(AVFrame *, roq->current_frame, roq->last_frame);
972 RoqContext *const roq = &enc->common;
976 roq->avctx = avctx;
992 roq->width = avctx->width;
993 roq->height = avctx->height;
998 roq->last_frame = av_frame_alloc();
999 roq->current_frame = av_frame_alloc();
1000 if (!roq->last_frame || !roq->current_frame)
1004 av_calloc(roq->width * roq->height / 16, sizeof(*enc->this_motion4));
1007 av_malloc_array (roq->width * roq->height / 16, sizeof(motion_vect));
1010 av_calloc(roq->width * roq->height / 64, sizeof(*enc->this_motion8));
1013 av_malloc_array (roq->width * roq->height / 64, sizeof(motion_vect));
1018 av_malloc_array(roq->width * roq->height, 3 * sizeof(int));
1024 enc->points = enc->closest_cb + roq->width * roq->height * 3 / 2;
1058 RoqContext *const roq = &enc->common;
1061 roq->avctx = avctx;
1072 size = ((roq->width * roq->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
1084 if ((ret = ff_encode_alloc_frame(avctx, roq->current_frame)) < 0 ||
1085 (ret = ff_encode_alloc_frame(avctx, roq->last_frame )) < 0)