* PC Paintbrush PCX (.pcx) image encoder
* Copyright (c) 2009 Daniel Verkamp <daniel at drv.nu>
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* PCX image encoder
- * @file libavcodec/pcxenc.c
+ * @file
* @author Daniel Verkamp
* @sa http://www.qzx.com/pc-gpe/pcx.txt
*/
AVFrame picture;
} PCXContext;
-static const uint32_t monoblack_pal[] = { 0x000000, 0xFFFFFF };
+static const uint32_t monoblack_pal[16] = { 0x000000, 0xFFFFFF };
static av_cold int pcx_encode_init(AVCodecContext *avctx)
{
const uint8_t *src;
*pict = *(AVFrame *)data;
- pict->pict_type = FF_I_TYPE;
+ pict->pict_type = AV_PICTURE_TYPE_I;
pict->key_frame = 1;
if (avctx->width > 65535 || avctx->height > 65535) {
return buf - buf_start;
}
-AVCodec pcx_encoder = {
+AVCodec ff_pcx_encoder = {
"pcx",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_PCX,
sizeof(PCXContext),
pcx_encode_init,
pcx_encode_frame,
NULL,
- .pix_fmts = (enum PixelFormat[]){
+ .pix_fmts = (const enum PixelFormat[]){
PIX_FMT_RGB24,
PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8,
PIX_FMT_MONOBLACK,