[XviD-devel] Simple profile level 0
R.Schramp at telecom.tno.nl
R.Schramp at telecom.tno.nl
Wed Jun 4 17:02:23 CEST 2003
On request a very buggy patch for Simple Profile Level 0
> -----Original Message-----
> From: Michael Niedermayer [mailto:michaelni at gmx.at]
> Sent: woensdag 4 juni 2003 14:58
> To: xvid-devel at xvid.org
> Subject: Re: [XviD-devel] Simple profile level 0
>
>
> Hi
>
> On Wednesday 04 June 2003 13:34, R.Schramp at telecom.tno.nl wrote:
> > Another related question:
> >
> > In ffmpeg I added the posibility to use "cyclic refresh"
> which means that
> > except for "scene cuts" (large SAD for lots of MB) never I
> frames are used
> > but instead a cyclicly changing group of MB is forced to be
> Intra MB's.
> [...]
> > > i chose to
> > > > disable ac-prediction instead of what you are suggesting here.
> is the source code or a patch with these changes available somewhere?
>
> [...]
>
> --
> Michael
> level[i]= get_vlc(); i+=get_vlc(); (violates
> patent EP0266049)
> median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates
> patent #5,905,535)
> buf[i]= qp - buf[i-1];
> (violates patent #?)
> for more examples, see http://mplayerhq.hu/~michael/patent.html
> stop it, see http://petition.eurolinux.org &
> http://petition.ffii.org/eubsa/en
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
-------------- next part --------------
diff --context=3 -r ffmpeg-0.4.6/libavcodec/h263.c ../ffmpeg-0.4.6/libavcodec/h263.c
*** ffmpeg-0.4.6/libavcodec/h263.c 2002-12-27 15:35:45.000000000 +0100
--- ../ffmpeg-0.4.6/libavcodec/h263.c 2003-02-11 17:19:10.000000000 +0100
***************
*** 273,278 ****
--- 273,280 ----
int score0=0, score1=0;
int i, n;
int8_t * const qscale_table= s->current_picture.qscale_table;
+
+ return 0; //Forbid AC prediction<; Simple Profile Level 0
for(n=0; n<6; n++){
INT16 *ac_val, *ac_val1;
***************
*** 1494,1500 ****
int time_div, time_mod;
if(s->pict_type==I_TYPE){ //we will encode a vol header
! s->time_increment_resolution= s->frame_rate/ff_gcd(s->frame_rate, FRAME_RATE_BASE);
if(s->time_increment_resolution>=256*256) s->time_increment_resolution= 256*128;
s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1;
--- 1496,1503 ----
int time_div, time_mod;
if(s->pict_type==I_TYPE){ //we will encode a vol header
! // s->time_increment_resolution= s->frame_rate/ff_gcd(s->frame_rate, FRAME_RATE_BASE);
! s->time_increment_resolution= 15;
if(s->time_increment_resolution>=256*256) s->time_increment_resolution= 256*128;
s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1;
***************
*** 1531,1543 ****
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x100); /* video obj */
put_bits(&s->pb, 16, 0);
! put_bits(&s->pb, 16, 0x120); /* video obj layer */
put_bits(&s->pb, 1, 0); /* random access vol */
put_bits(&s->pb, 8, s->vo_type); /* video obj type indication */
! put_bits(&s->pb, 1, 1); /* is obj layer id= yes */
! put_bits(&s->pb, 4, vo_ver_id); /* is obj layer ver id */
! put_bits(&s->pb, 3, 1); /* is obj layer priority */
float_aspect_to_info(s, s->avctx->aspect_ratio);
--- 1534,1553 ----
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x100); /* video obj */
put_bits(&s->pb, 16, 0);
! //@@@@@ put_bits(&s->pb, 16, 0x120); /* video obj layer */
! put_bits(&s->pb, 16, 0x121); /* video obj layer */
put_bits(&s->pb, 1, 0); /* random access vol */
put_bits(&s->pb, 8, s->vo_type); /* video obj type indication */
!
! //@@@@@ removed ver_id
! put_bits(&s->pb, 1, 0); /* is obj layer id= yes */
! // put_bits(&s->pb, 4, vo_ver_id); /* is obj layer ver id */
! // put_bits(&s->pb, 3, 1); /* is obj layer priority */
!
! // put_bits(&s->pb, 1, 1); /* is obj layer id= yes */
! // put_bits(&s->pb, 4, vo_ver_id); /* is obj layer ver id */
! // put_bits(&s->pb, 3, 1); /* is obj layer priority */
float_aspect_to_info(s, s->avctx->aspect_ratio);
***************
diff --context=3 -r ffmpeg-0.4.6/libavcodec/mpegvideo.c ../ffmpeg-0.4.6/libavcodec/mpegvideo.c
*** ffmpeg-0.4.6/libavcodec/mpegvideo.c 2002-12-27 15:35:46.000000000 +0100
--- ../ffmpeg-0.4.6/libavcodec/mpegvideo.c 2003-03-21 17:01:52.000000000 +0100
***************
*** 646,652 ****
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
! s->low_delay= s->max_b_frames ? 0 : 1;
avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1);
break;
case CODEC_ID_MSMPEG4V1:
--- 646,653 ----
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
! //@@@@@ s->low_delay= s->max_b_frames ? 0 : 1;
! s->low_delay= 0 ;
avctx->delay= s->low_delay ? 0 : (s->max_b_frames + 1);
break;
case CODEC_ID_MSMPEG4V1:
***************
*** 2775,2780 ****
--- 2776,2791 ----
// s->mb_type[mb_y*s->mb_width + mb_x]=MB_TYPE_INTER;
}
}
+ {
+ int mb_cnt;
+ for(mb_cnt=7;--mb_cnt>0;)
+ {
+ static int gMB;
+ gMB++;
+ gMB%=(s->mb_width*s->mb_height);
+ s->mb_type[gMB]=MB_TYPE_INTRA;
+ };
+ };
}else /* if(s->pict_type == I_TYPE) */{
/* I-Frame */
//FIXME do we need to zero them?
More information about the XviD-devel
mailing list