diff options
Diffstat (limited to 'libavcodec/huffyuvenc.c')
-rw-r--r-- | libavcodec/huffyuvenc.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index 994b21fc1e..9c41f52cb4 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -220,7 +220,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ff_huffyuvencdsp_init(&s->hencdsp); avctx->extradata = av_mallocz(3*MAX_N + 4); - if (s->flags&CODEC_FLAG_PASS1) { + if (s->flags&AV_CODEC_FLAG_PASS1) { #define STATS_OUT_SIZE 21*MAX_N*3 + 4 avctx->stats_out = av_mallocz(STATS_OUT_SIZE); // 21*256*3(%llu ) + 3(\n) + 1(0) = 16132 if (!avctx->stats_out) @@ -314,10 +314,10 @@ FF_ENABLE_DEPRECATION_WARNINGS avctx->bits_per_coded_sample = s->bitstream_bpp; s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR); s->predictor = avctx->prediction_method; - s->interlaced = avctx->flags&CODEC_FLAG_INTERLACED_ME ? 1 : 0; + s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0; if (avctx->context_model == 1) { s->context = avctx->context_model; - if (s->flags & (CODEC_FLAG_PASS1|CODEC_FLAG_PASS2)) { + if (s->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) { av_log(avctx, AV_LOG_ERROR, "context=1 is not compatible with " "2 pass huffyuv encoding\n"); @@ -454,7 +454,7 @@ static int encode_422_bitstream(HYuvContext *s, int offset, int count) count /= 2; - if (s->flags & CODEC_FLAG_PASS1) { + if (s->flags & AV_CODEC_FLAG_PASS1) { for(i = 0; i < count; i++) { LOAD4; s->stats[0][y0]++; @@ -463,7 +463,7 @@ static int encode_422_bitstream(HYuvContext *s, int offset, int count) s->stats[2][v0]++; } } - if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) return 0; if (s->context) { for (i = 0; i < count; i++) { @@ -539,7 +539,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) put_bits(&s->pb, 2, y1&3); if (s->bps <= 8) { - if (s->flags & CODEC_FLAG_PASS1) { + if (s->flags & AV_CODEC_FLAG_PASS1) { for (i = 0; i < count; i++) { LOAD2; STAT2; @@ -549,7 +549,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) STATEND; } } - if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) return 0; if (s->context) { @@ -575,7 +575,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) } } else if (s->bps <= 14) { int mask = s->n - 1; - if (s->flags & CODEC_FLAG_PASS1) { + if (s->flags & AV_CODEC_FLAG_PASS1) { for (i = 0; i < count; i++) { LOAD2_14; STAT2; @@ -585,7 +585,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) STATEND; } } - if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) return 0; if (s->context) { @@ -610,7 +610,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) } } } else { - if (s->flags & CODEC_FLAG_PASS1) { + if (s->flags & AV_CODEC_FLAG_PASS1) { for (i = 0; i < count; i++) { LOAD2_16; STAT2_16; @@ -620,7 +620,7 @@ static int encode_plane_bitstream(HYuvContext *s, int width, int plane) STATEND_16; } } - if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) return 0; if (s->context) { @@ -672,13 +672,13 @@ static int encode_gray_bitstream(HYuvContext *s, int count) count /= 2; - if (s->flags & CODEC_FLAG_PASS1) { + if (s->flags & AV_CODEC_FLAG_PASS1) { for (i = 0; i < count; i++) { LOAD2; STAT2; } } - if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) return 0; if (s->context) { @@ -726,13 +726,13 @@ static inline int encode_bgra_bitstream(HYuvContext *s, int count, int planes) if (planes == 4) \ put_bits(&s->pb, s->len[2][a], s->bits[2][a]); - if ((s->flags & CODEC_FLAG_PASS1) && - (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)) { + if ((s->flags & AV_CODEC_FLAG_PASS1) && + (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)) { for (i = 0; i < count; i++) { LOAD_GBRA; STAT_BGRA; } - } else if (s->context || (s->flags & CODEC_FLAG_PASS1)) { + } else if (s->context || (s->flags & AV_CODEC_FLAG_PASS1)) { for (i = 0; i < count; i++) { LOAD_GBRA; STAT_BGRA; @@ -1000,7 +1000,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, put_bits(&s->pb, 15, 0); size /= 4; - if ((s->flags&CODEC_FLAG_PASS1) && (s->picture_number & 31) == 0) { + if ((s->flags & AV_CODEC_FLAG_PASS1) && (s->picture_number & 31) == 0) { int j; char *p = avctx->stats_out; char *end = p + STATS_OUT_SIZE; @@ -1017,7 +1017,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, } } else if (avctx->stats_out) avctx->stats_out[0] = '\0'; - if (!(s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT)) { + if (!(s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT)) { flush_put_bits(&s->pb); s->bdsp.bswap_buf((uint32_t *) pkt->data, (uint32_t *) pkt->data, size); } |