Skip to content

Commit

Permalink
Merge pull request #28 from eumagga0x2a/x264-x265-tuning-none
Browse files Browse the repository at this point in the history
[x264/Qt][x265/Qt] Add translatable default none tuning
  • Loading branch information
mean00 committed Oct 31, 2016
2 parents 2897fd1 + e02ddb2 commit 830df50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions avidemux_plugins/ADM_videoEncoder/x264/qt4/Q_x264.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ static const aspectRatio predefinedARs[]={
static const char* listOfPresets[] = { "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo" };
#define NB_PRESET sizeof(listOfPresets)/sizeof(char*)

static const char* listOfTunings[] = { "film", "animation", "grain", "stillimage", "psnr", "ssim" };
// Empty string "" as tuning means no tuning. This is the default.
static const char* listOfTunings[] = { "", "film", "animation", "grain", "stillimage", "psnr", "ssim" };
#define NB_TUNE sizeof(listOfTunings)/sizeof(char*)

static const char* listOfProfiles[] = { "baseline", "main", "high", "high10", "high422", "high444" };
Expand Down Expand Up @@ -171,7 +172,12 @@ x264Dialog::x264Dialog(QWidget *parent, void *param) : QDialog(parent)
tunings->clear();
for(int i=0;i<NB_TUNE;i++)
{
tunings->addItem(QString(listOfTunings[i]));
const char* _tn=listOfTunings[i];
// we pass an empty string to the encoder in order to disable tuning,
// but want to show a descriptive label to the user
if(_tn=="")
_tn=QT_TRANSLATE_NOOP("x264","none");
tunings->addItem(QString(_tn));
}

QComboBox* profiles=ui.profileComboBox;
Expand Down
10 changes: 8 additions & 2 deletions avidemux_plugins/ADM_videoEncoder/x265/qt4/Q_x265.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ static const aspectRatio predefinedARs[]={
static const char* listOfPresets[] = { "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo" };
#define NB_PRESET sizeof(listOfPresets)/sizeof(char*)

static const char* listOfTunings[] = { "psnr", "ssim", "zerolatency", "fastdecode" };
// Empty string "" as tuning means no tuning. This is the default.
static const char* listOfTunings[] = { "", "psnr", "ssim", "grain", "zerolatency", "fastdecode" };
#define NB_TUNE sizeof(listOfTunings)/sizeof(char*)

static const char* listOfProfiles[] = { "main", "main10", "mainstillpicture" };
Expand Down Expand Up @@ -177,7 +178,12 @@ x265Dialog::x265Dialog(QWidget *parent, void *param) : QDialog(parent)
tunings->clear();
for(int i=0;i<NB_TUNE;i++)
{
tunings->addItem(QString(listOfTunings[i]));
// we pass an empty string to the encoder in order to disable tuning,
// but want to show a descriptive label to the user
const char* _tn=listOfTunings[i];
if(_tn=="")
_tn=QT_TRANSLATE_NOOP("x265","none");
tunings->addItem(QString(_tn));
}

QComboBox* profiles=ui.profileComboBox;
Expand Down

0 comments on commit 830df50

Please sign in to comment.