summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dsputil.h5
-rw-r--r--libavcodec/dv.c3
-rw-r--r--libavcodec/flacenc.c2
-rw-r--r--libavcodec/mpegvideo.c7
-rw-r--r--libavcodec/mpegvideo_enc.c4
-rw-r--r--libavcodec/svq3.c5
-rw-r--r--libavcodec/targaenc.c3
-rw-r--r--libavcodec/utils.c2
-rw-r--r--libavcodec/wmaprodec.c2
9 files changed, 15 insertions, 18 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index b3d70580c5..f2c36b37e8 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -687,11 +687,6 @@ void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx);
# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
#endif
-/* PSNR */
-void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3],
- int orig_linesize[3], int coded_linesize,
- AVCodecContext *avctx);
-
#define WRAPPER8_16(name8, name16)\
static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
return name8(s, dst , src , stride, h)\
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 9b24d13967..6cccaee438 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -38,6 +38,7 @@
* DV codec.
*/
#define ALT_BITSTREAM_READER
+#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
@@ -350,7 +351,7 @@ static av_cold int dvvideo_init_encoder(AVCodecContext *avctx)
{
if (!ff_dv_codec_profile(avctx)) {
av_log(avctx, AV_LOG_ERROR, "Found no DV profile for %ix%i %s video\n",
- avctx->width, avctx->height, avcodec_get_pix_fmt_name(avctx->pix_fmt));
+ avctx->width, avctx->height, av_get_pix_fmt_name(avctx->pix_fmt));
return -1;
}
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index c8d3af5546..b8d0e10631 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1002,7 +1002,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
static int count_frame_header(FlacEncodeContext *s)
{
- uint8_t tmp;
+ uint8_t av_unused tmp;
int count;
/*
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index edc9e229fa..c599d1df3b 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -586,8 +586,7 @@ av_cold int MPV_common_init(MpegEncContext *s)
return -1;
}
-
- if((s->avctx->active_thread_type & FF_THREAD_SLICE) &&
+ if((s->encoding || (s->avctx->active_thread_type & FF_THREAD_SLICE)) &&
(s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height))){
av_log(s->avctx, AV_LOG_ERROR, "too many threads\n");
return -1;
@@ -746,7 +745,7 @@ av_cold int MPV_common_init(MpegEncContext *s)
s->context_initialized = 1;
s->thread_context[0]= s;
- if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE) {
+ if (s->encoding || (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE)) {
threads = s->avctx->thread_count;
for(i=1; i<threads; i++){
@@ -778,7 +777,7 @@ void MPV_common_end(MpegEncContext *s)
{
int i, j, k;
- if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE) {
+ if (s->encoding || (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE)) {
for(i=0; i<s->avctx->thread_count; i++){
free_duplicate_context(s->thread_context[i]);
}
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 4f5b56dd8f..a6e9c7c7be 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1226,7 +1226,7 @@ int MPV_encode_picture(AVCodecContext *avctx,
{
MpegEncContext *s = avctx->priv_data;
AVFrame *pic_arg = data;
- int i, stuffing_count, context_count = avctx->active_thread_type&FF_THREAD_SLICE ? avctx->thread_count : 1;
+ int i, stuffing_count, context_count = avctx->thread_count;
for(i=0; i<context_count; i++){
int start_y= s->thread_context[i]->start_mb_y;
@@ -2759,7 +2759,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
{
int i;
int bits;
- int context_count = (s->avctx->active_thread_type & FF_THREAD_SLICE) ? s->avctx->thread_count : 1;
+ int context_count = s->avctx->thread_count;
s->picture_number = picture_number;
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 95c85fa0bb..9fec0350d2 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -821,9 +821,10 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
if (!s->context_initialized) {
h->chroma_qp[0] = h->chroma_qp[1] = 4;
- svq3->halfpel_flag = 1;
+ svq3->halfpel_flag = 1;
svq3->thirdpel_flag = 1;
- svq3->unknown_flag = 0;
+ svq3->unknown_flag = 0;
+
/* prowl for the "SEQH" marker in the extradata */
extradata = (unsigned char *)avctx->extradata;
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index 7bdaca3bec..1171f605a2 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/intreadwrite.h"
+#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "rle.h"
#include "targa.h"
@@ -119,7 +120,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
break;
default:
av_log(avctx, AV_LOG_ERROR, "Pixel format '%s' not supported.\n",
- avcodec_get_pix_fmt_name(avctx->pix_fmt));
+ av_get_pix_fmt_name(avctx->pix_fmt));
return AVERROR(EINVAL);
}
bpp = outbuf[16] >> 3;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cb94b1036f..a628ea7aac 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1012,7 +1012,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (enc->pix_fmt != PIX_FMT_NONE) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %s",
- avcodec_get_pix_fmt_name(enc->pix_fmt));
+ av_get_pix_fmt_name(enc->pix_fmt));
}
if (enc->width) {
snprintf(buf + strlen(buf), buf_size - strlen(buf),
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index c0492c36f5..e1d942dca2 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1320,7 +1320,7 @@ static int decode_frame(WMAProDecodeCtx *s)
/** no idea what these are for, might be the number of samples
that need to be skipped at the beginning or end of a stream */
if (get_bits1(gb)) {
- int skip;
+ int av_unused skip;
/** usually true for the first frame */
if (get_bits1(gb)) {