Skip to content

Commit

Permalink
Merge pull request HandBrake#5 from maximd33/master
Browse files Browse the repository at this point in the history
libhb: Skylake microarchitecture detection, RB 859
  • Loading branch information
sr55 committed Sep 22, 2015
2 parents 1be374b + ae59369 commit d2aa517
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions libhb/ports.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ const char* hb_get_cpu_platform_name()
return "Intel microarchitecture Haswell";
case HB_CPU_PLATFORM_INTEL_BDW:
return "Intel microarchitecture Broadwell";
case HB_CPU_PLATFORM_INTEL_SKL:
return "Intel microarchitecture Skylake";
case HB_CPU_PLATFORM_INTEL_CHT:
return "Intel microarchitecture Airmont";

Expand Down Expand Up @@ -354,6 +356,10 @@ static void init_cpu_info()
case 0x4C:
hb_cpu_info.platform = HB_CPU_PLATFORM_INTEL_CHT;
break;
case 0x4E:
case 0x5E:
hb_cpu_info.platform = HB_CPU_PLATFORM_INTEL_SKL;
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions libhb/ports.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ enum hb_cpu_platform
HB_CPU_PLATFORM_INTEL_HSW,
HB_CPU_PLATFORM_INTEL_BDW,
HB_CPU_PLATFORM_INTEL_CHT,
HB_CPU_PLATFORM_INTEL_SKL,
};
int hb_get_cpu_count();
int hb_get_cpu_platform();
Expand Down
7 changes: 6 additions & 1 deletion libhb/qsv_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ enum
QSV_G2, // Ivy Bridge or equivalent
QSV_G3, // Haswell or equivalent
QSV_G4, // Broadwell or equivalent
QSV_G5, // Skylake or equivalent
QSV_FU, // always last (future processors)
};
static int qsv_hardware_generation(int cpu_platform)
{
Expand All @@ -124,8 +126,11 @@ static int qsv_hardware_generation(int cpu_platform)
case HB_CPU_PLATFORM_INTEL_HSW:
return QSV_G3;
case HB_CPU_PLATFORM_INTEL_BDW:
default:
return QSV_G4;
case HB_CPU_PLATFORM_INTEL_SKL:
return QSV_G5;
default:
return QSV_FU;
}
}

Expand Down

0 comments on commit d2aa517

Please sign in to comment.