37     if (buf_end - buf < 14)
 
   42     bytes_per_pixel = 
AV_RL16(buf+12) >> 3;
 
   44     if (bytes_per_pixel != 2) {
 
   51     if (buf_end - buf < offset)
 
   69     for (y = 0; y < h && buf_end - buf >= w * bytes_per_pixel; y++) {
 
   70         memcpy(ptr, buf, w*bytes_per_pixel);
 
   72         buf += w*bytes_per_pixel;
 
   82     return offset + w*h*bytes_per_pixel;
 
#define AVERROR_INVALIDDATA
Invalid data found when processing input. 
This structure describes decoded (raw) audio or video data. 
ptrdiff_t const GLvoid * data
#define AV_LOG_WARNING
Something somehow does not look correct. 
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context. 
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx. 
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature. 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation. 
static const uint8_t offset[127][2]
static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
enum AVPictureType pict_type
Picture type of the frame. 
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome. 
Libavcodec external API header. 
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line. 
main external API structure. 
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame. 
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined ...
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes. 
common internal api header. 
common internal and external API header 
This structure stores compressed data. 
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.