History

avcodec/mpegvideo: Move loop_filter to {H263Dec,MPVEnc,VC1}Context

Andreas Rheinhardt committed 1 year ago

Commit abc54c21 parent 60f51bd21 files · +47 −45Browse files

Unified · Split

21 files
  1. libavcodec/dxva2_vc1.c +2 −2
  2. libavcodec/h261enc.c +2 −2
  3. libavcodec/h263dec.c +2 −2
  4. libavcodec/h263dec.h +1 −0
  5. libavcodec/intelh263dec.c +1 −1
  6. libavcodec/ituh263dec.c +4 −4
  7. libavcodec/ituh263enc.c +1 −1
  8. libavcodec/mpegvideo.h +0 −1
  9. libavcodec/mpegvideo_enc.c +5 −5
  10. libavcodec/mpegvideoenc.h +1 −0
  11. libavcodec/mss2.c +1 −1
  12. libavcodec/nvdec_vc1.c +1 −1
  13. libavcodec/rv10.c +3 −3
  14. libavcodec/rv20enc.c +1 −1
  15. libavcodec/vaapi_vc1.c +1 −1
  16. libavcodec/vc1.c +8 −8
  17. libavcodec/vc1.h +1 −0
  18. libavcodec/vc1_block.c +7 −7
  19. libavcodec/vdpau_vc1.c +1 −1
  20. libavcodec/wmv2dec.c +3 −3
  21. libavcodec/wmv2enc.c +1 −1
