parameters: (barcode_width, barcode_height, base_width, base_height,
                        barcodes_file_name, base_file_name, output_file_name)
docstring: Overlays two YUV files starting from the upper left corner of both.
  
    Args:
      barcode_width(int): The width of the barcode (to be overlaid).
      barcode_height(int): The height of the barcode (to be overlaid).
      base_width(int): The width of a frame of the base file.
      base_height(int): The height of a frame of the base file.
      barcodes_file_name(string): The name of the YUV file containing the YUV
        barcodes.
      base_file_name(string): The name of the base YUV file.
      output_file_name(string): The name of the output file where the overlaid
        video will be written.
docstring_summary: Overlays two YUV files starting from the upper left corner of both.
docstring_tokens: Overlays two YUV files starting from the upper left corner of both .
function: def overlay_yuv_files(barcode_width, barcode_height, base_width, base_height,
                        barcodes_file_name, base_file_name, output_file_name):
    """Overlays two YUV files starting from the upper left corner of both.
  
    Args:
      barcode_width(int): The width of the barcode (to be overlaid).
      barcode_height(int): The height of the barcode (to be overlaid).
      base_width(int): The width of a frame of the base file.
      base_height(int): The height of a frame of the base file.
      barcodes_file_name(string): The name of the YUV file containing the YUV
        barcodes.
      base_file_name(string): The name of the base YUV file.
      output_file_name(string): The name of the output file where the overlaid
        video will be written.
    """
    # Component sizes = [Y_sizes, U_sizes, V_sizes]
    barcodes_component_sizes = [(barcode_width, barcode_height),
                                (barcode_width/2, barcode_height/2),
                                (barcode_width/2, barcode_height/2)]
    base_component_sizes = [(base_width, base_height),
                            (base_width/2, base_height/2),
                            (base_width/2, base_height/2)]
  
    barcodes_file = open(barcodes_file_name, 'rb')
    base_file = open(base_file_name, 'rb')
    output_file = open(output_file_name, 'wb')
  
    data_left = True
    while data_left:
      data_left = _overlay_barcode_and_base_frames(barcodes_file, base_file,
                                                   output_file,
                                                   barcodes_component_sizes,
                                                   base_component_sizes)
  
    barcodes_file.close()
    base_file.close()
    output_file.close()
function_tokens: def overlay_yuv_files ( barcode_width , barcode_height , base_width , base_height , barcodes_file_name , base_file_name , output_file_name ) : # Component sizes = [Y_sizes, U_sizes, V_sizes] barcodes_component_sizes = [ ( barcode_width , barcode_height ) , ( barcode_width / 2 , barcode_height / 2 ) , ( barcode_width / 2 , barcode_height / 2 ) ] base_component_sizes = [ ( base_width , base_height ) , ( base_width / 2 , base_height / 2 ) , ( base_width / 2 , base_height / 2 ) ] barcodes_file = open ( barcodes_file_name , 'rb' ) base_file = open ( base_file_name , 'rb' ) output_file = open ( output_file_name , 'wb' ) data_left = True while data_left : data_left = _overlay_barcode_and_base_frames ( barcodes_file , base_file , output_file , barcodes_component_sizes , base_component_sizes ) barcodes_file . close ( ) base_file . close ( ) output_file . close ( )