contrib/brl/bbas/vidl2/vidl2_ffmpeg_convert.h

Go to the documentation of this file.
00001 // This is brl/bbas/vidl2/vidl2_ffmpeg_convert.h
00002 #ifndef vidl2_ffmpeg_convert_h_
00003 #define vidl2_ffmpeg_convert_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Use FFMPEG for optimized pixel format conversions
00010 //
00011 // \author Matt Leotta
00012 // \date 19 Jan 2006
00013 //
00014 
00015 #include "vidl2_frame_sptr.h"
00016 #include "vidl2_pixel_format.h"
00017 
00018 #include <vidl2/vidl2_config.h>
00019 extern "C" {
00020 #if FFMPEG_IN_SEVERAL_DIRECTORIES
00021 #include <libavcodec/avcodec.h>
00022 #else
00023 #include <ffmpeg/avcodec.h>
00024 #endif
00025 }
00026     
00027 //: Convert the pixel format of a frame using FFMPEG
00028 //
00029 // The \p in_frame->data() is converted from \p in_frame->pixel_format()
00030 // to \p out_frame->pixel_format() and stored in \p out_frame->data()
00031 // If the output frame data is not the correct size new memory
00032 // will be allocated
00033 bool vidl2_ffmpeg_convert(const vidl2_frame_sptr& in_frame,
00034                                 vidl2_frame_sptr& out_frame);
00035 
00036 
00037 //: Find the vidl2 pixel format that matches a FFMPEG one
00038 vidl2_pixel_format
00039 vidl2_pixel_format_from_ffmpeg(PixelFormat ffmpeg_pix_fmt);
00040 
00041 
00042 //: Find the FFMPEG pixel format that matches a vidl2 one
00043 PixelFormat
00044 vidl2_pixel_format_to_ffmpeg(vidl2_pixel_format vidl2_pix_fmt);
00045 
00046 #endif // vidl2_ffmpeg_convert_h_
00047 

Generated on Wed Dec 3 05:21:03 2008 for contrib/brl/bbas/vidl2 by  doxygen 1.5.1