Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deinterlace Picture in FFmpegFrameGrabber #38

Closed
GoogleCodeExporter opened this issue Oct 9, 2015 · 4 comments
Closed

Deinterlace Picture in FFmpegFrameGrabber #38

GoogleCodeExporter opened this issue Oct 9, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Its not a Problem, but a Question. Related to FFmpegFramegrabber Class.  

Short Version: How can I use a function like this:

DeprecatedFunctions.avpicture_deinterlace(dst, src, pix_fmt, width, height);

This Function is "Deprecated". What is current workaround when I have 
interlaced video material? How can I deinterlace the picture within the  
FFmpegFramegrabber class?


What version of the product are you using? On what operating system?
Win7 64bit
OpenCv 2.1.0

Original issue reported on code.google.com by fbrai...@web.de on 9 Dec 2010 at 10:59

@GoogleCodeExporter
Copy link
Author

I don't see it as part of the deprecated functions, reference:
http://code.google.com/p/javacv/source/browse/trunk/javacv/src/com/googlecode/ja
vacv/jna/avcodec.java?r=70#1498   ?
I don't know how to use this function, but you may use it in any appropriate 
manner within FFmpegFrameGrabber yes.. Please let me know the modifications you 
make so I may incorporate them in a future version of JavaCV, thank you

Original comment by samuel.a...@gmail.com on 12 Dec 2010 at 11:16

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Thanks for your Answer. I found my mistake.

Your Class "DeprecatedFunctions" extends avcodec... so I was calling:
DeprecatedFunctions.avpicture_deinterlace(......);

I did not know that I can call the "Opt"-class...
I think the right way is to call: 
Opt.avpicture_deinterlace(...);

Because it`s a static call it doesn`t matter....my mistake sorry.

Here is my code for the FFMPEGFramegrabber class attached:

I modified it for my needs. When calling the grab()-method I call the native 
deinterlace funktion. And use the grabbed Frame(pFrame) as src and destionation.
See Line 382 in the attached File. 
if(dointerlace){                                    
Opt.avpicture_deinterlace(pFrame, pFrame, pCodecCtx.pix_fmt, pCodecCtx.width, 
pCodecCtx.height);
}

It works. :-)

What I also did:
Set a start time when playing a video file. See line 215-227. I didn`t check 
the functionality of this. So don`t use this part of code. 


Original comment by fbrai...@web.de on 13 Dec 2010 at 8:42

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks! Will incorporate this in the next release...

Original comment by samuel.a...@gmail.com on 14 Dec 2010 at 7:00

  • Changed title: Deinterlace Picture in FFmpegFrameGrabber
  • Changed state: Started
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Added deinterlace setting to latest version. If it does not work correctly, 
please reopen. Otherwise, please change status to "Verified", thank you.

Original comment by samuel.a...@gmail.com on 19 Feb 2011 at 3:53

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant