def Execute(self, parameters, bitrate, videofile, workdir):
    encodedfile = os.path.join(workdir,
                               '%s.%s' % (videofile.basename, self.extension))
    subprocess_cpu, elapsed_clock = self._EncodeFile(parameters, bitrate,
                                                     videofile, encodedfile)
    result = {}

    result['encode_cputime'] = subprocess_cpu
    result['encode_clocktime'] = elapsed_clock
    result['encoder_version'] = self.EncoderVersion()
    bitrate = videofile.MeasuredBitrate(os.path.getsize(encodedfile))

    psnr, decode_cputime, yuv_md5 = self._DecodeFile(
        videofile, encodedfile, workdir)

    result['decode_cputime'] = decode_cputime
    result['yuv_md5'] = yuv_md5
    print "Bitrate", bitrate, "PSNR", psnr
    result['bitrate'] = int(bitrate)
    result['psnr'] = float(psnr)
    result['cliptime'] = videofile.ClipTime()
    result.update(self.ResultData(encodedfile))

    return result

  # Below are the fallback implementations of the interfaces
  # that the subclasses have to implement.
dataset/ETHPy150Open google/compare-codecs/lib/file_codec.py/FileCodec.Execute/original