-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-- ability to discard internal cached frames
- Loading branch information
Gavriloaie Eugen-Andrei
committed
Dec 16, 2018
1 parent
9636e7c
commit 4da1f2a
Showing
9 changed files
with
174 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*~ | ||
.configured | ||
*.a | ||
*.diff | ||
*.orig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
int volatile totalFramesCounter=0; | ||
|
||
int volatile framesCurrentCounter=0; | ||
int volatile framesUnusedCounter=0; | ||
int volatile framesUnusedBlankCounter=0; | ||
int volatile framesReferencesCounter=0; | ||
|
||
int volatile lookAheadIbufCounter=0; | ||
int volatile lookAheadObufCounter=0; | ||
int volatile lookAheadNextCounter=0; | ||
|
||
|
||
int volatile tpUninitCounter=0; | ||
int volatile tpRunCounter=0; | ||
int volatile tpDoneCounter=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#pragma once | ||
|
||
extern int volatile totalFramesCounter; | ||
|
||
extern int volatile framesCurrentCounter; | ||
extern int volatile framesUnusedCounter; | ||
extern int volatile framesUnusedBlankCounter; | ||
extern int volatile framesReferencesCounter; | ||
|
||
extern int volatile lookAheadIbufCounter; | ||
extern int volatile lookAheadObufCounter; | ||
extern int volatile lookAheadNextCounter; | ||
|
||
|
||
extern int volatile tpUninitCounter; | ||
extern int volatile tpRunCounter; | ||
extern int volatile tpDoneCounter; | ||
|
||
#define _LIST_INDEX_TOTAL_FRAMES &totalFramesCounter | ||
|
||
#define _LIST_INDEX_FRAMES_CURRENT &framesCurrentCounter | ||
#define _LIST_INDEX_FRAMES_UNUSED &framesUnusedCounter | ||
#define _LIST_INDEX_FRAMES_UNUSED_BLANK &framesUnusedBlankCounter | ||
#define _LIST_INDEX_FRAMES_REFERENCES &framesReferencesCounter | ||
|
||
#define _LIST_INDEX_LOOKAHEAD_IBUF &lookAheadIbufCounter | ||
#define _LIST_INDEX_LOOKAHEAD_OBUF &lookAheadObufCounter | ||
#define _LIST_INDEX_LOOKAHEAD_NEXT &lookAheadNextCounter | ||
|
||
#define _LIST_INDEX_TP_UNINIT &tpUninitCounter | ||
#define _LIST_INDEX_TP_RUN &tpRunCounter | ||
#define _LIST_INDEX_TP_DONE &tpDoneCounter | ||
|
||
static inline void printCounters() { | ||
fprintf(stderr,"totalFrames: %d; framesCurrent: %d; framesUnused: %d; framesUnusedBlank: %d; framesReferences: %d; lookAheadIbuf: %d; lookAheadObuf: %d; lookAheadNext: %d; tpUninit: %d; tpRun: %d; tpDone: %d\n", | ||
__atomic_load_n(_LIST_INDEX_TOTAL_FRAMES,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_FRAMES_CURRENT,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_FRAMES_UNUSED,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_FRAMES_UNUSED_BLANK,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_FRAMES_REFERENCES,__ATOMIC_ACQUIRE), | ||
|
||
__atomic_load_n(_LIST_INDEX_LOOKAHEAD_IBUF,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_LOOKAHEAD_OBUF,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_LOOKAHEAD_NEXT,__ATOMIC_ACQUIRE), | ||
|
||
__atomic_load_n(_LIST_INDEX_TP_UNINIT,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_TP_RUN,__ATOMIC_ACQUIRE), | ||
__atomic_load_n(_LIST_INDEX_TP_DONE,__ATOMIC_ACQUIRE) | ||
); | ||
} | ||
|
||
static inline void incrementFramesCount(volatile int *pCounter) { | ||
__atomic_add_fetch(pCounter,1,__ATOMIC_RELEASE); | ||
if(pCounter==_LIST_INDEX_TOTAL_FRAMES) | ||
printCounters(); | ||
} | ||
|
||
static inline void decrementFramesCount(volatile int *pCounter) { | ||
__atomic_sub_fetch(pCounter,1,__ATOMIC_RELEASE); | ||
if(pCounter==_LIST_INDEX_TOTAL_FRAMES) | ||
printCounters(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -f ./.configured ] | ||
then | ||
./configure \ | ||
--prefix=/Users/shiretu/work/evostream/builders/cmake/external_libs/ffmpeg \ | ||
--disable-cli \ | ||
--enable-static \ | ||
--extra-cflags="-mmacosx-version-min=10.11 -funwind-tables -g" | ||
>./.configured | ||
fi | ||
|
||
make -j32 install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters