lib: Remove num_stripes from fpi_do_movement_estimation()
This commit is contained in:
parent
dcc04089d1
commit
3b480caab1
5 changed files with 5 additions and 14 deletions
|
@ -590,8 +590,7 @@ static void capture_read_strip_cb(FpiUsbTransfer *transfer, FpDevice *device,
|
|||
/* send stop capture bits */
|
||||
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
||||
self->strips = g_slist_reverse(self->strips);
|
||||
fpi_do_movement_estimation(&assembling_ctx, self->strips,
|
||||
self->strips_len);
|
||||
fpi_do_movement_estimation(&assembling_ctx, self->strips);
|
||||
img = fpi_assemble_frames(&assembling_ctx, self->strips,
|
||||
self->strips_len);
|
||||
|
||||
|
|
|
@ -435,8 +435,7 @@ static void capture_read_strip_cb(FpiUsbTransfer *transfer, FpDevice *_dev,
|
|||
FpImage *img;
|
||||
|
||||
self->strips = g_slist_reverse(self->strips);
|
||||
fpi_do_movement_estimation(&assembling_ctx,
|
||||
self->strips, self->strips_len);
|
||||
fpi_do_movement_estimation(&assembling_ctx, self->strips);
|
||||
img = fpi_assemble_frames(&assembling_ctx,
|
||||
self->strips,
|
||||
self->strips_len);
|
||||
|
|
|
@ -302,7 +302,7 @@ static void elan_submit_image(FpImageDevice *dev)
|
|||
assembling_ctx.frame_height = self->frame_height;
|
||||
assembling_ctx.image_width = self->frame_width * 3 / 2;
|
||||
g_slist_foreach(raw_frames, (GFunc) self->process_frame, &frames);
|
||||
fpi_do_movement_estimation(&assembling_ctx, frames, num_frames);
|
||||
fpi_do_movement_estimation(&assembling_ctx, frames);
|
||||
img = fpi_assemble_frames(&assembling_ctx, frames, num_frames);
|
||||
|
||||
fpi_image_device_image_captured(dev, img);
|
||||
|
|
|
@ -173,7 +173,6 @@ do_movement_estimation (struct fpi_frame_asmbl_ctx *ctx,
|
|||
* fpi_do_movement_estimation:
|
||||
* @ctx: #fpi_frame_asmbl_ctx - frame assembling context
|
||||
* @stripes: a singly-linked list of #fpi_frame
|
||||
* @num_stripes: number of items in @stripes to process
|
||||
*
|
||||
* fpi_do_movement_estimation() estimates the movement between adjacent
|
||||
* frames, populating @delta_x and @delta_y values for each #fpi_frame.
|
||||
|
@ -181,18 +180,13 @@ do_movement_estimation (struct fpi_frame_asmbl_ctx *ctx,
|
|||
* This function is used for devices that don't do movement estimation
|
||||
* in hardware. If hardware movement estimation is supported, the driver
|
||||
* should populate @delta_x and @delta_y instead.
|
||||
*
|
||||
* Note that @num_stripes might be shorter than the length of the list,
|
||||
* if some stripes should be skipped.
|
||||
*/
|
||||
void
|
||||
fpi_do_movement_estimation (struct fpi_frame_asmbl_ctx *ctx,
|
||||
GSList *stripes, size_t num_stripes)
|
||||
GSList *stripes)
|
||||
{
|
||||
int err, rev_err;
|
||||
|
||||
g_return_if_fail (g_slist_length(stripes) != num_stripes);
|
||||
|
||||
err = do_movement_estimation (ctx, stripes, FALSE);
|
||||
rev_err = do_movement_estimation (ctx, stripes, TRUE);
|
||||
fp_dbg ("errors: %d rev: %d", err, rev_err);
|
||||
|
|
|
@ -65,8 +65,7 @@ struct fpi_frame_asmbl_ctx
|
|||
};
|
||||
|
||||
void fpi_do_movement_estimation (struct fpi_frame_asmbl_ctx *ctx,
|
||||
GSList *stripes,
|
||||
size_t num_stripes);
|
||||
GSList *stripes);
|
||||
|
||||
FpImage *fpi_assemble_frames (struct fpi_frame_asmbl_ctx *ctx,
|
||||
GSList *stripes,
|
||||
|
|
Loading…
Reference in a new issue