parameters: (yuv_file_name, output_file_name, width, height, crop_height)
docstring: Crops rows of pixels from the top of the YUV frames.
  
    This function goes through all the frames in a video and crops the crop_height
    top pixel rows of every frame.
  
    Args:
      yuv_file_name(string): The name of the YUV file to be cropped.
      output_file_name(string): The name of the output file where the result will
        be written.
      width(int): The width of the original YUV file.
      height(int): The height of the original YUV file.
      crop_height(int): The height (the number of pixel rows) to be cropped from
        the frames.
docstring_summary: Crops rows of pixels from the top of the YUV frames.
docstring_tokens: Crops rows of pixels from the top of the YUV frames .
function: def CropFrames(yuv_file_name, output_file_name, width, height, crop_height):
    """Crops rows of pixels from the top of the YUV frames.
  
    This function goes through all the frames in a video and crops the crop_height
    top pixel rows of every frame.
  
    Args:
      yuv_file_name(string): The name of the YUV file to be cropped.
      output_file_name(string): The name of the output file where the result will
        be written.
      width(int): The width of the original YUV file.
      height(int): The height of the original YUV file.
      crop_height(int): The height (the number of pixel rows) to be cropped from
        the frames.
    """
    # Component sizes = [Y_sizes, U_sizes, V_sizes].
    component_sizes = [(width, height, crop_height),
                       (width/2, height/2, crop_height/2),
                       (width/2, height/2, crop_height/2)]
  
    yuv_file = open(yuv_file_name, 'rb')
    output_file = open(output_file_name, 'wb')
  
    data_left = True
    while data_left:
      data_left = _CropOneFrame(yuv_file, output_file, component_sizes)
  
    yuv_file.close()
    output_file.close()
function_tokens: def CropFrames ( yuv_file_name , output_file_name , width , height , crop_height ) : # Component sizes = [Y_sizes, U_sizes, V_sizes]. component_sizes = [ ( width , height , crop_height ) , ( width / 2 , height / 2 , crop_height / 2 ) , ( width / 2 , height / 2 , crop_height / 2 ) ] yuv_file = open ( yuv_file_name , 'rb' ) output_file = open ( output_file_name , 'wb' ) data_left = True while data_left : data_left = _CropOneFrame ( yuv_file , output_file , component_sizes ) yuv_file . close ( ) output_file . close ( )