Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c52f5d66
Commit
c52f5d66
authored
Dec 23, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skiprd
Originally committed as revision 7365 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
919cb873
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
1 deletion
+37
-1
avcodec.h
libavcodec/avcodec.h
+1
-0
mpegvideo.c
libavcodec/mpegvideo.c
+34
-1
mpegvideo.h
libavcodec/mpegvideo.h
+1
-0
utils.c
libavcodec/utils.c
+1
-0
No files found.
libavcodec/avcodec.h
View file @
c52f5d66
...
@@ -374,6 +374,7 @@ typedef struct RcOverride{
...
@@ -374,6 +374,7 @@ typedef struct RcOverride{
#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< use MPEG-2 intra VLC table
#define CODEC_FLAG2_INTRA_VLC 0x00000800 ///< use MPEG-2 intra VLC table
#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< only do ME/MC (I frames -> ref, P frame -> ME+MC)
#define CODEC_FLAG2_MEMC_ONLY 0x00001000 ///< only do ME/MC (I frames -> ref, P frame -> ME+MC)
#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format
#define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format
#define CODEC_FLAG2_SKIP_RD 0x00004000 ///< RD optimal MB level residual skiping
/* Unsupported options :
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
* Syntax Arithmetic coding (SAC)
...
...
libavcodec/mpegvideo.c
View file @
c52f5d66
...
@@ -4330,7 +4330,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
...
@@ -4330,7 +4330,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, int motion_x,
uint8_t
*
ptr_y
,
*
ptr_cb
,
*
ptr_cr
;
uint8_t
*
ptr_y
,
*
ptr_cb
,
*
ptr_cr
;
int
wrap_y
,
wrap_c
;
int
wrap_y
,
wrap_c
;
for
(
i
=
0
;
i
<
mb_block_count
;
i
++
)
skip_dct
[
i
]
=
0
;
for
(
i
=
0
;
i
<
mb_block_count
;
i
++
)
skip_dct
[
i
]
=
s
->
skipdct
;
if
(
s
->
adaptive_quant
){
if
(
s
->
adaptive_quant
){
const
int
last_qp
=
s
->
qscale
;
const
int
last_qp
=
s
->
qscale
;
...
@@ -5290,6 +5290,39 @@ static int encode_thread(AVCodecContext *c, void *arg){
...
@@ -5290,6 +5290,39 @@ static int encode_thread(AVCodecContext *c, void *arg){
encode_mb_hq
(
s
,
&
backup_s
,
&
best_s
,
CANDIDATE_MB_TYPE_DIRECT
,
pb
,
pb2
,
tex_pb
,
encode_mb_hq
(
s
,
&
backup_s
,
&
best_s
,
CANDIDATE_MB_TYPE_DIRECT
,
pb
,
pb2
,
tex_pb
,
&
dmin
,
&
next_block
,
0
,
0
);
&
dmin
,
&
next_block
,
0
,
0
);
}
}
if
(
!
best_s
.
mb_intra
&&
s
->
flags2
&
CODEC_FLAG2_SKIP_RD
){
int
coded
=
0
;
for
(
i
=
0
;
i
<
6
;
i
++
)
coded
|=
s
->
block_last_index
[
i
];
if
(
coded
){
int
mx
,
my
;
memcpy
(
s
->
mv
,
best_s
.
mv
,
sizeof
(
s
->
mv
));
if
(
best_s
.
mv_dir
&
MV_DIRECT
){
mx
=
my
=
0
;
//FIXME find the one we actually used
ff_mpeg4_set_direct_mv
(
s
,
mx
,
my
);
}
else
if
(
best_s
.
mv_dir
&
MV_DIR_BACKWARD
){
mx
=
s
->
mv
[
1
][
0
][
0
];
my
=
s
->
mv
[
1
][
0
][
1
];
}
else
{
mx
=
s
->
mv
[
0
][
0
][
0
];
my
=
s
->
mv
[
0
][
0
][
1
];
}
s
->
mv_dir
=
best_s
.
mv_dir
;
s
->
mv_type
=
best_s
.
mv_type
;
s
->
mb_intra
=
0
;
/* s->mv[0][0][0] = best_s.mv[0][0][0];
s->mv[0][0][1] = best_s.mv[0][0][1];
s->mv[1][0][0] = best_s.mv[1][0][0];
s->mv[1][0][1] = best_s.mv[1][0][1];*/
backup_s
.
dquant
=
0
;
s
->
skipdct
=
1
;
encode_mb_hq
(
s
,
&
backup_s
,
&
best_s
,
CANDIDATE_MB_TYPE_INTER
/* wrong but unused */
,
pb
,
pb2
,
tex_pb
,
&
dmin
,
&
next_block
,
mx
,
my
);
s
->
skipdct
=
0
;
}
}
s
->
current_picture
.
qscale_table
[
xy
]
=
best_s
.
qscale
;
s
->
current_picture
.
qscale_table
[
xy
]
=
best_s
.
qscale
;
copy_context_after_encode
(
s
,
&
best_s
,
-
1
);
copy_context_after_encode
(
s
,
&
best_s
,
-
1
);
...
...
libavcodec/mpegvideo.h
View file @
c52f5d66
...
@@ -324,6 +324,7 @@ typedef struct MpegEncContext {
...
@@ -324,6 +324,7 @@ typedef struct MpegEncContext {
int
dropable
;
int
dropable
;
int
frame_rate_index
;
int
frame_rate_index
;
int
last_lambda_for
[
5
];
///< last lambda for a specific pict type
int
last_lambda_for
[
5
];
///< last lambda for a specific pict type
int
skipdct
;
///< skip dct and code zero residual
/* motion compensation */
/* motion compensation */
int
unrestricted_mv
;
///< mv can point outside of the coded picture
int
unrestricted_mv
;
///< mv can point outside of the coded picture
...
...
libavcodec/utils.c
View file @
c52f5d66
...
@@ -701,6 +701,7 @@ static const AVOption options[]={
...
@@ -701,6 +701,7 @@ static const AVOption options[]={
{
"fastpskip"
,
"fast pskip (H.264)"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_FASTPSKIP
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"fastpskip"
,
"fast pskip (H.264)"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_FASTPSKIP
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"aud"
,
"access unit delimiters (H.264)"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_AUD
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"aud"
,
"access unit delimiters (H.264)"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_AUD
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"brdo"
,
"b-frame rate-distortion optimization"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_BRDO
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"brdo"
,
"b-frame rate-distortion optimization"
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_BRDO
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"skiprd"
,
NULL
,
0
,
FF_OPT_TYPE_CONST
,
CODEC_FLAG2_SKIP_RD
,
INT_MIN
,
INT_MAX
,
V
|
E
,
"flags2"
},
{
"complexityblur"
,
"reduce fluctuations in qp (before curve compression)"
,
OFFSET
(
complexityblur
),
FF_OPT_TYPE_FLOAT
,
20
.
0
,
FLT_MIN
,
FLT_MAX
,
V
|
E
},
{
"complexityblur"
,
"reduce fluctuations in qp (before curve compression)"
,
OFFSET
(
complexityblur
),
FF_OPT_TYPE_FLOAT
,
20
.
0
,
FLT_MIN
,
FLT_MAX
,
V
|
E
},
{
"deblockalpha"
,
"in-loop deblocking filter alphac0 parameter"
,
OFFSET
(
deblockalpha
),
FF_OPT_TYPE_INT
,
DEFAULT
,
-
6
,
6
,
V
|
E
},
{
"deblockalpha"
,
"in-loop deblocking filter alphac0 parameter"
,
OFFSET
(
deblockalpha
),
FF_OPT_TYPE_INT
,
DEFAULT
,
-
6
,
6
,
V
|
E
},
{
"deblockbeta"
,
"in-loop deblocking filter beta parameter"
,
OFFSET
(
deblockbeta
),
FF_OPT_TYPE_INT
,
DEFAULT
,
-
6
,
6
,
V
|
E
},
{
"deblockbeta"
,
"in-loop deblocking filter beta parameter"
,
OFFSET
(
deblockbeta
),
FF_OPT_TYPE_INT
,
DEFAULT
,
-
6
,
6
,
V
|
E
},
...
...
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