FFmpeg
Functions
rawutils.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavcodec/packet.h"
#include "avformat.h"
#include "rawutils.h"

Go to the source code of this file.

Functions

int ff_reshuffle_raw_rgb (AVFormatContext *s, AVPacket **ppkt, AVCodecParameters *par, int expected_stride)
 Reshuffles the lines to use the user specified stride. More...
 
int ff_get_packet_palette (AVFormatContext *s, AVPacket *pkt, int ret, uint32_t *palette)
 Retrieves the palette from a packet, either from side data, or appended to the video data in the packet itself (raw video only). More...
 

Function Documentation

◆ ff_reshuffle_raw_rgb()

int ff_reshuffle_raw_rgb ( AVFormatContext s,
AVPacket **  ppkt,
AVCodecParameters par,
int  expected_stride 
)

Reshuffles the lines to use the user specified stride.

Parameters
ppktinput and output packet
Returns
negative error code or 0 if no new packet was allocated non-zero if a new packet was allocated and ppkt has to be freed CONTAINS_PAL if in addition to a new packet the old contained a palette

Definition at line 27 of file rawutils.c.

Referenced by avi_write_packet(), and mov_write_packet().

◆ ff_get_packet_palette()

int ff_get_packet_palette ( AVFormatContext s,
AVPacket pkt,
int  ret,
uint32_t *  palette 
)

Retrieves the palette from a packet, either from side data, or appended to the video data in the packet itself (raw video only).

It is commonly used after a call to ff_reshuffle_raw_rgb().

Use 0 for the ret parameter to check for side data only.

Parameters
pktpointer to packet before calling ff_reshuffle_raw_rgb()
retreturn value from ff_reshuffle_raw_rgb(), or 0
palettepointer to palette buffer
Returns
negative error code or 1 if the packet has a palette, else 0

Definition at line 71 of file rawutils.c.

Referenced by avi_write_packet(), and mov_write_packet().