(2016-02-07, 21:19)tom81 Wrote: Thanks for the feedback. I tested your updated code and I can confirm that MPEG2 video playback now works. Without debugging compiled in, the stuttering is also gone.
Some more things I noticed:
- Your latest FFMPEG patch seems to be missing a file, avcodec/vdpau_msmpeg4.c. I re-added it from an earlier revision of the patch.
- Forward/backward skipping in videos is broken for any codec: If I fast-forward the video to some different time, I get some green flashing screen with the last few shown frames repeating in between over and over again. Audio continues to play normally, though.
- XVID/MPEG4 playback seems to be a mixed bag. Some files I have work nicely, others have some sort of block artifacts, tearing, choppy playback or no video at all. Maybe the options the videos were encoded with are important, I'll try to produce some "broken" test videos for debugging.
I also tried to port your code to the latest Kodi version (16rc), but I'm afraid I messed something up: I only get a red screen instead of any hw-accelerated video. Something important has changed between 14.2 and 16 I didn't take care of...
Best,
tom
Tom, thanks again for testing it.
and thanks for reminding me for the forward/backward issue. I have seen that by myself but did forget about it already again. I will have a look at it ..
regarding xvid/mpeg4. Do you have an example of the block artifact, etc? I have tested all the files I could find in the internet, and they worked fine. So I would be interested to see non-working examples to improve it. The encoding options are definitely important. The MPEG4 standard is so huge (several hundred pages), I just can't support all options of the standard, but have to restrict to the most important ones/the ones which are really used of it. Also I have to see which ones the cedar HW is supporting.
Cool, you tried already porting it. I tried to intermediate step to 15.2, BUT a/v sync in 15.2 has changed a lot and video display skipped lots of frames. Then I wanted to skip 15.2 and concentrate on the latest 16rc, but I did not even start. Maybe be can do the port to 16rc together.. Btw if you see a red screen when you display a video, this means that all values in the UMP buffers are 0. Then after YUV to RGB conversion within the GLES shader the color get converted to red.
I had a similar problem in CLinuxRendererGLES::Render. Check that
- the textures are uploaded to OpenGLES by a function with name similar to uploadTextures
- for single pass rendering that there is NOT just the bold marked line. RenderSinglePass called with the parameter m_currentField uses the wrong index, hence the wrong (empty) texture is used. Therefor I have added the RenderProgessiveWeave function, which uses a different index (internally)
case RQ_SINGLEPASS:
if (m_format == RENDER_FMT_VDPAU_420 && m_currentField == FIELD_FULL)
RenderProgressiveWeave(index, m_currentField);
else
RenderSinglePass(index, m_currentField);
VerifyGLState();
break;
Regards,
mosterta