Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5e8d2e33
Commit
5e8d2e33
authored
Jun 20, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: deprecate AVStream.quality.
AVStream is no place for it and it's unused outside of ffmpeg anyway.
parent
df64da3b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
11 deletions
+15
-11
ffmpeg.c
ffmpeg.c
+8
-7
avformat.h
libavformat/avformat.h
+3
-1
ffmdec.c
libavformat/ffmdec.c
+0
-1
ffmenc.c
libavformat/ffmenc.c
+0
-1
version.h
libavformat/version.h
+3
-0
ffm
tests/ref/lavf/ffm
+1
-1
No files found.
ffmpeg.c
View file @
5e8d2e33
...
...
@@ -1123,7 +1123,7 @@ static void do_video_out(AVFormatContext *s,
AVOutputStream
*
ost
,
AVInputStream
*
ist
,
AVFrame
*
in_picture
,
int
*
frame_size
)
int
*
frame_size
,
float
quality
)
{
int
nb_frames
,
i
,
ret
,
resample_changed
;
AVFrame
*
final_picture
,
*
formatted_picture
;
...
...
@@ -1245,7 +1245,7 @@ static void do_video_out(AVFormatContext *s,
/* handles sameq here. This is not correct because it may
not be a global option */
big_picture
.
quality
=
same_quality
?
ist
->
st
->
quality
:
ost
->
st
->
quality
;
big_picture
.
quality
=
quality
;
if
(
!
me_threshold
)
big_picture
.
pict_type
=
0
;
// big_picture.pts = AV_NOPTS_VALUE;
...
...
@@ -1480,6 +1480,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
#if CONFIG_AVFILTER
int
frame_available
;
#endif
float
quality
;
AVPacket
avpkt
;
int
bps
=
av_get_bytes_per_sample
(
ist
->
st
->
codec
->
sample_fmt
);
...
...
@@ -1560,7 +1561,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
ret
=
avcodec_decode_video2
(
ist
->
st
->
codec
,
&
picture
,
&
got_output
,
&
avpkt
);
ist
->
st
->
quality
=
picture
.
quality
;
quality
=
same_quality
?
picture
.
quality
:
0
;
if
(
ret
<
0
)
goto
fail_decode
;
if
(
!
got_output
)
{
...
...
@@ -1685,7 +1686,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
if
(
ost
->
picref
->
video
&&
!
ost
->
frame_aspect_ratio
)
ost
->
st
->
codec
->
sample_aspect_ratio
=
ost
->
picref
->
video
->
pixel_aspect
;
#endif
do_video_out
(
os
,
ost
,
ist
,
&
picture
,
&
frame_size
);
do_video_out
(
os
,
ost
,
ist
,
&
picture
,
&
frame_size
,
same_quality
?
quality
:
ost
->
st
->
codec
->
global_quality
);
if
(
vstats_filename
&&
frame_size
)
do_video_stats
(
os
,
ost
,
frame_size
);
break
;
...
...
@@ -3495,8 +3497,7 @@ static void new_video_stream(AVFormatContext *oc, int file_idx)
video_enc
->
gop_size
=
0
;
if
(
video_qscale
||
same_quality
)
{
video_enc
->
flags
|=
CODEC_FLAG_QSCALE
;
video_enc
->
global_quality
=
st
->
quality
=
FF_QP2LAMBDA
*
video_qscale
;
video_enc
->
global_quality
=
FF_QP2LAMBDA
*
video_qscale
;
}
if
(
intra_matrix
)
...
...
@@ -3614,7 +3615,7 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx)
if
(
audio_qscale
>
QSCALE_NONE
)
{
audio_enc
->
flags
|=
CODEC_FLAG_QSCALE
;
audio_enc
->
global_quality
=
st
->
quality
=
FF_QP2LAMBDA
*
audio_qscale
;
audio_enc
->
global_quality
=
FF_QP2LAMBDA
*
audio_qscale
;
}
if
(
audio_channels
)
audio_enc
->
channels
=
audio_channels
;
...
...
libavformat/avformat.h
View file @
5e8d2e33
...
...
@@ -523,12 +523,14 @@ typedef struct AVStream {
int
stream_copy
;
/**< If set, just copy stream. */
enum
AVDiscard
discard
;
///< Selects which packets can be discarded at will and do not need to be demuxed.
#if FF_API_AVSTREAM_QUALITY
//FIXME move stuff to a flags field?
/**
* Quality, as it has been removed from AVCodecContext and put in AVVideoFrame.
* MN: dunno if that is the right place for it
*/
float
quality
;
attribute_deprecated
float
quality
;
#endif
/**
* Decoding: pts of the first frame of the stream, in stream time base.
...
...
libavformat/ffmdec.c
View file @
5e8d2e33
...
...
@@ -301,7 +301,6 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
codec
->
codec_id
=
avio_rb32
(
pb
);
codec
->
codec_type
=
avio_r8
(
pb
);
/* codec_type */
codec
->
bit_rate
=
avio_rb32
(
pb
);
st
->
quality
=
avio_rb32
(
pb
);
codec
->
flags
=
avio_rb32
(
pb
);
codec
->
flags2
=
avio_rb32
(
pb
);
codec
->
debug
=
avio_rb32
(
pb
);
...
...
libavformat/ffmenc.c
View file @
5e8d2e33
...
...
@@ -114,7 +114,6 @@ static int ffm_write_header(AVFormatContext *s)
avio_wb32
(
pb
,
codec
->
codec_id
);
avio_w8
(
pb
,
codec
->
codec_type
);
avio_wb32
(
pb
,
codec
->
bit_rate
);
avio_wb32
(
pb
,
st
->
quality
);
avio_wb32
(
pb
,
codec
->
flags
);
avio_wb32
(
pb
,
codec
->
flags2
);
avio_wb32
(
pb
,
codec
->
debug
);
...
...
libavformat/version.h
View file @
5e8d2e33
...
...
@@ -74,5 +74,8 @@
#ifndef FF_API_FLAG_RTP_HINT
#define FF_API_FLAG_RTP_HINT (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#ifndef FF_API_AVSTREAM_QUALITY
#define FF_API_AVSTREAM_QUALITY (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#endif
/* AVFORMAT_VERSION_H */
tests/ref/lavf/ffm
View file @
5e8d2e33
b6acf782a38d313153b68c4ca204fc90
*./tests/data/lavf/lavf.ffm
f9bee27ea1b6b83a06b5f9efb0a4ac1f
*./tests/data/lavf/lavf.ffm
376832 ./tests/data/lavf/lavf.ffm
./tests/data/lavf/lavf.ffm CRC=0xf361ed74
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment