mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Remove num_stripes from fpi_do_movement_estimation()
This commit is contained in:
@@ -611,7 +611,7 @@ static void capture_read_strip_cb(struct libusb_transfer *transfer)
|
|||||||
/* send stop capture bits */
|
/* send stop capture bits */
|
||||||
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
aes_write_regv(dev, capture_stop, G_N_ELEMENTS(capture_stop), stub_capture_stop_cb, NULL);
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
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 = fpi_assemble_frames(&assembling_ctx, aesdev->strips, aesdev->strips_len);
|
||||||
img->flags |= FP_IMG_PARTIAL;
|
img->flags |= FP_IMG_PARTIAL;
|
||||||
g_slist_free_full(aesdev->strips, g_free);
|
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;
|
struct fp_img *img;
|
||||||
|
|
||||||
aesdev->strips = g_slist_reverse(aesdev->strips);
|
aesdev->strips = g_slist_reverse(aesdev->strips);
|
||||||
fpi_do_movement_estimation(&assembling_ctx,
|
fpi_do_movement_estimation(&assembling_ctx, aesdev->strips);
|
||||||
aesdev->strips, aesdev->strips_len);
|
|
||||||
img = fpi_assemble_frames(&assembling_ctx,
|
img = fpi_assemble_frames(&assembling_ctx,
|
||||||
aesdev->strips, aesdev->strips_len);
|
aesdev->strips, aesdev->strips_len);
|
||||||
img->flags |= FP_IMG_PARTIAL;
|
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.frame_height = elandev->frame_height;
|
||||||
assembling_ctx.image_width = elandev->frame_width * 3 / 2;
|
assembling_ctx.image_width = elandev->frame_width * 3 / 2;
|
||||||
g_slist_foreach(raw_frames, (GFunc) elandev->process_frame, &frames);
|
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 = fpi_assemble_frames(&assembling_ctx, frames, num_frames);
|
||||||
|
|
||||||
img->flags |= FP_IMG_PARTIAL;
|
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:
|
* fpi_do_movement_estimation:
|
||||||
* @ctx: #fpi_frame_asmbl_ctx - frame assembling context
|
* @ctx: #fpi_frame_asmbl_ctx - frame assembling context
|
||||||
* @stripes: a singly-linked list of #fpi_frame
|
* @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
|
* fpi_do_movement_estimation() estimates the movement between adjacent
|
||||||
* frames, populating @delta_x and @delta_y values for each #fpi_frame.
|
* 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
|
* This function is used for devices that don't do movement estimation
|
||||||
* in hardware. If hardware movement estimation is supported, the driver
|
* in hardware. If hardware movement estimation is supported, the driver
|
||||||
* should populate @delta_x and @delta_y instead.
|
* 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,
|
void fpi_do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
GSList *stripes, size_t num_stripes)
|
GSList *stripes)
|
||||||
{
|
{
|
||||||
int err, rev_err;
|
int err, rev_err;
|
||||||
|
|
||||||
g_return_if_fail (g_slist_length(stripes) != num_stripes);
|
|
||||||
|
|
||||||
err = do_movement_estimation(ctx, stripes, FALSE);
|
err = do_movement_estimation(ctx, stripes, FALSE);
|
||||||
rev_err = do_movement_estimation(ctx, stripes, TRUE);
|
rev_err = do_movement_estimation(ctx, stripes, TRUE);
|
||||||
fp_dbg("errors: %d rev: %d", err, rev_err);
|
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,
|
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,
|
struct fp_img *fpi_assemble_frames(struct fpi_frame_asmbl_ctx *ctx,
|
||||||
GSList *stripes, size_t num_stripes);
|
GSList *stripes, size_t num_stripes);
|
||||||
|
|||||||
Reference in New Issue
Block a user