* [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate
@ 2023-07-04 17:26 Anton Khirnov
2023-07-04 17:26 ` [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate Anton Khirnov
2023-07-06 20:32 ` [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Paul B Mahol
0 siblings, 2 replies; 4+ messages in thread
From: Anton Khirnov @ 2023-07-04 17:26 UTC (permalink / raw)
To: ffmpeg-devel
Changes the result of fate-mxf-probe-dv25, where the bitrate is now
exported.
Also changes the result of fate-bsf-dv-error-marker, where the exported
bitrate is now different. Note that the codec layer bitrate does not
match the container bitrate, because container timing is 25fps, while
the DV profile is 50.
---
libavcodec/dvdec.c | 3 +++
tests/fate/dvvideo.mak | 2 +-
tests/ref/fate/mxf-probe-dv25 | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 750e25a4af..c57578a208 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -650,6 +650,9 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
frame->pict_type = AV_PICTURE_TYPE_I;
avctx->pix_fmt = s->sys->pix_fmt;
avctx->framerate = av_inv_q(s->sys->time_base);
+ avctx->bit_rate = av_rescale_q(s->sys->frame_size,
+ (AVRational) { 8, 1 },
+ s->sys->time_base);
ret = ff_set_dimensions(avctx, s->sys->width, s->sys->height);
if (ret < 0)
diff --git a/tests/fate/dvvideo.mak b/tests/fate/dvvideo.mak
index 24e50ca357..33686d7762 100644
--- a/tests/fate/dvvideo.mak
+++ b/tests/fate/dvvideo.mak
@@ -1,7 +1,7 @@
fate-bsf-dv-error-marker: CMD = md5 -i $(TARGET_SAMPLES)/dv/dvcprohd_720p50.mov -flags +bitexact -fflags +bitexact -c:v copy -bsf noise=100,dv_error_marker=color=blue -f avi
fate-bsf-dv-error-marker: CMP = oneline
-fate-bsf-dv-error-marker: REF = 4e884d3e8045299d0d45ec920fa58a44
+fate-bsf-dv-error-marker: REF = 3190a334b1ceef2d9fd050a1590da7c6
FATE_DVVIDEO-$(call ALLYES, MOV_DEMUXER DV_ERROR_MARKER_BSF NOISE_BSF AVI_MUXER) += fate-bsf-dv-error-marker
FATE_SAMPLES_FFMPEG += $(FATE_DVVIDEO-yes)
diff --git a/tests/ref/fate/mxf-probe-dv25 b/tests/ref/fate/mxf-probe-dv25
index 8b12a17838..f89357e191 100644
--- a/tests/ref/fate/mxf-probe-dv25
+++ b/tests/ref/fate/mxf-probe-dv25
@@ -31,7 +31,7 @@ start_pts=0
start_time=0.000000
duration_ts=25
duration=1.000000
-bit_rate=N/A
+bit_rate=28800000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=N/A
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate
2023-07-04 17:26 [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Anton Khirnov
@ 2023-07-04 17:26 ` Anton Khirnov
2023-07-06 20:33 ` Paul B Mahol
2023-07-06 20:32 ` [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Paul B Mahol
1 sibling, 1 reply; 4+ messages in thread
From: Anton Khirnov @ 2023-07-04 17:26 UTC (permalink / raw)
To: ffmpeg-devel
A real value is determined from the bytestream.
---
libavformat/dv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavformat/dv.c b/libavformat/dv.c
index d01ecedc62..6df93fe416 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -358,7 +358,6 @@ static int dv_init_demux(AVFormatContext *s, DVDemuxContext *c)
c->fctx = s;
c->vst->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
c->vst->codecpar->codec_id = AV_CODEC_ID_DVVIDEO;
- c->vst->codecpar->bit_rate = 25000000;
c->vst->start_time = 0;
avpriv_set_pts_info(c->vst, 64, 1, DV_TIMESCALE_VIDEO);
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate
2023-07-04 17:26 [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Anton Khirnov
2023-07-04 17:26 ` [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate Anton Khirnov
@ 2023-07-06 20:32 ` Paul B Mahol
1 sibling, 0 replies; 4+ messages in thread
From: Paul B Mahol @ 2023-07-06 20:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
LGTM
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate
2023-07-04 17:26 ` [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate Anton Khirnov
@ 2023-07-06 20:33 ` Paul B Mahol
0 siblings, 0 replies; 4+ messages in thread
From: Paul B Mahol @ 2023-07-06 20:33 UTC (permalink / raw)
To: FFmpeg development discussions and patches
LGTM
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-06 20:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 17:26 [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Anton Khirnov
2023-07-04 17:26 ` [FFmpeg-devel] [PATCH 2/2] lavf/dv: stop setting a random video bitrate Anton Khirnov
2023-07-06 20:33 ` Paul B Mahol
2023-07-06 20:32 ` [FFmpeg-devel] [PATCH 1/2] lavc/dvdec: export bitrate Paul B Mahol
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git