mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpi_dec_utils]: Add decoder frame rate print
Change-Id: I46006cb51205ea98204c803f4753039409e8171d Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -377,6 +377,15 @@ void reader_stop(FileReader reader)
|
|||||||
pthread_join(impl->thd, NULL);
|
pthread_join(impl->thd, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void show_dec_fps(RK_S64 total_time, RK_S64 total_count, RK_S64 last_time, RK_S64 last_count)
|
||||||
|
{
|
||||||
|
float avg_fps = (float)total_count * 1000000 / total_time;
|
||||||
|
float ins_fps = (float)last_count * 1000000 / last_time;
|
||||||
|
|
||||||
|
mpp_log("decoded %10lld frame fps avg %7.2f ins %7.2f\n",
|
||||||
|
total_count, avg_fps, ins_fps);
|
||||||
|
}
|
||||||
|
|
||||||
void mpi_dec_test_help()
|
void mpi_dec_test_help()
|
||||||
{
|
{
|
||||||
mpp_log("usage: mpi_dec_test [options]\n");
|
mpp_log("usage: mpi_dec_test [options]\n");
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
typedef void* FileReader;
|
typedef void* FileReader;
|
||||||
|
|
||||||
/* For overall configure setup */
|
/* For overall configure setup */
|
||||||
typedef struct {
|
typedef struct MpiDecTestCmd_t {
|
||||||
char file_input[MAX_FILE_NAME_LENGTH];
|
char file_input[MAX_FILE_NAME_LENGTH];
|
||||||
char file_output[MAX_FILE_NAME_LENGTH];
|
char file_output[MAX_FILE_NAME_LENGTH];
|
||||||
char file_config[MAX_FILE_NAME_LENGTH];
|
char file_config[MAX_FILE_NAME_LENGTH];
|
||||||
@@ -69,4 +69,6 @@ RK_U32 reader_read(FileReader reader, char** buf, size_t *size);
|
|||||||
RK_U32 reader_index_read(FileReader reader, RK_S32 index, char** buf, size_t *size);
|
RK_U32 reader_index_read(FileReader reader, RK_S32 index, char** buf, size_t *size);
|
||||||
void reader_rewind(FileReader reader);
|
void reader_rewind(FileReader reader);
|
||||||
|
|
||||||
|
void show_dec_fps(RK_S64 total_time, RK_S64 total_count, RK_S64 last_time, RK_S64 last_count);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user