Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FFmpeg 5.0#327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
valnoel merged 2 commits intodevelopfromdev/ffmpeg_5.0
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletionssrc/AvTranscoder/properties/PixelProperties.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -204,21 +204,11 @@ bool PixelProperties::isRgbPixelData() const
return (_pixelDesc->flags & AV_PIX_FMT_FLAG_RGB) == AV_PIX_FMT_FLAG_RGB;
}

#if LIBAVCODEC_VERSION_MAJOR > 58
bool PixelProperties::isPaletted() const {
if (!_pixelDesc)
throw std::runtime_error("unable to find pixel description.");

return (_pixelDesc->flags & AV_PIX_FMT_FLAG_PAL) == AV_PIX_FMT_FLAG_PAL;
#elif LIBAVCODEC_VERSION_MAJOR > 53
bool PixelProperties::isPseudoPaletted() const {
if (!_pixelDesc)
throw std::runtime_error("unable to find pixel description.");

return (_pixelDesc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) == AV_PIX_FMT_FLAG_PSEUDOPAL;
#else
return false;
#endif
}

std::vector<Channel> PixelProperties::getChannels() const
Expand Down
4 changes: 0 additions & 4 deletionssrc/AvTranscoder/properties/PixelProperties.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -71,11 +71,7 @@ class AvExport PixelProperties
bool isBitWisePacked() const;
bool isHardwareAccelerated() const;
bool isRgbPixelData() const;
#if LIBAVCODEC_VERSION_MAJOR > 58
bool isPaletted() const;
#else
bool isPseudoPaletted() const;
#endif

std::vector<Channel> getChannels() const;

Expand Down
22 changes: 12 additions & 10 deletionssrc/AvTranscoder/transcoder/Transcoder.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -673,22 +673,24 @@ void Transcoder::fillProcessStat(ProcessStat& processStat)
// uint8_t picture_type = coded_frame[4];
uint8_t error_count = coded_frame[5];

uint64_t errors[error_count];
std::vector<uint64_t> errors;
for (int i = 0; i < error_count; ++i)
{
int index = 6 + i;
errors[i] = (uint64_t) coded_frame[index + 7] << 56 |
(uint64_t) coded_frame[index + 6] << 48 |
(uint64_t) coded_frame[index + 5] << 40 |
(uint64_t) coded_frame[index + 4] << 32 |
(uint64_t) coded_frame[index + 3] << 24 |
(uint64_t) coded_frame[2] << 16 |
(uint64_t) coded_frame[1] << 8 |
(uint64_t) coded_frame[0];
errors.push_back(
(uint64_t) coded_frame[index + 7] << 56 |
(uint64_t) coded_frame[index + 6] << 48 |
(uint64_t) coded_frame[index + 5] << 40 |
(uint64_t) coded_frame[index + 4] << 32 |
(uint64_t) coded_frame[index + 3] << 24 |
(uint64_t) coded_frame[2] << 16 |
(uint64_t) coded_frame[1] << 8 |
(uint64_t) coded_frame[0]
);
}

videoStat.setQuality(quality);
videoStat.setPSNR((double) errors[0] /
videoStat.setPSNR((double) errors.at(0) /
(encoderContext.width * encoderContext.height * 255.0 * 255.0));
}
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp