diff --git a/vav2/Vav2Player/VavCore/VavCore.vcxproj b/vav2/Vav2Player/VavCore/VavCore.vcxproj
index c1d5f5c..3e2650a 100644
--- a/vav2/Vav2Player/VavCore/VavCore.vcxproj
+++ b/vav2/Vav2Player/VavCore/VavCore.vcxproj
@@ -105,8 +105,8 @@
-
+
diff --git a/vav2/Vav2Player/VavCore/src/Common/IAdaptiveVideoDecoder.h b/vav2/Vav2Player/VavCore/src/Common/AdaptiveTypes.h
similarity index 58%
rename from vav2/Vav2Player/VavCore/src/Common/IAdaptiveVideoDecoder.h
rename to vav2/Vav2Player/VavCore/src/Common/AdaptiveTypes.h
index 2145e90..7b36cb3 100644
--- a/vav2/Vav2Player/VavCore/src/Common/IAdaptiveVideoDecoder.h
+++ b/vav2/Vav2Player/VavCore/src/Common/AdaptiveTypes.h
@@ -1,10 +1,10 @@
#pragma once
-#include "../Decoder/IVideoDecoder.h"
#include
+#include
namespace VavCore {
-// Forward declarations for adaptive types
+// Quality levels for adaptive adjustment
enum class QualityLevel {
ULTRA = 0, // Original resolution, full quality
HIGH = 1, // 75% resolution, high quality
@@ -13,6 +13,7 @@ enum class QualityLevel {
MINIMUM = 4 // 12.5% resolution, minimal quality
};
+// Adaptive quality modes
enum class AdaptiveQualityMode {
CONSERVATIVE = 0, // Stable quality, avoid frequent changes
FAST = 1, // Quick adaptation to performance changes
@@ -21,13 +22,13 @@ enum class AdaptiveQualityMode {
// Performance monitoring data
struct PerformanceMetrics {
- double average_decode_time_ms = 0.0;
- double current_fps = 0.0;
- uint64_t frames_decoded = 0;
- uint64_t frames_dropped = 0;
+ double avg_decode_time_ms = 0.0;
double avg_render_time_ms = 0.0;
double cpu_usage_percent = 0.0;
double gpu_usage_percent = 0.0;
+ uint64_t frames_decoded = 0;
+ uint64_t dropped_frames = 0;
+ double current_fps = 0.0;
std::chrono::steady_clock::time_point last_update;
};
@@ -54,30 +55,4 @@ struct AdaptiveConfig {
bool enable_skip_non_reference = true;
};
-// Interface for adaptive video decoders with quality control
-class IAdaptiveVideoDecoder : public virtual IVideoDecoder {
-public:
- virtual ~IAdaptiveVideoDecoder() = default;
-
- // Adaptive quality control
- virtual void SetQualityMode(AdaptiveQualityMode mode) = 0;
- virtual AdaptiveQualityMode GetQualityMode() const = 0;
- virtual void SetQualityLevel(QualityLevel level) = 0;
- virtual QualityLevel GetCurrentQualityLevel() const = 0;
-
- // Performance monitoring
- virtual PerformanceMetrics GetPerformanceMetrics() const = 0;
- virtual void UpdatePerformanceMetrics(double decode_time, double render_time = 0.0) = 0;
-
- // Manual override controls
- virtual void EnableAdaptiveMode(bool enable) = 0;
- virtual bool IsAdaptiveModeEnabled() const = 0;
- virtual void SetTargetFrameRate(double fps) = 0;
- virtual void ForceQualityAdjustment() = 0; // Immediate adjustment trigger
-
- // Configuration management
- virtual void UpdateConfig(const AdaptiveConfig& config) = 0;
- virtual AdaptiveConfig GetConfig() const = 0;
-};
-
} // namespace VavCore
\ No newline at end of file
diff --git a/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveAV1Decoder.h b/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveAV1Decoder.h
index 287e81e..44c2875 100644
--- a/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveAV1Decoder.h
+++ b/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveAV1Decoder.h
@@ -1,6 +1,6 @@
#pragma once
#include "AV1Decoder.h"
-#include "AdaptiveNVDECDecoder.h" // Include full definitions of shared types
+#include "../Common/AdaptiveTypes.h"
#include
#include
#include
diff --git a/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveNVDECDecoder.h b/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveNVDECDecoder.h
index f320f40..aa44535 100644
--- a/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveNVDECDecoder.h
+++ b/vav2/Vav2Player/VavCore/src/Decoder/AdaptiveNVDECDecoder.h
@@ -1,53 +1,12 @@
#pragma once
#include "NVDECAV1Decoder.h"
+#include "../Common/AdaptiveTypes.h"
#include
#include
#include
namespace VavCore {
-// Performance monitoring data
-struct PerformanceMetrics {
- double avg_decode_time_ms = 0.0;
- double avg_render_time_ms = 0.0;
- double cpu_usage_percent = 0.0;
- double gpu_usage_percent = 0.0;
- uint64_t dropped_frames = 0;
- std::chrono::steady_clock::time_point last_update;
-};
-
-// Quality levels for adaptive adjustment
-enum class QualityLevel {
- ULTRA = 0, // Original resolution, full quality
- HIGH = 1, // 75% resolution, high quality
- MEDIUM = 2, // 50% resolution, medium quality
- LOW = 3, // 25% resolution, low quality
- MINIMUM = 4 // 12.5% resolution, minimal quality
-};
-
-// Adaptive decoder configuration
-struct AdaptiveConfig {
- // Performance thresholds (milliseconds)
- double target_frame_time_ms = 33.33; // 30 FPS target
- double critical_frame_time_ms = 50.0; // 20 FPS critical
-
- // Quality adjustment thresholds
- double quality_up_threshold = 0.8; // Scale up when < 80% of target time
- double quality_down_threshold = 1.2; // Scale down when > 120% of target time
-
- // Hysteresis to prevent oscillation
- uint32_t stable_frames_required = 30; // Frames to wait before adjustment
-
- // Memory constraints
- uint32_t max_decode_surfaces = 16;
- uint32_t min_decode_surfaces = 4;
-
- // Enable/disable features
- bool enable_dynamic_resolution = true;
- bool enable_dynamic_surfaces = true;
- bool enable_skip_non_reference = true;
-};
-
// Enhanced NVDEC decoder with adaptive quality adjustment
class AdaptiveNVDECDecoder : public NVDECAV1Decoder {
public:
diff --git a/vav2/Vav2Player/VavCore/src/VavCore.cpp b/vav2/Vav2Player/VavCore/src/VavCore.cpp
index 231e15f..e8813ee 100644
--- a/vav2/Vav2Player/VavCore/src/VavCore.cpp
+++ b/vav2/Vav2Player/VavCore/src/VavCore.cpp
@@ -1,8 +1,8 @@
#include "pch.h"
#include "VavCore/VavCore.h"
#include "Common/VideoTypes.h" // Internal VavCore types
+#include "Common/AdaptiveTypes.h" // Adaptive types
#include "Decoder/IVideoDecoder.h"
-#include "Common/IAdaptiveVideoDecoder.h"
#include "Decoder/VideoDecoderFactory.h"
#include "FileIO/WebMFileReader.h"
diff --git a/vav2/todo7.txt b/vav2/todo7.txt
index 8abf264..8c51293 100644
--- a/vav2/todo7.txt
+++ b/vav2/todo7.txt
@@ -7,9 +7,6 @@ amd decoder 를 탑재해야해.
android player 를 만들어서 av1 디코딩 테스트 필요.
-IAdaptiveVideoDecoder.h 인터페이스가 정말로 필요한 것일까? 재검토를 해봐줘.
-
-
CLAUDE.md 에 현재 작업해야할 사항을 체크해봐주고. 완료된 것이면 업데이트해줘
CLAUDE.md 파일을 확인하여 현재 작업 상황을 점검하고 완료된 항목들을 업데이트하겠습니다.
완료된 사항만 간단하게 적어주고, 불필요한 정보들은 최대한 줄여줘.