lib: Remove num_stripes from fpi_do_movement_estimation()
This commit is contained in:
parent
3953436f0a
commit
22a252c57e
5 changed files with 5 additions and 12 deletions
|
@ -611,7 +611,7 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||
/* send stop capture bits */
|
||||
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||
fpi_do_movement_estimation(&assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||
fpi_do_movement_estimation(&assembling_ctx, aesdev->strips);
|
||||
img = fpi_assemble_frames(&assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||
img->flags |= FP_IMG_PARTIAL;
|
||||
g_slist_free_full(aesdev->strips, g_free);
|
||||
|
|
|
@ -482,8 +482,7 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer,
|
|||
struct fp_img *img;
|
||||
|
||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||
fpi_do_movement_estimation(&assembling_ctx,
|
||||
aesdev->strips, aesdev->strips_len);
|
||||
fpi_do_movement_estimation(&assembling_ctx, aesdev->strips);
|
||||
img = fpi_assemble_frames(&assembling_ctx,
|
||||
aesdev->strips, aesdev->strips_len);
|
||||
img->flags |= FP_IMG_PARTIAL;
|
||||
|
|
|
@ -307,7 +307,7 @@ static void elan_submit_image(struct fp_img_dev *dev)
|
|||
assembling_ctx.frame_height = elandev->frame_height;
|
||||
assembling_ctx.image_width = elandev->frame_width * 3 / 2;
|
||||
g_slist_foreach(raw_frames, (GFunc) elandev->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);
|
||||
|
||||
img->flags |= FP_IMG_PARTIAL;
|
||||
|
|
|
@ -162,7 +162,6 @@ static unsigned int 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.
|
||||
|
@ -170,17 +169,12 @@ static unsigned int 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);
|
||||
|
|
|
@ -63,7 +63,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);
|
||||
|
||||
struct fp_img *fpi_assemble_frames(struct fpi_frame_asmbl_ctx *ctx,
|
||||
GSList *stripes, size_t num_stripes);
|
||||
|
|
Loading…
Reference in a new issue