Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

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 extern "C" {
00019 #include <ffmpeg/avcodec.h>
00020 }
00021     
00022 //: Convert the pixel format of a frame using FFMPEG
00023 //
00024 // The \p in_frame->data() is converted from \p in_frame->pixel_format()
00025 // to \p out_frame->pixel_format() and stored in \p out_frame->data()
00026 // If the output frame data is not the correct size new memory
00027 // will be allocated
00028 bool vidl2_ffmpeg_convert(const vidl2_frame_sptr& in_frame,
00029                                 vidl2_frame_sptr& out_frame);
00030 
00031 
00032 //: Find the vidl2 pixel format that matches a FFMPEG one
00033 vidl2_pixel_format
00034 vidl2_pixel_format_from_ffmpeg(PixelFormat ffmpeg_pix_fmt);
00035 
00036 
00037 //: Find the FFMPEG pixel format that matches a vidl2 one
00038 PixelFormat
00039 vidl2_pixel_format_to_ffmpeg(vidl2_pixel_format vidl2_pix_fmt);
00040 
00041 #endif // vidl2_ffmpeg_convert_h_
00042 

Generated on Thu Jan 10 14:51:31 2008 for contrib/brl/bbas/vidl2 by  doxygen 1.4.4