| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef __MEDIA_SCALABILITY_DEFS_H__ |
| 28 |
#define __MEDIA_SCALABILITY_DEFS_H__ |
| 29 |
|
| 30 |
#include "mos_util_debug.h" |
| 31 |
#include "mos_os.h" |
| 32 |
|
| 33 |
#define SCALABILITY_CHK_NULL_RETURN(_ptr) \ |
| 34 |
MOS_CHK_NULL_RETURN(MOS_COMPONENT_SCALABILITY, 0, _ptr) |
| 35 |
|
| 36 |
#define SCALABILITY_CHK_STATUS_RETURN(_stmt) \ |
| 37 |
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_SCALABILITY, 0, _stmt) |
| 38 |
|
| 39 |
#define SCALABILITY_CHK_STATUS_MESSAGE_RETURN(_stmt, _message, ...) \ |
| 40 |
MOS_CHK_STATUS_MESSAGE_RETURN(MOS_COMPONENT_SCALABILITY, 0, _stmt, _message, ##__VA_ARGS__) |
| 41 |
|
| 42 |
#define SCALABILITY_ASSERTMESSAGE(_message, ...) \ |
| 43 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_SCALABILITY, 0, _message, ##__VA_ARGS__) |
| 44 |
|
| 45 |
#define SCALABILITY_WARNINGMESSAGE(_message, ...) \ |
| 46 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_SCALABILITY, 0, _message, ##__VA_ARGS__) |
| 47 |
|
| 48 |
#define SCALABILITY_NORMALMESSAGE(_message, ...) \ |
| 49 |
MOS_NORMALMESSAGE(MOS_COMPONENT_SCALABILITY, 0, _message, ##__VA_ARGS__) |
| 50 |
|
| 51 |
#define SCALABILITY_VERBOSEMESSAGE(_message, ...) \ |
| 52 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_SCALABILITY, 0, _message, ##__VA_ARGS__) |
| 53 |
|
| 54 |
#define SCALABILITY_ASSERT(_expr) \ |
| 55 |
MOS_ASSERT(MOS_COMPONENT_SCALABILITY, 0, _expr) |
| 56 |
|
| 57 |
#define SCALABILITY_COND_CHECK(_expr, _message, ...) \ |
| 58 |
MOS_CHK_COND_RETURN(MOS_COMPONENT_SCALABILITY, 0, _expr, _message, ##__VA_ARGS__) |
| 59 |
|
| 60 |
enum ScalabilityComponentType |
| 61 |
{ |
| 62 |
scalabilityEncoder = 0, |
| 63 |
scalabilityDecoder = 1, |
| 64 |
scalabilityVp = 2, |
| 65 |
scalabilityTotal, |
| 66 |
}; |
| 67 |
enum ScalabilitySyncType |
| 68 |
{ |
| 69 |
syncAllPipes = 0, |
| 70 |
syncOnePipeWaitOthers = 1, |
| 71 |
syncOnePipeForAnother = 2, |
| 72 |
syncOtherPipesForOne = 3, |
| 73 |
}; |
| 74 |
|
| 75 |
struct ScalabilityPars : public ContextRequirement |
| 76 |
{ |
| 77 |
bool enableVE = false; |
| 78 |
bool forceMultiPipe = false; |
| 79 |
|
| 80 |
uint32_t frameWidth = 0; |
| 81 |
uint32_t frameHeight = 0; |
| 82 |
|
| 83 |
uint8_t numVdbox = 0; |
| 84 |
uint16_t numTileRows = 0; |
| 85 |
uint16_t numTileColumns = 0; |
| 86 |
|
| 87 |
uint8_t numVebox = 0; |
| 88 |
bool enableTileReplay = false; |
| 89 |
uint32_t raMode = 0; |
| 90 |
uint32_t protectMode = 0; |
| 91 |
bool allowSwArbitarySplit = false; |
| 92 |
}; |
| 93 |
|
| 94 |
class ScalabilityTrace |
| 95 |
{ |
| 96 |
public: |
| 97 |
ScalabilityTrace(const char *name) : m_name(name) |
| 98 |
{ |
| 99 |
SCALABILITY_VERBOSEMESSAGE("Enter function:%s\r\n", name); |
| 100 |
} |
| 101 |
|
| 102 |
~ScalabilityTrace() |
| 103 |
{ |
| 104 |
SCALABILITY_VERBOSEMESSAGE("Exit function:%s\r\n", m_name); |
| 105 |
} |
| 106 |
|
| 107 |
protected: |
| 108 |
const char *m_name; |
| 109 |
}; |
| 110 |
|
| 111 |
#define SCALABILITY_FUNCTION_ENTER ScalabilityTrace _trace(__FUNCTION__); |
| 112 |
|
| 113 |
struct ComponentState |
| 114 |
{ |
| 115 |
}; |
| 116 |
|
| 117 |
class MediaStatusReport; |
| 118 |
struct StateParams |
| 119 |
{ |
| 120 |
uint8_t currentPipe = 0; |
| 121 |
uint16_t currentPass = 0; |
| 122 |
uint8_t currentRow = 0; |
| 123 |
uint8_t currentSubPass = 0; |
| 124 |
uint8_t pipeIndexForSubmit = 0; |
| 125 |
bool singleTaskPhaseSupported = false; |
| 126 |
MediaStatusReport *statusReport = nullptr; |
| 127 |
ComponentState *componentState = nullptr; |
| 128 |
}; |
| 129 |
|
| 130 |
#endif |