mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-03 17:29:30 +02:00
Use existing function for VLC reading
Originally committed as revision 11185 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
b192e56461
commit
4978618b6b
@ -27,6 +27,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
|
#include "golomb.h"
|
||||||
|
|
||||||
#include "rv34.h"
|
#include "rv34.h"
|
||||||
#include "rv30data.h"
|
#include "rv30data.h"
|
||||||
@ -66,7 +67,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t
|
|||||||
|
|
||||||
for(i = 0; i < 4; i++, dst += r->s.b4_stride - 4){
|
for(i = 0; i < 4; i++, dst += r->s.b4_stride - 4){
|
||||||
for(j = 0; j < 4; j+= 2){
|
for(j = 0; j < 4; j+= 2){
|
||||||
int code = (ff_rv34_get_gamma(gb) - 1) << 1;
|
int code = svq3_get_ue_golomb(gb) << 1;
|
||||||
if(code >= 81*2){
|
if(code >= 81*2){
|
||||||
av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
|
av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
|
||||||
return -1;
|
return -1;
|
||||||
@ -94,7 +95,7 @@ static int rv30_decode_mb_info(RV34DecContext *r)
|
|||||||
static const int rv30_b_types[6] = { RV34_MB_SKIP, RV34_MB_B_DIRECT, RV34_MB_B_FORWARD, RV34_MB_B_BACKWARD, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 };
|
static const int rv30_b_types[6] = { RV34_MB_SKIP, RV34_MB_B_DIRECT, RV34_MB_B_FORWARD, RV34_MB_B_BACKWARD, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 };
|
||||||
MpegEncContext *s = &r->s;
|
MpegEncContext *s = &r->s;
|
||||||
GetBitContext *gb = &s->gb;
|
GetBitContext *gb = &s->gb;
|
||||||
int code = ff_rv34_get_gamma(gb) - 1;
|
int code = svq3_get_ue_golomb(gb);
|
||||||
|
|
||||||
if(code > 11){
|
if(code > 11){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Incorrect MB type code\n");
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
|
#include "golomb.h"
|
||||||
|
|
||||||
#include "rv34.h"
|
#include "rv34.h"
|
||||||
#include "rv40vlc2.h"
|
#include "rv40vlc2.h"
|
||||||
@ -207,7 +208,7 @@ static int rv40_decode_mb_info(RV34DecContext *r)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if(!r->s.mb_skip_run)
|
if(!r->s.mb_skip_run)
|
||||||
r->s.mb_skip_run = ff_rv34_get_gamma(gb);
|
r->s.mb_skip_run = svq3_get_ue_golomb(gb) + 1;
|
||||||
|
|
||||||
if(--r->s.mb_skip_run)
|
if(--r->s.mb_skip_run)
|
||||||
return RV34_MB_SKIP;
|
return RV34_MB_SKIP;
|
||||||
|
Loading…
Reference in New Issue
Block a user