Closed Austin-Hu closed 1 year ago
After applying the change to decode H.264 bitstream, which was encoded with 16 pixels aligned in width and height:
diff --git a/examples/hello/hello-decode/src/hello-decode.cpp b/examples/hello/hello-decode/src/hello-decode.cpp index 6f555ee..e649294 100644 --- a/examples/hello/hello-decode/src/hello-decode.cpp +++ b/examples/hello/hello-decode/src/hello-decode.cpp @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) { cfg[1] = MFXCreateConfig(loader); VERIFY(NULL != cfg[1], "MFXCreateConfig failed") cfgVal[1].Type = MFX_VARIANT_TYPE_U32; - cfgVal[1].Data.U32 = MFX_CODEC_HEVC; + cfgVal[1].Data.U32 = MFX_CODEC_AVC; sts = MFXSetConfigFilterProperty( cfg[1], (mfxU8 *)"mfxImplDescription.mfxDecoderDescription.decoder.CodecID", @@ -113,13 +113,13 @@ int main(int argc, char *argv[]) { bitstream.MaxLength = BITSTREAM_BUFFER_SIZE; bitstream.Data = (mfxU8 *)calloc(bitstream.MaxLength, sizeof(mfxU8)); VERIFY(bitstream.Data, "Not able to allocate input buffer"); - bitstream.CodecId = MFX_CODEC_HEVC; + bitstream.CodecId = MFX_CODEC_AVC; // Pre-parse input stream sts = ReadEncodedStream(bitstream, source); VERIFY(MFX_ERR_NONE == sts, "Error reading bitstream\n"); - decodeParams.mfx.CodecId = MFX_CODEC_HEVC; + decodeParams.mfx.CodecId = MFX_CODEC_AVC; decodeParams.IOPattern = MFX_IOPATTERN_OUT_SYSTEM_MEMORY; sts = MFXVideoDECODE_DecodeHeader(session, &bitstream, &decodeParams); VERIFY(MFX_ERR_NONE == sts, "Error decoding header\n");
with the command:
hello-decode -hw -i client_bitstream.h264
Then I'd get the decoded YUV data like:
In order to show it correctly, I had to adjust its size with aligned one, but with redundant 8 lines displayed at the bottom:
Fixed in 7e7fd619e3589baaaa6c8c5a25b930ff24ef05eb
After applying the change to decode H.264 bitstream, which was encoded with 16 pixels aligned in width and height:
with the command:
Then I'd get the decoded YUV data like:
In order to show it correctly, I had to adjust its size with aligned one, but with redundant 8 lines displayed at the bottom: