Remove IAdaptiveVideoDecoder.h

This commit is contained in:
2025-09-26 03:47:51 +09:00
parent c81496d4fc
commit fee99fb273
6 changed files with 11 additions and 80 deletions

View File

@@ -1,53 +1,12 @@
#pragma once
#include "NVDECAV1Decoder.h"
#include "../Common/AdaptiveTypes.h"
#include <queue>
#include <mutex>
#include <atomic>
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: