parameters: (yuv_file, output_file, component_sizes)
return_statement: return True
docstring: Crops one frame.
  
    This function crops one frame going through all the YUV planes and cropping
    respective amount of rows.
  
    Args:
      yuv_file(file): The opened (for binary reading) YUV file.
      output_file(file): The opened (for binary writing) file.
      component_sizes(list of 3 3-ples): The list contains the sizes for all the
        planes (Y, U, V) of the YUV file plus the crop_height scaled for every
        plane. The sizes equal width, height and crop_height for the Y plane,
        and are equal to width/2, height/2 and crop_height/2 for the U and V
        planes.
    Return:
      (bool): True if there are more frames to crop, False otherwise.
docstring_summary: Crops one frame.
docstring_tokens: Crops one frame .
function: def _crop_one_frame(yuv_file, output_file, component_sizes):
    """Crops one frame.
  
    This function crops one frame going through all the YUV planes and cropping
    respective amount of rows.
  
    Args:
      yuv_file(file): The opened (for binary reading) YUV file.
      output_file(file): The opened (for binary writing) file.
      component_sizes(list of 3 3-ples): The list contains the sizes for all the
        planes (Y, U, V) of the YUV file plus the crop_height scaled for every
        plane. The sizes equal width, height and crop_height for the Y plane,
        and are equal to width/2, height/2 and crop_height/2 for the U and V
        planes.
    Return:
      (bool): True if there are more frames to crop, False otherwise.
    """
    for comp_width, comp_height, comp_crop_height in component_sizes:
      for row in range(comp_height):
        # Read the plane data for this row.
        yuv_plane = yuv_file.read(comp_width)
  
        # If the plane is empty, we have reached the end of the file.
        if yuv_plane == "":
          return False
  
        # Only write the plane data for the rows bigger than crop_height.
        if row >= comp_crop_height:
          output_file.write(yuv_plane)
    return True
function_tokens: def _crop_one_frame ( yuv_file , output_file , component_sizes ) : for comp_width , comp_height , comp_crop_height in component_sizes : for row in range ( comp_height ) : # Read the plane data for this row. yuv_plane = yuv_file . read ( comp_width ) # If the plane is empty, we have reached the end of the file. if yuv_plane == "" : return False # Only write the plane data for the rows bigger than crop_height. if row >= comp_crop_height : output_file . write ( yuv_plane ) return True