Update video_quality_analysis to align videos instead of using barcodes

This CL is a follow-up to the previous CL
https://webrtc-review.googlesource.com/c/src/+/94773 that added generic
logic for aligning videos. This will allow us to easily extend
video_quality_analysis with new sophisticated video quality metrics.
Also, we can use any kind of video that does not necessarily need to
contain bar codes. Removing the need to decode barcodes also leads to a
big speedup for the tests.

Bug: webrtc:9642
Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50
Reviewed-on: https://webrtc-review.googlesource.com/94845
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24423}
diff --git a/rtc_tools/video_analysis.py b/rtc_tools/video_analysis.py
index a5d267b..0930373 100755
--- a/rtc_tools/video_analysis.py
+++ b/rtc_tools/video_analysis.py
@@ -79,7 +79,7 @@
                     help='Path to the frame analyzer executable.'
                     'Default: %default')
   parser.add_option('--zxing_path', type='string',
-                    help='Path to the zebra xing barcode analyzer.')
+                    help='DEPRECATED.')
   parser.add_option('--ref_rec_dir', type='string', default='ref',
                     help='Path to where reference recordings will be created.'
                     'Ideally keep the ref and test directories on separate'
@@ -118,8 +118,6 @@
                    'generated!')
   if not os.path.isfile(options.frame_analyzer):
     parser.warning('Cannot find frame_analyzer, no metrics will be generated!')
-  if not os.path.isfile(options.zxing_path):
-    parser.warning('Cannot find Zebra Xing, no metrics will be generated!')
 
   return options
 
@@ -430,26 +428,11 @@
   result_file_name = os.path.join(rec_path, '%s_%s_result.txt') % (
     options.app_name, CURRENT_TIME)
 
-  # Find the crop dimensions (e.g. 950 and 420) in the ref crop parameter
-  # string: 'hflip, crop=950:420:130:56'
-  for param in options.ref_crop_parameters.split('crop'):
-    if param[0] == '=':
-      crop_width = int(param.split(':')[0].split('=')[1])
-      crop_height = int(param.split(':')[1])
-
   compare_cmd = [
     compare_videos_script,
     '--ref_video=%s' % cropped_ref_file,
     '--test_video=%s' % cropped_test_file,
     '--frame_analyzer=%s' % os.path.abspath(options.frame_analyzer),
-    '--zxing_path=%s' % options.zxing_path,
-    '--ffmpeg_path=%s' % options.ffmpeg,
-    '--stats_file_ref=%s_stats.txt' %
-        os.path.join(os.path.dirname(cropped_ref_file), cropped_ref_file),
-    '--stats_file_test=%s_stats.txt' %
-        os.path.join(os.path.dirname(cropped_test_file), cropped_test_file),
-    '--yuv_frame_height=%d' % crop_height,
-    '--yuv_frame_width=%d' % crop_width
   ]
 
   with open(result_file_name, 'w') as f:
@@ -472,7 +455,6 @@
     --app_name AppRTCMobile \
     --ffmpeg ./ffmpeg --ref_video_device=/dev/video0 \
     --test_video_device=/dev/video1 \
-    --zxing_path ./zxing \
     --test_crop_parameters 'crop=950:420:130:56' \
     --ref_crop_parameters 'hflip, crop=950:420:130:56' \
     --ref_rec_dir /tmp/ref \