Question: Please implement the ` vbmse: ` function found at the bottom of this file. You can follow the instructions listed below: Objective 1 : 1

Please implement the `vbmse:` function found at the bottom of this file. You can follow the instructions listed below:
Objective 1:
1. Implement Full Search Based Variable Block Size Motion Estimation using MIPS ISA with the circular search pattern shown in the image:
Objective 1 Rules:
- you must follow the given search pattern
- you are not allowed to use special registers in your implementation
+"s" and "t" registers are the only registers to store values during the execution of the program
- avoid the following commands: division, mod
Objective 1 Assumptions
Frame size : 16x16 to 64x64, where x and y dimensions can be any integer between 16 and 64(can be square or rectangle)
Window size : One of 7 specified dimensions in the vbsme.s.
Objective 1 Strategy: You should approach the problem with three tasks:
- Task 1: implementation of the SAD subroutine that just computes the sum of absolute difference for a given window size.
- Task 2: implementation of the address generation for reading the corresponding frame elements based on the current position in the frame.
- Task 3: implementation of the search pattern moves.
main:
addi $sp, $sp,-4
sw $ra,0($sp)
# Start test 1
la $a0, asize1
la $a1, frame1
la $a2, window1
jal vbsme
jal print_result
# End of test 1
# Start test 2
la $a0, asize2
la $a1, frame2
la $a2, window2
jal vbsme
jal print_result
# End of test 2
# Start test 3
la $a0, asize3
la $a1, frame3
la $a2, window3
jal vbsme
jal print_result
# End of test 3
# Start test 4
la $a0, asize4
la $a1, frame4
la $a2, window4
jal vbsme
jal print_result
# End of test 4
# Start test 5
la $a0, asize5
la $a1, frame5
la $a2, window5
jal vbsme
jal print_result
# End of test 5
# Start test 6
la $a0, asize6
la $a1, frame6
la $a2, window6
jal vbsme
jal print_result
# End of test 6
# Start test 7
la $a0, asize7
la $a1, frame7
la $a2, window7
jal vbsme
jal print_result
# End of test 7
# Start test 8
la $a0, asize8
la $a1, frame8
la $a2, window8
jal vbsme
jal print_result
# End of test 8
# Start test 9
la $a0, asize9
la $a1, frame9
la $a2, window9
jal vbsme
jal print_result
# End of test 9
# Start test 10
la $a0, asize10
la $a1, frame10
la $a2, window10
jal vbsme
jal print_result
# End of test 10
# Start test 11
la $a0, asize11
la $a1, frame11
la $a2, window11
jal vbsme
jal print_result
# End of test 11
# Start test 12
la $a0, asize12
la $a1, frame12
la $a2, window12
jal vbsme
jal print_result
# End of test 12
# Start test 13
la $a0, asize13
la $a1, frame13
la $a2, window13
jal vbsme
jal print_result
# End of test 13
# Start test 14
la $a0, asize14
la $a1, frame14
la $a2, window14
jal vbsme
jal print_result
# End of test 14
lw $ra,0($sp)
addi $sp, $sp,4
jr $ra
print_result:
# Printing $v0
add $a0, $v0, $zero
li $v0,1
syscall
# Print newline.
la $a0, newline
li $v0,4
syscall
# Printing $v1
add $a0, $v1, $zero
li $v0,1
syscall
# Print newline.
la $a0, newline
li $v0,4
syscall
# Print newline.
la $a0, newline
li $v0,4
syscall
jr $ra
# vbsme.s
.text
.globl vbsme
# Your program must follow circular search pattern.
# Preconditions:
# 1st parameter (a0) address of the first element of the dimension info (address of asize[0])
# 2nd parameter (a1) address of the first element of the frame array (address of frame[0][0])
# 3rd parameter (a2) address of the first element of the window array (address of window[0][0])
# Postconditions:
# result (v0) x coordinate of the block in the frame with the minimum SAD
# (v1) y coordinate of the block in the frame with the minimum SAD
# Begin subroutine
vbsme:
li $v0,0 # reset $v0 and $V1
li $v1,0
# insert your code here
Please implement the ` vbmse: ` function found at

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!