Commit def18e54 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b047c687'

* commit 'b047c687':
  4xm: don't rely on get_buffer() initializing the frame.
  huffyuv: split encoder and decoder into separate files.
  lavc: make pkt_{p,d}ts doxy less confusing

Conflicts:
	libavcodec/Makefile
	libavcodec/huffyuv.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 2f9903f6 b047c687
......@@ -901,6 +901,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
for (i=0; i<avctx->height; i++)
memset(f->last_picture.data[0] + i*f->last_picture.linesize[0], 0, 2*avctx->width);
}
p->pict_type = AV_PICTURE_TYPE_P;
......
......@@ -190,8 +190,8 @@ OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o
OBJS-$(CONFIG_EXR_DECODER) += exr.o
OBJS-$(CONFIG_FFV1_DECODER) += ffv1dec.o ffv1.o
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1enc.o ffv1.o
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o huffyuvdec.o
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o huffyuvenc.o
OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o flacdsp.o
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o flacdsp.o vorbis_data.o
......@@ -227,8 +227,8 @@ OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o huffyuvdec.o
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o huffyuvenc.o
OBJS-$(CONFIG_IAC_DECODER) += imc.o
OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o
OBJS-$(CONFIG_IDF_DECODER) += bintext.o cga_data.o
......
......@@ -1193,7 +1193,7 @@ typedef struct AVFrame {
int64_t pts;
/**
* reordered pts from the last AVPacket that has been input into the decoder
* pts copied from the AVPacket that was decoded to produce this frame
* - encoding: unused
* - decoding: Read by user.
*/
......
This diff is collapsed.
/*
* Copyright (c) 2002-2003 Michael Niedermayer <michaelni@gmx.at>
*
* see http://www.pcisys.net/~melanson/codecs/huffyuv.txt for a description of
* the algorithm used
*
* This file is part of FFmpeg.
*
* FFmpeg 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,
* 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
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* huffyuv codec for libavcodec.
*/
#ifndef AVCODEC_HUFFYUV_H
#define AVCODEC_HUFFYUV_H
#include <stdint.h>
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
#include "put_bits.h"
#define VLC_BITS 11
#if HAVE_BIGENDIAN
#define B 3
#define G 2
#define R 1
#define A 0
#else
#define B 0
#define G 1
#define R 2
#define A 3
#endif
typedef enum Predictor {
LEFT = 0,
PLANE,
MEDIAN,
} Predictor;
typedef struct HYuvContext {
AVCodecContext *avctx;
Predictor predictor;
GetBitContext gb;
PutBitContext pb;
int interlaced;
int decorrelate;
int bitstream_bpp;
int version;
int yuy2; //use yuy2 instead of 422P
int bgr32; //use bgr32 instead of bgr24
int width, height;
int flags;
int context;
int picture_number;
int last_slice_end;
uint8_t *temp[3];
uint64_t stats[3][256];
uint8_t len[3][256];
uint32_t bits[3][256];
uint32_t pix_bgr_map[1<<VLC_BITS];
VLC vlc[6]; //Y,U,V,YY,YU,YV
AVFrame picture;
uint8_t *bitstream_buffer;
unsigned int bitstream_buffer_size;
DSPContext dsp;
} HYuvContext;
void ff_huffyuv_common_init(AVCodecContext *s);
void ff_huffyuv_common_end(HYuvContext *s);
int ff_huffyuv_alloc_temp(HYuvContext *s);
int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table);
#endif /* AVCODEC_HUFFYUV_H */
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment