diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index 44d672aebe..eddb1b028b 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -329,7 +329,6 @@ void RegisterAllModules() { Register_sceChkreg(); Register_sceVshBridge(); Register_sceResmgr(); - Register_sceVideocodec(); // add new modules here. diff --git a/Core/HW/AvcDecoder.cpp b/Core/HW/AvcDecoder.cpp index b87bb611be..568adf750f 100644 --- a/Core/HW/AvcDecoder.cpp +++ b/Core/HW/AvcDecoder.cpp @@ -155,6 +155,13 @@ bool AvcDecoder::Decode(const u8 *data, int size) { } #endif + // Everything downstream indexes the three planes as 8-bit 4:2:0, which is all the PSP's + // encoder produced. Anything else would be read as if it were, so say so and drop the frame + // rather than converting garbage. + if (frame_->format != AV_PIX_FMT_YUV420P && frame_->format != AV_PIX_FMT_YUVJ420P) { + WARN_LOG(Log::ME, "AvcDecoder: unexpected pixel format %d, ignoring the frame", frame_->format); + return false; + } width_ = frame_->width; height_ = frame_->height; haveFrame_ = width_ > 0 && height_ > 0;