libavcodec/dxva2_vc1.c+2−2
@@ -108,7 +108,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx, · 107 unmodified lines
108 pp->bRcontrol = v->rnd;108 pp->bRcontrol = v->rnd;
109 pp->bPicSpatialResid8 = (v->panscanflag << 7) |109 pp->bPicSpatialResid8 = (v->panscanflag << 7) |
110 (v->refdist_flag << 6) |110 (v->refdist_flag << 6) |
111 (s->loop_filter << 5) |111 (v->loop_filter << 5) |
112 (v->fastuvmc << 4) |112 (v->fastuvmc << 4) |
113 (v->extended_mv << 3) |113 (v->extended_mv << 3) |
114 (v->dquant << 1) |114 (v->dquant << 1) |
@@ -121,7 +121,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx, · 6 unmodified lines
121 pp->bPicExtrapolation = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2;121 pp->bPicExtrapolation = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2;
122 pp->bPicDeblocked = ((!pp->bPicBackwardPrediction && v->overlap) << 6) |122 pp->bPicDeblocked = ((!pp->bPicBackwardPrediction && v->overlap) << 6) |
123 ((v->profile != PROFILE_ADVANCED && v->rangeredfrm) << 5) |123 ((v->profile != PROFILE_ADVANCED && v->rangeredfrm) << 5) |
124 (s->loop_filter << 1);124 (v->loop_filter << 1);
125 pp->bPicDeblockConfined = (v->postprocflag << 7) |125 pp->bPicDeblockConfined = (v->postprocflag << 7) |
126 (v->broadcast << 6) |126 (v->broadcast << 6) |
127 (v->interlace << 5) |127 (v->interlace << 5) |
libavcodec/h261enc.c+2−2
@@ -266,9 +266,9 @@ static void h261_encode_mb(MPVEncContext *const s, int16_t block[6][64], · 265 unmodified lines
266 if (!s->c.mb_intra) {266 if (!s->c.mb_intra) {
267 com->mtype++;267 com->mtype++;
268 268
269 if (mvd || s->c.loop_filter)269 if (mvd || s->loop_filter)
270 com->mtype += 3;270 com->mtype += 3;
271 if (s->c.loop_filter)271 if (s->loop_filter)
272 com->mtype += 3;272 com->mtype += 3;
273 if (cbp)273 if (cbp)
274 com->mtype++;274 com->mtype++;
libavcodec/h263dec.c+2−2
@@ -280,7 +280,7 @@ static int decode_slice(H263DecContext *const h) · 279 unmodified lines
280 const int xy = h->c.mb_x + h->c.mb_y * h->c.mb_stride;280 const int xy = h->c.mb_x + h->c.mb_y * h->c.mb_stride;
281 if (ret == SLICE_END) {281 if (ret == SLICE_END) {
282 ff_mpv_reconstruct_mb(&h->c, h->block);282 ff_mpv_reconstruct_mb(&h->c, h->block);
283 if (h->c.loop_filter)283 if (h->loop_filter)
284 ff_h263_loop_filter(&h->c);284 ff_h263_loop_filter(&h->c);
285 285
286 ff_er_add_slice(&h->c.er, h->c.resync_mb_x, h->c.resync_mb_y,286 ff_er_add_slice(&h->c.er, h->c.resync_mb_x, h->c.resync_mb_y,
@@ -313,7 +313,7 @@ static int decode_slice(H263DecContext *const h) · 26 unmodified lines
313 }313 }
314 314
315 ff_mpv_reconstruct_mb(&h->c, h->block);315 ff_mpv_reconstruct_mb(&h->c, h->block);
316 if (h->c.loop_filter)316 if (h->loop_filter)
317 ff_h263_loop_filter(&h->c);317 ff_h263_loop_filter(&h->c);
318 }318 }
319 319
libavcodec/h263dec.h+1−0
@@ -66,6 +66,7 @@ typedef struct H263DecContext { · 65 unmodified lines
66 int umvplus; ///< == H.263+ && unrestricted_mv66 int umvplus; ///< == H.263+ && unrestricted_mv
67 int h263_slice_structured;67 int h263_slice_structured;
68 int alt_inter_vlc; ///< alternative inter vlc68 int alt_inter_vlc; ///< alternative inter vlc
69 int loop_filter;
69 int modified_quant;70 int modified_quant;
70 71
71 /* MPEG-4 specific */72 /* MPEG-4 specific */
libavcodec/intelh263dec.c+1−1
@@ -82,7 +82,7 @@ int ff_intel_h263_decode_picture_header(H263DecContext *const h) · 81 unmodified lines
82 }82 }
83 if (get_bits(&h->gb, 2))83 if (get_bits(&h->gb, 2))
84 av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");84 av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
85 h->c.loop_filter = get_bits1(&h->gb) * !h->c.avctx->lowres;85 h->loop_filter = get_bits1(&h->gb) * !h->c.avctx->lowres;
86 if (get_bits1(&h->gb))86 if (get_bits1(&h->gb))
87 av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");87 av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
88 if (get_bits1(&h->gb))88 if (get_bits1(&h->gb))
libavcodec/ituh263dec.c+4−4
@@ -90,7 +90,7 @@ void ff_h263_show_pict_info(H263DecContext *const h, int h263_plus) · 89 unmodified lines
90 h->c.h263_aic ? " AIC" : "",90 h->c.h263_aic ? " AIC" : "",
91 h->alt_inter_vlc ? " AIV" : "",91 h->alt_inter_vlc ? " AIV" : "",
92 h->modified_quant ? " MQ" : "",92 h->modified_quant ? " MQ" : "",
93 h->c.loop_filter ? " LOOP" : "",93 h->loop_filter ? " LOOP" : "",
94 h->h263_slice_structured ? " SS" : "",94 h->h263_slice_structured ? " SS" : "",
95 h->c.avctx->framerate.num, h->c.avctx->framerate.den);95 h->c.avctx->framerate.num, h->c.avctx->framerate.den);
96 }96 }
@@ -798,7 +798,7 @@ int ff_h263_decode_mb(H263DecContext *const h) · 701 unmodified lines
798 h->c.cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;798 h->c.cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
799 h->c.mv[0][0][0] = 0;799 h->c.mv[0][0][0] = 0;
800 h->c.mv[0][0][1] = 0;800 h->c.mv[0][0][1] = 0;
801 h->c.mb_skipped = !(h->c.obmc | h->c.loop_filter);801 h->c.mb_skipped = !(h->c.obmc | h->loop_filter);
802 goto end;802 goto end;
803 }803 }
804 cbpc = get_vlc2(&h->gb, ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 2);804 cbpc = get_vlc2(&h->gb, ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 2);
@@ -1181,9 +1181,9 @@ int ff_h263_decode_picture_header(H263DecContext *const h) · 376 unmodified lines
1181 }1181 }
1182 h->c.obmc = get_bits1(&h->gb); /* Advanced prediction mode */1182 h->c.obmc = get_bits1(&h->gb); /* Advanced prediction mode */
1183 h->c.h263_aic = get_bits1(&h->gb); /* Advanced Intra Coding (AIC) */1183 h->c.h263_aic = get_bits1(&h->gb); /* Advanced Intra Coding (AIC) */
1184 h->c.loop_filter = get_bits1(&h->gb);1184 h->loop_filter = get_bits1(&h->gb);
1185 if (h->c.avctx->lowres)1185 if (h->c.avctx->lowres)
1186 h->c.loop_filter = 0;1186 h->loop_filter = 0;
1187 1187
1188 h->h263_slice_structured = get_bits1(&h->gb);1188 h->h263_slice_structured = get_bits1(&h->gb);
1189 if (get_bits1(&h->gb) != 0) {1189 if (get_bits1(&h->gb) != 0) {
libavcodec/ituh263enc.c+1−1
@@ -285,7 +285,7 @@ static int h263_encode_picture_header(MPVMainEncContext *const m) · 284 unmodified lines
285 put_bits(&s->pb,1,0); /* SAC: off */285 put_bits(&s->pb,1,0); /* SAC: off */
286 put_bits(&s->pb,1,s->c.obmc); /* Advanced Prediction Mode */286 put_bits(&s->pb,1,s->c.obmc); /* Advanced Prediction Mode */
287 put_bits(&s->pb,1,s->c.h263_aic); /* Advanced Intra Coding */287 put_bits(&s->pb,1,s->c.h263_aic); /* Advanced Intra Coding */
288 put_bits(&s->pb,1,s->c.loop_filter); /* Deblocking Filter */288 put_bits(&s->pb,1,s->loop_filter); /* Deblocking Filter */
289 put_bits(&s->pb,1,s->h263_slice_structured); /* Slice Structured */289 put_bits(&s->pb,1,s->h263_slice_structured); /* Slice Structured */
290 put_bits(&s->pb,1,0); /* Reference Picture Selection: off */290 put_bits(&s->pb,1,0); /* Reference Picture Selection: off */
291 put_bits(&s->pb,1,0); /* Independent Segment Decoding: off */291 put_bits(&s->pb,1,0); /* Independent Segment Decoding: off */
libavcodec/mpegvideo.h+0−1
@@ -215,7 +215,6 @@ typedef struct MpegEncContext { · 214 unmodified lines
215 215
216 /* H.263+ specific */216 /* H.263+ specific */
217 int h263_aic_dir; ///< AIC direction: 0 = left, 1 = top217 int h263_aic_dir; ///< AIC direction: 0 = left, 1 = top
218 int loop_filter;
219 218
220 /* MPEG-4 specific */219 /* MPEG-4 specific */
221 int studio_profile;220 int studio_profile;
libavcodec/mpegvideo_enc.c+5−5
@@ -654,7 +654,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 653 unmodified lines
654 (s->mpv_flags & FF_MPV_FLAG_QP_RD)) &&654 (s->mpv_flags & FF_MPV_FLAG_QP_RD)) &&
655 !m->fixed_qscale;655 !m->fixed_qscale;
656 656
657 s->c.loop_filter = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);657 s->loop_filter = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);
658 658
659 if (avctx->rc_max_rate && !avctx->rc_buffer_size) {659 if (avctx->rc_max_rate && !avctx->rc_buffer_size) {
660 switch(avctx->codec_id) {660 switch(avctx->codec_id) {
@@ -925,8 +925,8 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 264 unmodified lines
925 /* Fx */925 /* Fx */
926 s->c.h263_aic = (avctx->flags & AV_CODEC_FLAG_AC_PRED) ? 1 : 0;926 s->c.h263_aic = (avctx->flags & AV_CODEC_FLAG_AC_PRED) ? 1 : 0;
927 s->modified_quant = s->c.h263_aic;927 s->modified_quant = s->c.h263_aic;
928 s->c.loop_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0;928 s->loop_filter = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);
929 s->me.unrestricted_mv = s->c.obmc || s->c.loop_filter || s->umvplus;929 s->me.unrestricted_mv = s->c.obmc || s->loop_filter || s->umvplus;
930 s->flipflop_rounding = 1;930 s->flipflop_rounding = 1;
931 931
932 /* /Fx */932 /* /Fx */
@@ -959,7 +959,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) · 26 unmodified lines
959 // Set here to force allocation of dc_val;959 // Set here to force allocation of dc_val;
960 // will be set later on a per-frame basis.960 // will be set later on a per-frame basis.
961 s->c.h263_aic = 1;961 s->c.h263_aic = 1;
962 s->c.loop_filter = 1;962 s->loop_filter = 1;
963 s->me.unrestricted_mv = 0;963 s->me.unrestricted_mv = 0;
964 break;964 break;
965#endif965#endif
@@ -3603,7 +3603,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 2637 unmodified lines
3603 s, s->new_pic->data[2] + s->c.mb_x*8 + s->c.mb_y*s->c.uvlinesize*chr_h,3603 s, s->new_pic->data[2] + s->c.mb_x*8 + s->c.mb_y*s->c.uvlinesize*chr_h,
3604 s->c.dest[2], w>>1, h>>s->c.chroma_y_shift, s->c.uvlinesize);3604 s->c.dest[2], w>>1, h>>s->c.chroma_y_shift, s->c.uvlinesize);
3605 }3605 }
3606 if (s->c.loop_filter) {3606 if (s->loop_filter) {
3607 if (CONFIG_H263_ENCODER && s->c.out_format == FMT_H263)3607 if (CONFIG_H263_ENCODER && s->c.out_format == FMT_H263)
3608 ff_h263_loop_filter(&s->c);3608 ff_h263_loop_filter(&s->c);
3609 }3609 }
libavcodec/mpegvideoenc.h+1−0
@@ -152,6 +152,7 @@ typedef struct MPVEncContext { · 151 unmodified lines
152 int h263_slice_structured;152 int h263_slice_structured;
153 int alt_inter_vlc; ///< alternative inter vlc153 int alt_inter_vlc; ///< alternative inter vlc
154 int modified_quant;154 int modified_quant;
155 int loop_filter;
155 156
156 /* MJPEG specific */157 /* MJPEG specific */
157 struct MJpegContext *mjpeg_ctx;158 struct MJpegContext *mjpeg_ctx;
libavcodec/mss2.c+1−1
@@ -390,7 +390,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, · 389 unmodified lines
390 if ((ret = init_get_bits8(&v->gb, buf, buf_size)) < 0)390 if ((ret = init_get_bits8(&v->gb, buf, buf_size)) < 0)
391 return ret;391 return ret;
392 392
393 s->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;393 v->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;
394 394
395 if (ff_vc1_parse_frame_header(v, &v->gb) < 0) {395 if (ff_vc1_parse_frame_header(v, &v->gb) < 0) {
396 av_log(v->s.avctx, AV_LOG_ERROR, "header error\n");396 av_log(v->s.avctx, AV_LOG_ERROR, "header error\n");
libavcodec/nvdec_vc1.c+1−1
@@ -94,7 +94,7 @@ static int nvdec_vc1_start_frame(AVCodecContext *avctx, · 93 unmodified lines
94 .extended_mv = v->extended_mv,94 .extended_mv = v->extended_mv,
95 .dquant = v->dquant,95 .dquant = v->dquant,
96 .vstransform = v->vstransform,96 .vstransform = v->vstransform,
97 .loopfilter = v->s.loop_filter,97 .loopfilter = v->loop_filter,
98 .fastuvmc = v->fastuvmc,98 .fastuvmc = v->fastuvmc,
99 .overlap = v->overlap,99 .overlap = v->overlap,
100 .quantizer = v->quantizer_mode,100 .quantizer = v->quantizer_mode,
libavcodec/rv10.c+3−3
@@ -186,7 +186,7 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) · 185 unmodified lines
186 }186 }
187 187
188 if (RV_GET_MINOR_VER(rv->sub_id) >= 2)188 if (RV_GET_MINOR_VER(rv->sub_id) >= 2)
189 h->c.loop_filter = get_bits1(&h->gb) && !h->c.avctx->lowres;189 h->loop_filter = get_bits1(&h->gb) && !h->c.avctx->lowres;
190 190
191 if (RV_GET_MINOR_VER(rv->sub_id) <= 1)191 if (RV_GET_MINOR_VER(rv->sub_id) <= 1)
192 seq = get_bits(&h->gb, 8) << 7;192 seq = get_bits(&h->gb, 8) << 7;
@@ -292,7 +292,7 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) · 99 unmodified lines
292 h->c.c_dc_scale_table = ff_mpeg1_dc_scale_table;292 h->c.c_dc_scale_table = ff_mpeg1_dc_scale_table;
293 }293 }
294 if (!h->c.avctx->lowres)294 if (!h->c.avctx->lowres)
295 h->c.loop_filter = 1;295 h->loop_filter = 1;
296 296
297 if (h->c.avctx->debug & FF_DEBUG_PICT_INFO) {297 if (h->c.avctx->debug & FF_DEBUG_PICT_INFO) {
298 av_log(h->c.avctx, AV_LOG_INFO,298 av_log(h->c.avctx, AV_LOG_INFO,
@@ -517,7 +517,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf, · 218 unmodified lines
517 if (h->c.pict_type != AV_PICTURE_TYPE_B)517 if (h->c.pict_type != AV_PICTURE_TYPE_B)
518 ff_h263_update_motion_val(&h->c);518 ff_h263_update_motion_val(&h->c);
519 ff_mpv_reconstruct_mb(&h->c, h->block);519 ff_mpv_reconstruct_mb(&h->c, h->block);
520 if (h->c.loop_filter)520 if (h->loop_filter)
521 ff_h263_loop_filter(&h->c);521 ff_h263_loop_filter(&h->c);
522 522
523 if (++h->c.mb_x == h->c.mb_width) {523 if (++h->c.mb_x == h->c.mb_width) {
libavcodec/rv20enc.c+1−1
@@ -55,7 +55,7 @@ int ff_rv20_encode_picture_header(MPVMainEncContext *const m) · 54 unmodified lines
55 av_assert1(!s->alt_inter_vlc);55 av_assert1(!s->alt_inter_vlc);
56 av_assert1(!s->umvplus);56 av_assert1(!s->umvplus);
57 av_assert1(s->modified_quant == 1);57 av_assert1(s->modified_quant == 1);
58 av_assert1(s->c.loop_filter == 1);58 av_assert1(s->loop_filter == 1);
59 59
60 s->c.h263_aic = s->c.pict_type == AV_PICTURE_TYPE_I;60 s->c.h263_aic = s->c.pict_type == AV_PICTURE_TYPE_I;
61 if (s->c.h263_aic) {61 if (s->c.h263_aic) {
libavcodec/vaapi_vc1.c+1−1
@@ -285,7 +285,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, · 284 unmodified lines
285 .broken_link = v->broken_link,285 .broken_link = v->broken_link,
286 .closed_entry = v->closed_entry,286 .closed_entry = v->closed_entry,
287 .panscan_flag = v->panscanflag,287 .panscan_flag = v->panscanflag,
288 .loopfilter = s->loop_filter,288 .loopfilter = v->loop_filter,
289 },289 },
290 .conditional_overlap_flag = v->condover,290 .conditional_overlap_flag = v->condover,
291 .fast_uvmc_flag = v->fastuvmc,291 .fast_uvmc_flag = v->fastuvmc,
libavcodec/vc1.c+8−8
@@ -300,13 +300,13 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo · 299 unmodified lines
300 v->frmrtq_postproc = get_bits(gb, 3); //common300 v->frmrtq_postproc = get_bits(gb, 3); //common
301 // (bitrate-32kbps)/64kbps301 // (bitrate-32kbps)/64kbps
302 v->bitrtq_postproc = get_bits(gb, 5); //common302 v->bitrtq_postproc = get_bits(gb, 5); //common
303 v->s.loop_filter = get_bits1(gb); //common303 v->loop_filter = get_bits1(gb); //common
304 if (v->s.loop_filter == 1 && v->profile == PROFILE_SIMPLE) {304 if (v->loop_filter == 1 && v->profile == PROFILE_SIMPLE) {
305 av_log(avctx, AV_LOG_ERROR,305 av_log(avctx, AV_LOG_ERROR,
306 "LOOPFILTER shall not be enabled in Simple Profile\n");306 "LOOPFILTER shall not be enabled in Simple Profile\n");
307 }307 }
308 if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)308 if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)
309 v->s.loop_filter = 0;309 v->loop_filter = 0;
310 310
311 v->res_x8 = get_bits1(gb); //reserved311 v->res_x8 = get_bits1(gb); //reserved
312 v->multires = get_bits1(gb);312 v->multires = get_bits1(gb);
@@ -376,7 +376,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo · 63 unmodified lines
376 "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"376 "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"
377 "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",377 "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",
378 v->profile, v->frmrtq_postproc, v->bitrtq_postproc,378 v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
379 v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,379 v->loop_filter, v->multires, v->fastuvmc, v->extended_mv,
380 v->rangered, v->vstransform, v->overlap, v->resync_marker,380 v->rangered, v->vstransform, v->overlap, v->resync_marker,
381 v->dquant, v->quantizer_mode, avctx->max_b_frames);381 v->dquant, v->quantizer_mode, avctx->max_b_frames);
382 return 0;382 return 0;
@@ -415,7 +415,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) · 32 unmodified lines
415 "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n"415 "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n"
416 "TFCTRflag=%i, FINTERPflag=%i\n",416 "TFCTRflag=%i, FINTERPflag=%i\n",
417 v->level, v->frmrtq_postproc, v->bitrtq_postproc,417 v->level, v->frmrtq_postproc, v->bitrtq_postproc,
418 v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace,418 v->loop_filter, v->chromaformat, v->broadcast, v->interlace,
419 v->tfcntrflag, v->finterpflag);419 v->tfcntrflag, v->finterpflag);
420 420
421 v->psf = get_bits1(gb);421 v->psf = get_bits1(gb);
@@ -501,9 +501,9 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex · 79 unmodified lines
501 v->closed_entry = get_bits1(gb);501 v->closed_entry = get_bits1(gb);
502 v->panscanflag = get_bits1(gb);502 v->panscanflag = get_bits1(gb);
503 v->refdist_flag = get_bits1(gb);503 v->refdist_flag = get_bits1(gb);
504 v->s.loop_filter = get_bits1(gb);504 v->loop_filter = get_bits1(gb);
505 if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)505 if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)
506 v->s.loop_filter = 0;506 v->loop_filter = 0;
507 v->fastuvmc = get_bits1(gb);507 v->fastuvmc = get_bits1(gb);
508 v->extended_mv = get_bits1(gb);508 v->extended_mv = get_bits1(gb);
509 v->dquant = get_bits(gb, 2);509 v->dquant = get_bits(gb, 2);
@@ -544,7 +544,7 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex · 34 unmodified lines
544 "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n"544 "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n"
545 "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n"545 "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n"
546 "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n",546 "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n",
547 v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter,547 v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->loop_filter,
548 v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode);548 v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode);
549 549
550 return 0;550 return 0;
libavcodec/vc1.h+1−0
@@ -220,6 +220,7 @@ typedef struct VC1Context{ · 219 unmodified lines
220 int profile; ///< 2 bits, Profile220 int profile; ///< 2 bits, Profile
221 int frmrtq_postproc; ///< 3 bits,221 int frmrtq_postproc; ///< 3 bits,
222 int bitrtq_postproc; ///< 5 bits, quantized framerate-based postprocessing strength222 int bitrtq_postproc; ///< 5 bits, quantized framerate-based postprocessing strength
223 int loop_filter;
223 int max_coded_width, max_coded_height;224 int max_coded_width, max_coded_height;
224 int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple)225 int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple)
225 int extended_mv; ///< Ext MV in P/B (not in Simple)226 int extended_mv; ///< Ext MV in P/B (not in Simple)
libavcodec/vc1_block.c+7−7
@@ -2595,7 +2595,7 @@ static void vc1_decode_i_blocks(VC1Context *v) · 2594 unmodified lines
2595 vc1_put_blocks_clamped(v, 0);2595 vc1_put_blocks_clamped(v, 0);
2596 }2596 }
2597 2597
2598 if (v->s.loop_filter)2598 if (v->loop_filter)
2599 ff_vc1_i_loop_filter(v);2599 ff_vc1_i_loop_filter(v);
2600 2600
2601 if (get_bits_left(&v->gb) < 0) {2601 if (get_bits_left(&v->gb) < 0) {
@@ -2733,7 +2733,7 @@ static int vc1_decode_i_blocks_adv(VC1Context *v) · 131 unmodified lines
2733 if (v->overlap && (v->pq >= 9 || v->condover != CONDOVER_NONE))2733 if (v->overlap && (v->pq >= 9 || v->condover != CONDOVER_NONE))
2734 ff_vc1_i_overlap_filter(v);2734 ff_vc1_i_overlap_filter(v);
2735 vc1_put_blocks_clamped(v, 1);2735 vc1_put_blocks_clamped(v, 1);
2736 if (v->s.loop_filter)2736 if (v->loop_filter)
2737 ff_vc1_i_loop_filter(v);2737 ff_vc1_i_loop_filter(v);
2738 2738
2739 if (get_bits_left(gb) < 0) {2739 if (get_bits_left(gb) < 0) {
@@ -2787,7 +2787,7 @@ static void vc1_decode_p_blocks(VC1Context *v) · 47 unmodified lines
2787 break;2787 break;
2788 }2788 }
2789 2789
2790 apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);2790 apply_loop_filter = v->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);
2791 s->first_slice_line = 1;2791 s->first_slice_line = 1;
2792 memset(v->cbp_base, 0, sizeof(v->cbp_base[0]) * 3 * s->mb_stride);2792 memset(v->cbp_base, 0, sizeof(v->cbp_base[0]) * 3 * s->mb_stride);
2793 for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {2793 for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {
@@ -2889,15 +2889,15 @@ static void vc1_decode_b_blocks(VC1Context *v) · 95 unmodified lines
2889 2889
2890 if (v->fcm == ILACE_FIELD) {2890 if (v->fcm == ILACE_FIELD) {
2891 vc1_decode_b_mb_intfi(v);2891 vc1_decode_b_mb_intfi(v);
2892 if (v->s.loop_filter)2892 if (v->loop_filter)
2893 ff_vc1_b_intfi_loop_filter(v);2893 ff_vc1_b_intfi_loop_filter(v);
2894 } else if (v->fcm == ILACE_FRAME) {2894 } else if (v->fcm == ILACE_FRAME) {
2895 vc1_decode_b_mb_intfr(v);2895 vc1_decode_b_mb_intfr(v);
2896 if (v->s.loop_filter)2896 if (v->loop_filter)
2897 ff_vc1_p_intfr_loop_filter(v);2897 ff_vc1_p_intfr_loop_filter(v);
2898 } else {2898 } else {
2899 vc1_decode_b_mb(v);2899 vc1_decode_b_mb(v);
2900 if (v->s.loop_filter)2900 if (v->loop_filter)
2901 ff_vc1_i_loop_filter(v);2901 ff_vc1_i_loop_filter(v);
2902 }2902 }
2903 if (get_bits_left(&v->gb) < 0 || get_bits_count(&v->gb) < 0) {2903 if (get_bits_left(&v->gb) < 0 || get_bits_count(&v->gb) < 0) {
@@ -2951,7 +2951,7 @@ void ff_vc1_decode_blocks(VC1Context *v) · 47 unmodified lines
2951 ff_intrax8_decode_picture(&v->x8, v->s.cur_pic.ptr,2951 ff_intrax8_decode_picture(&v->x8, v->s.cur_pic.ptr,
2952 &v->gb, &v->s.mb_x, &v->s.mb_y,2952 &v->gb, &v->s.mb_x, &v->s.mb_y,
2953 2 * v->pq + v->halfpq, v->pq * !v->pquantizer,2953 2 * v->pq + v->halfpq, v->pq * !v->pquantizer,
2954 v->s.loop_filter, v->s.low_delay);2954 v->loop_filter, v->s.low_delay);
2955 2955
2956 ff_er_add_slice(&v->s.er, 0, 0,2956 ff_er_add_slice(&v->s.er, 0, 0,
2957 (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,2957 (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
libavcodec/vdpau_vc1.c+1−1
@@ -83,7 +83,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, · 82 unmodified lines
83 info->extended_dmv = v->extended_dmv;83 info->extended_dmv = v->extended_dmv;
84 info->overlap = v->overlap;84 info->overlap = v->overlap;
85 info->vstransform = v->vstransform;85 info->vstransform = v->vstransform;
86 info->loopfilter = v->s.loop_filter;86 info->loopfilter = v->loop_filter;
87 info->fastuvmc = v->fastuvmc;87 info->fastuvmc = v->fastuvmc;
88 info->range_mapy_flag = v->range_mapy_flag;88 info->range_mapy_flag = v->range_mapy_flag;
89 info->range_mapy = v->range_mapy;89 info->range_mapy = v->range_mapy;
libavcodec/wmv2dec.c+3−3
@@ -178,7 +178,7 @@ static int decode_ext_header(WMV2DecContext *w) · 177 unmodified lines
178 fps = get_bits(&gb, 5);178 fps = get_bits(&gb, 5);
179 w->ms.bit_rate = get_bits(&gb, 11) * 1024;179 w->ms.bit_rate = get_bits(&gb, 11) * 1024;
180 w->mspel_bit = get_bits1(&gb);180 w->mspel_bit = get_bits1(&gb);
181 h->c.loop_filter = get_bits1(&gb);181 h->loop_filter = get_bits1(&gb);
182 w->abt_flag = get_bits1(&gb);182 w->abt_flag = get_bits1(&gb);
183 w->j_type_bit = get_bits1(&gb);183 w->j_type_bit = get_bits1(&gb);
184 w->top_left_mv_flag = get_bits1(&gb);184 w->top_left_mv_flag = get_bits1(&gb);
@@ -196,7 +196,7 @@ static int decode_ext_header(WMV2DecContext *w) · 11 unmodified lines
196 "tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, "196 "tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, "
197 "slices:%d\n",197 "slices:%d\n",
198 fps, w->ms.bit_rate, w->mspel_bit, w->abt_flag, w->j_type_bit,198 fps, w->ms.bit_rate, w->mspel_bit, w->abt_flag, w->j_type_bit,
199 w->top_left_mv_flag, w->per_mb_rl_bit, code, h->c.loop_filter,199 w->top_left_mv_flag, w->per_mb_rl_bit, code, h->loop_filter,
200 code);200 code);
201 return 0;201 return 0;
202}202}
@@ -333,7 +333,7 @@ int ff_wmv2_decode_secondary_picture_header(H263DecContext *const h) · 130 unmodified lines
333 ff_intrax8_decode_picture(&w->x8, h->c.cur_pic.ptr,333 ff_intrax8_decode_picture(&w->x8, h->c.cur_pic.ptr,
334 &h->gb, &h->c.mb_x, &h->c.mb_y,334 &h->gb, &h->c.mb_x, &h->c.mb_y,
335 2 * h->c.qscale, (h->c.qscale - 1) | 1,335 2 * h->c.qscale, (h->c.qscale - 1) | 1,
336 h->c.loop_filter, h->c.low_delay);336 h->loop_filter, h->c.low_delay);
337 337
338 ff_er_add_slice(&h->c.er, 0, 0,338 ff_er_add_slice(&h->c.er, 0, 0,
339 (h->c.mb_x >> 1) - 1, (h->c.mb_y >> 1) - 1,339 (h->c.mb_x >> 1) - 1, (h->c.mb_y >> 1) - 1,
libavcodec/wmv2enc.c+1−1
@@ -59,7 +59,7 @@ static int encode_ext_header(WMV2EncContext *w) · 58 unmodified lines
59 put_bits(&pb, 11, FFMIN(w->msmpeg4.m.bit_rate / 1024, 2047));59 put_bits(&pb, 11, FFMIN(w->msmpeg4.m.bit_rate / 1024, 2047));
60 60
61 put_bits(&pb, 1, w->mspel_bit = 1);61 put_bits(&pb, 1, w->mspel_bit = 1);
62 put_bits(&pb, 1, s->c.loop_filter);62 put_bits(&pb, 1, s->loop_filter);
63 put_bits(&pb, 1, w->abt_flag = 1);63 put_bits(&pb, 1, w->abt_flag = 1);
64 put_bits(&pb, 1, w->j_type_bit = 1);64 put_bits(&pb, 1, w->j_type_bit = 1);
65 put_bits(&pb, 1, w->top_left_mv_flag = 0);65 put_bits(&pb, 1, w->top_left_mv_flag = 0);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t