core/vidl/vidl_ffmpeg_convert.h

Go to the documentation of this file.
00001 // This is core/vidl/vidl_ffmpeg_convert.h
00002 #ifndef vidl_ffmpeg_convert_h_
00003 #define vidl_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 "vidl_frame_sptr.h"
00016 #include "vidl_pixel_format.h"
00017 
00018 #include <vidl/vidl_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 vidl_ffmpeg_convert(const vidl_frame_sptr& in_frame,
00034                                vidl_frame_sptr& out_frame);
00035 
00036 
00037 //: Find the vidl pixel format that matches a FFMPEG one
00038 vidl_pixel_format
00039 vidl_pixel_format_from_ffmpeg(PixelFormat ffmpeg_pix_fmt);
00040 
00041 
00042 //: Find the FFMPEG pixel format that matches a vidl one
00043 PixelFormat
00044 vidl_pixel_format_to_ffmpeg(vidl_pixel_format vidl_pix_fmt);
00045 
00046 #endif // vidl_ffmpeg_convert_h_
00047 

Generated on Mon Mar 8 05:10:34 2010 for core/vidl by  doxygen 1.5.1