* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#define YLC_VLC_BITS 10
-#include "libavutil/imgutils.h"
-#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
+#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "get_bits.h"
-#include "huffyuvdsp.h"
#include "thread.h"
#include "unary.h"
uint8_t xlat[256];
int cur_node, i, j, pos = 0;
- ff_free_vlc(vlc);
+ ff_vlc_free(vlc);
for (i = 0; i < 256; i++) {
nodes[i].count = table[i];
get_tree_codes(bits, lens, xlat, nodes, cur_node - 1, 0, 0, &pos);
- return ff_init_vlc_sparse(vlc, YLC_VLC_BITS, pos, lens, 2, 2,
+ return ff_vlc_init_sparse(vlc, YLC_VLC_BITS, pos, lens, 2, 2,
bits, 4, 4, xlat, 1, 1, 0);
}
}
p->pict_type = AV_PICTURE_TYPE_I;
- p->key_frame = 1;
+ p->flags |= AV_FRAME_FLAG_KEY;
*got_frame = 1;
return avpkt->size;
YLCContext *s = avctx->priv_data;
for (int i = 0; i < FF_ARRAY_ELEMS(s->vlc); i++)
- ff_free_vlc(&s->vlc[i]);
+ ff_vlc_free(&s->vlc[i]);
av_freep(&s->buffer);
s->buffer_size = 0;
const FFCodec ff_ylc_decoder = {
.p.name = "ylc",
- .p.long_name = NULL_IF_CONFIG_SMALL("YUY2 Lossless Codec"),
+ CODEC_LONG_NAME("YUY2 Lossless Codec"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_YLC,
.priv_data_size = sizeof(YLCContext),
.close = decode_end,
FF_CODEC_DECODE_CB(decode_frame),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};