From d36e351ef5d073f24aca0e0fb6dd3171d9b1914c Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Wed, 5 Oct 2016 10:54:25 -0700 Subject: test: add ostream operators for VAProfile and VAEntrypoint Add ostream operators for VAProfile and VAEntrypoint so the testing framework and tests can log them by name. Signed-off-by: U. Artie Eoff Reviewed-by: Sean V Kelley --- test/i965_streamable.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'test') diff --git a/test/i965_streamable.h b/test/i965_streamable.h index aab3111..4969c14 100644 --- a/test/i965_streamable.h +++ b/test/i965_streamable.h @@ -367,4 +367,88 @@ operator<<(std::ostream& os, const VAImage& image) return os; } +inline std::ostream& +operator<<(std::ostream& os, const VAProfile& profile) +{ + switch(profile) { + case VAProfileNone: + return os << "VAProfileNone"; + case VAProfileMPEG2Simple: + return os << "VAProfileMPEG2Simple"; + case VAProfileMPEG2Main: + return os << "VAProfileMPEG2Main"; + case VAProfileMPEG4Simple: + return os << "VAProfileMPEG4Simple"; + case VAProfileMPEG4AdvancedSimple: + return os << "VAProfileMPEG4AdvancedSimple"; + case VAProfileMPEG4Main: + return os << "VAProfileMPEG4Main"; + case VAProfileVC1Simple: + return os << "VAProfileVC1Simple"; + case VAProfileVC1Main: + return os << "VAProfileVC1Main"; + case VAProfileVC1Advanced: + return os << "VAProfileVC1Advanced"; + case VAProfileH263Baseline: + return os << "VAProfileH263Baseline"; + case VAProfileJPEGBaseline: + return os << "VAProfileJPEGBaseline"; + case VAProfileVP8Version0_3: + return os << "VAProfileVP8Version0_3"; + case VAProfileHEVCMain: + return os << "VAProfileHEVCMain"; + case VAProfileHEVCMain10: + return os << "VAProfileHEVCMain10"; + case VAProfileVP9Profile0: + return os << "VAProfileVP9Profile0"; + case VAProfileVP9Profile1: + return os << "VAProfileVP9Profile1"; + case VAProfileVP9Profile2: + return os << "VAProfileVP9Profile2"; + case VAProfileVP9Profile3: + return os << "VAProfileVP9Profile3"; + case VAProfileH264Baseline: + return os << "VAProfileH264Baseline"; + case VAProfileH264ConstrainedBaseline: + return os << "VAProfileH264ConstrainedBaseline"; + case VAProfileH264High: + return os << "VAProfileH264High"; + case VAProfileH264Main: + return os << "VAProfileH264Main"; + case VAProfileH264MultiviewHigh: + return os << "VAProfileH264MultiviewHigh"; + case VAProfileH264StereoHigh: + return os << "VAProfileH264StereoHigh"; + default: + return os << "Unknown VAProfile: " << static_cast(profile); + } +} + +inline std::ostream& +operator<<(std::ostream& os, const VAEntrypoint& entrypoint) +{ + switch(entrypoint) { + case VAEntrypointVLD: + return os << "VAEntrypointVLD"; + case VAEntrypointIZZ: + return os << "VAEntrypointIZZ"; + case VAEntrypointIDCT: + return os << "VAEntrypointIDCT"; + case VAEntrypointMoComp: + return os << "VAEntrypointMoComp"; + case VAEntrypointDeblocking: + return os << "VAEntrypointDeblocking"; + case VAEntrypointVideoProc: + return os << "VAEntrypointVideoProc"; + case VAEntrypointEncSlice: + return os << "VAEntrypointEncSlice"; + case VAEntrypointEncSliceLP: + return os << "VAEntrypointEncSliceLP"; + case VAEntrypointEncPicture: + return os << "VAEntrypointEncPicture"; + default: + return os << "Unknown VAEntrypoint: " << static_cast(entrypoint); + } +} + #endif // I965_STREAMABLE_H -- cgit v1.2.3