Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sytse_v_
Beginner
57 Views

Specifying basic SPS/PPS on encoder breaks under HW on different machines

Hello All,

Background: we would like to match a specific SPS/PPS setup so we can subclip videos and insert them into other videos without breaking the decoder.

However, we've been having an issue with specifying an encoding SPS PPS.

To help reproduce this issue, we have attached a slightly modified CPP source code (simple_transcode.cpp) from one of your media sdk tutorials, the simple_transcode. Also we attach sample video to work with (high-tos-1920x800-6400kbps-5s.m2ts), and some screenshots(1.jpg,2.jpg) of the behavior.

On line 181 we specify a simple AVC constrained baseline sps / pps set.

In software (-sw):

sts = mfxENC.Init(&mfxEncParams); 

MFX_ERR_NONE

Upon retrieving the encoder parameters to check the actual encoder sps/pps settings we get a different result:

input sps/pps
00012742C028D907865B11000301000330F1832480
000128CB83CB20
encoder sps/pps
00012742C028D907865B11000301000330DA183248
000128CB83CB20

OK so without an error result, however there is still a different setting to the specified SPS. Why does it adjust these parameters?

With hardware (-hw)

sts = mfxENC.Init(&mfxEncParams); 

MFX_WRN_INCOMPATIBLE_VIDEO_PARAM

The input sps and encoder sps are identical. However, the output movie is broken on 3 different test setups.
All machines have Intel Media Server Studio 2016 R1 installed.

Machine 1:
Windows 10
i7-3615QM
Intel(R) HD Graphics 4000 v10.18.10.4358
1.11    HW      Yes             X       X
1.17    SW      Yes             X       X

With command line options:

-hw -b 900 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Color is shifted towards red (1.jpg)

-hw -b 2500 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Color is shifted towards green (2.jpg)

On some bitrates it "looks" correct

Machine 2:
Windows 10
i5-6400
Intel(R) HD Graphics 53 v21.20.16.4534
1.17    SW      Yes             X       X
1.19    HW      Yes             X       X

With -hw

Playback randomly breaks on any bitrate

Machine 3:
Linux with patched kernel from Intel Media Server Studio 2016 R1
i7-5557U
hardware/software 1.17

With

-hw -b 900 -f 48/2 high-tos-1920x800-6400kbps-5s.m2ts transrate-900kbps-hw.m2ts

Same color shift towards red/green on different bitrates

The big question is, why is this so broken on different machines? The great thing is that with software at least the output is identical on all machines, except it chooses a different encoder SPS/PPS so we cannot insert this into another video stream.
I know there are limitations to the hardware / software encoders, however when it is configured without errors and returns the identical SPS/PPS, the video is completely broken.

Thanks for your help,

Sytse

 

0 Kudos
1 Reply
sytse_v_
Beginner
57 Views

Bump.

Nobody has ideas? This is quite easy to test, can anyone confirm the bug?